$page_updated = true;
        } else {
            $error = '80';
            $page_updated = false;
        }
        break;
    case 'DelSure':
        function delete_information($information_id)
        {
            mysql_query("DELETE FROM " . TABLE_INFORMATION . " WHERE information_id={$information_id}");
        }
        if ($information_id) {
            delete_information($information_id);
            $data = browse_information();
            $data_inc = browse_includes();
            $url_rewrite->purge_item(sprintf('i%d', $information_id));
            $title = "{$confirm} " . DELETED_ID_INFORMATION . " {$information_id} " . SUCCED_INFORMATION . "";
            include 'information_list.php';
            $page_updated = true;
        } else {
            $error = '80';
            $page_updated = false;
        }
        break;
    default:
        $data = browse_information();
        $data_inc = browse_includes();
        $title = "" . MANAGER_INFORMATION . "";
        include 'information_list.php';
}
if ($page_updated == true) {
示例#2
0
         $categories_htc_desc_array = $HTTP_POST_VARS['categories_htc_desc_tag'];
         $categories_htc_keywords_array = $HTTP_POST_VARS['categories_htc_keywords_tag'];
         $categories_htc_description_array = $HTTP_POST_VARS['categories_htc_description'];
         //HTC EOC
         $language_id = $languages[$i]['id'];
         $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]));
         //HTC BOC
         $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]), 'categories_htc_title_tag' => tep_db_prepare_input($categories_htc_title_array[$language_id]), 'categories_htc_desc_tag' => tep_db_prepare_input($categories_htc_desc_array[$language_id]), 'categories_htc_keywords_tag' => tep_db_prepare_input($categories_htc_keywords_array[$language_id]), 'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]));
         //HTC EOC
         if ($action == 'insert_category') {
             $insert_sql_data = array('categories_id' => $categories_id, 'language_id' => $languages[$i]['id']);
             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
             tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
         } elseif ($action == 'update_category') {
             // By MegaJim
             $url_rewrite->purge_item(sprintf('c%d', $categories_id), 1);
             tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int) $categories_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
         }
     }
     if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) {
         tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int) $categories_id . "'");
     }
     if (USE_CACHE == 'true') {
         tep_reset_cache_block('categories');
         tep_reset_cache_block('also_purchased');
     }
     tep_redirect(tep_href_link('gift_certs.php', 'pclass=' . $pClass . '&cPath=' . $cPath . '&cID=' . $categories_id));
     break;
 case 'delete_category_confirm':
     if (isset($HTTP_POST_VARS['categories_id'])) {
         $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);