#!/usr/bin/perl -w
#
# 03/25/01 - Slide_Show
# Author: Thomas Ballard (thomas@esqsoft.com)
# Note: Comments and Suggestions would be appreciated.
#
##################################################################################################
### GLOBALS AND INCLUDES
###
use strict;
use O::CGI qw(GET_FORM CONTENT_TYPE);
use O::conf_util qw(conf_read conf_write);
use O::ENCODE qw(URLDecode URLEncode URL_ENCODE);
use O::FILE_UTIL qw(compute_used);
use O::FORMS qw(GET_HIDDEN);
use O::Is qw(isun);
use O::Partner;
use O::results2html;
use O::s2dr qw(s2dr);
use O::SlideShow qw(list_shows delete_show list_pictures);
use O::Slappy qw(slap make_headers);
use O::User;
use O::Wrap qw(wrap);
use Image::Magick;
use File::Copy;
&O::Is::unbuffer;
use O::UserAuth qw(RequireUserLogin);
RequireUserLogin();
use O::ServiceAuth qw(requireServiceAuth);
requireServiceAuth('slide_show_manage');
my $partner = new O::Partner($ENV{HTTP_HOST});
my %SHOWS = ();
my $step = "manage_shows"; #default non-wizard starting page
my $max_pics = 50;
my %FORM = GET_FORM;
# Encountered a problem where the data in the FORM hash was NOT getting URL Decoded, so force it here
$FORM{font_1} = URLDecode($FORM{font_1}) if (exists $FORM{font_1});
$FORM{font_2} = URLDecode($FORM{font_2}) if (exists $FORM{font_2});
$FORM{font_3} = URLDecode($FORM{font_3}) if (exists $FORM{font_3});
$FORM{navbar_html} = URLDecode($FORM{navbar_html}) if exists $FORM{navbar_html};
##################################################################################################
### PRE-PROCESSING ...UM, PROCESSING (Anything that might cause us to not need to process the form data further)
###
### Warn if browser isn't compatible
# Note: some people think that browser support should be assumed carrying forward, but any reasonable person
# knows that new software poses new problems... when new browsers are released they need to be tested and
# added to this check.
my $browser_ok = '';
$browser_ok = $ENV{HTTP_USER_AGENT} =~ /MSIE 5/ if(!$browser_ok);
$browser_ok = $ENV{HTTP_USER_AGENT} =~ /MSIE 6/ if(!$browser_ok);
if(!$browser_ok){
my $temp=URL_ENCODE($ENV{HTTP_USER_AGENT});
$temp =~ s/\+/\%20/g;
$FORM{bad_browser_warning} = "^warning.header^^warning.start;warningheading=Warning:^^errortext.bad_browser_warning^";
$FORM{bad_browser_warning} .= " ^warning.link;linktext=errortext.click_here;url=http://microsoft.com/windows/ie/default.htm;target=_blank;onclick=return;^ ^errortext.download_here^";
#$FORM{bad_browser_warning} .= " ^warning.link;linktext=errortext.click_here;onclick=return;target=_self;url=/cgi-bin/feedback?option=bug_report&site=$ENV{HTTP_HOST}&category=Compatibility&link=/cgi-bin/util/slide_show_manage&question=Slide%20Show%20warning%20occured%20with%20" . $temp . ";^ ^errortext.report_problem^";
$FORM{bad_browser_warning} .= "^warning.end^^warning.footer^";
}
### Determine if this is the first visit this browser session
if(!$FORM{next_page}){
&determine_wizard;
}
### Set initial navigation in case an error occurs during processing
if($FORM{current_page}){
$step = $FORM{current_page};
}
### If we plan on leaving do it now
#
# Note: If you do a location bounce to a relative link ie. /cgi-bin/util/my_member_area, then the address in the address bar doesn't
# change, even though the bounce works. So, if you want the location bar to change you need to bounce to an absolute URL as below.
#
if($FORM{next_page} =~ m%^/cgi-bin/util/my_member_area$%i){
print "Location: http://$ENV{HTTP_HOST}/cgi-bin/util/my_member_area\n\n";
exit;
}
if($FORM{next_page} =~ m%^/cgi-bin/util/sitebuilder$%i){
print "Location: http://$ENV{HTTP_HOST}/cgi-bin/util/sitebuilder\n\n";
exit;
}
if($FORM{next_page} =~ m%^/cgi-bin/util/slide_show_manage$%i){
print "Location: http://$ENV{HTTP_HOST}/cgi-bin/util/slide_show_manage\n\n"; #force reload please
exit;
}
##################################################################################################
### TASK ORIENTED PROCESSING (Non-page dependent)
###
$FORM{from_manage} = "1" if(not exists $FORM{from_slide_show_page}); # for w_intro.htm, puts on a wrapper or not.
if($FORM{temp_slide_show_name}){
&validate_slide_show_name;
}
if($FORM{upload_images}){
&upload_images;
}
if($FORM{store_image_urls}){
#Note: We need to resolve a number of "total_images" at this point (put it into $FORM{total_images}).
&store_image_urls;
delete $FORM{store_image_urls};
}
if($FORM{store_list_order}){
&sort_images_in_conf;
}
if($FORM{create_thumbnails}){
&create_thumbnails;
}
if($FORM{sitebuilder_start_with}){
&starts_with_value("write");
}
##################################################################################################
### PAGE ORIENTED PROCESSING (Page dependent)
###
if(
($FORM{current_page}) &&
($FORM{current_page} eq 'edit_table')
){
&store_edit_table_values;
}
if(
($FORM{current_page}) &&
($FORM{current_page} eq 'sitebuilder')
){
&store_sitebuilder_value;
}
if($FORM{next_page} eq 'delete_one_slide_show'){
&delete_one_slide_show;
}
if($FORM{next_page} eq 'delete_all_my_slide_shows'){
&delete_all_slide_shows;
}
if(
($FORM{next_page}) &&
($FORM{next_page} eq 'image_order')
){
my %TEMP_HASH = &prep_image_order;
$FORM{images_option_list} = $TEMP_HASH{images_option_list};
}
if(
($FORM{current_page}) &&
($FORM{current_page} eq 'w_settings')
){
&store_settings_data;
}
if(
($FORM{next_page}) &&
(($FORM{next_page} eq 'w_sb_success') ||
($FORM{next_page} eq 'w_success') ||
($FORM{next_page} eq 'w_sb_code') ||
($FORM{next_page} eq 'image_order_success') ||
($FORM{next_page} eq 'w_cut_code')
)){
&get_slide_show_url;
&check_site_for_slide_show_html;
}
if(
($FORM{next_page}) &&
($FORM{next_page} eq 'upload_images')
){
if($ENV{HTTP_USER_AGENT} !~ /MSIE 5.5/){
$FORM{upload_image_rows} = "^form.total_images?slide_show_manage.ie50_upload_image_row * form.total_images:slide_show_manage.ie50_upload_image_row * 10;^";
}
else{
$FORM{upload_image_rows} = "^form.total_images?slide_show_manage.upload_image_row * form.total_images:slide_show_manage.upload_image_row * 10;^";
}
}
if(
($FORM{current_page} && (($FORM{current_page} eq 'upload_images') || (($FORM{current_page} eq 'w_images') && $FORM{error}))) ||
($FORM{next_page} && ($FORM{next_page} eq 'w_images'))
){
&build_image_drop_down;
if($FORM{error}){
# If an error during uploading or storing images occured we want to display
# all of the slides since the error's could span sets of 10 images.
$FORM{start_counter_value} = "1";
$FORM{show_records} = "$max_pics";
}
if(!$FORM{start_counter_value}){
$FORM{start_counter_value} = "1";
}
$FORM{start_counter} = "^counters.c1.alt=" . $FORM{start_counter_value} . "^";
if(!$FORM{show_records}){
$FORM{show_records} = "10";
}
if($ENV{HTTP_USER_AGENT} !~ /MSIE/){
$FORM{bad_browser_warning} = "^warning.header^^warning.start;warningheading=Warning:^^errortext.bad_browser_warning2^";
$FORM{bad_browser_warning} .= " ^warning.link;linktext=errortext.click_here;url=http://microsoft.com/windows/ie/default.htm;target=_blank;onclick=return;^ ^errortext.download_here^";
$FORM{bad_browser_warning} .= "^warning.end^^warning.footer^";
}
if($ENV{HTTP_USER_AGENT} !~ /MSIE 5.5/){
$FORM{generate_rows} = "^slide_show_manage.ie50_image_select * " . $FORM{show_records} . "^";
}
else{
$FORM{generate_rows} = "^slide_show_manage.image_select * " . $FORM{show_records} . "^";
$FORM{loading_notice_off} = "loading_notice('off','^this.cindex^');";
}
if(
($FORM{start_counter_value}) &&
($FORM{start_counter_value} > 1)
){
$FORM{previous_images_link} = qq|
^sectiontext.text;text=pass.text^
|;
}
else{
$FORM{previous_images_link} = "^sectiontext.text;text=pass.text^";
}
if(
($FORM{start_counter_value}) &&
($FORM{start_counter_value} < ($max_pics-10))
){
$FORM{next_images_link} = qq|
^sectiontext.text;text=pass.text^
|;
}
else{
$FORM{next_images_link} = "^sectiontext.text;text=pass.text^";
}
}
##################################################################################################
### NAVIGATION/OUTPUT
###
if(
($FORM{sitebuilder})&&
($FORM{sitebuilder} eq '1')
){
$FORM{show_sitebuilder} = 'true';
#javascript tests for this key on the client end so it CAN'T exist AT ALL or its "TRUE".
}
if(
(!$FORM{error}) &&
(!$FORM{inline_error})
){
delete $FORM{current_page};
$FORM{current_page} = $FORM{next_page};
$step = $FORM{next_page};
delete $FORM{next_page};
}
else{
if(
($FORM{current_page}) &&
($FORM{current_page} eq 'w_images')
){
&build_image_drop_down;
}
$FORM{error} = URLDecode($FORM{error});
}
if($FORM{produce_sitewide_image_list}){
&build_image_drop_down;
$step="filelist_only";
}
if(
($step) &&
($step eq 'manage_shows')
){
%SHOWS = &list_shows;
&tell_disk_usage;
}
### Specify which items must persist from page to page.
my %NFORM = ();
$NFORM{current_page} = $FORM{current_page} if exists $FORM{current_page};
$NFORM{slide_show_path} = $FORM{slide_show_path} if exists $FORM{slide_show_path};
$NFORM{total_images} = $FORM{total_images} if exists $FORM{total_images};
$NFORM{sitebuilder} = $FORM{sitebuilder} if(exists $FORM{sitebuilder} && $FORM{sitebuilder} eq '1');
$NFORM{slide_show_url} = $FORM{slide_show_url} if exists $FORM{slide_show_url};
$NFORM{slide_show_name} = $FORM{slide_show_name} if exists $FORM{slide_show_name};
$NFORM{wizard} = $FORM{wizard} if exists $FORM{wizard};
$NFORM{edit_next} = $FORM{edit_next} if exists $FORM{edit_next};
$NFORM{prev_page} = $FORM{prev_page} if exists $FORM{prev_page}; #this is for IE since it won't allow javascript back with expired form data.
$NFORM{total_slide_shows} = $FORM{total_slide_shows} if exists $FORM{total_slide_shows};
$FORM{hidden} = GET_HIDDEN(\%NFORM, $partner->{content});
my %FILL_HASH = ();
if($FORM{slide_show_path}){
%FILL_HASH = &read_raw_form_from_conf;
delete $FILL_HASH{sitebuilder_start_with} if exists $FILL_HASH{sitebuilder_start_with};
$partner->{fill} = \%FILL_HASH;
$FORM{font_size} = $FILL_HASH{font_size} if($FILL_HASH{font_size});
if(
($FILL_HASH{disable_mouseovers}) &&
($FILL_HASH{disable_mouseovers} eq 'true')
){
$FORM{edit_toggle} = "0";
}
else{
$FORM{edit_toggle} = "1";
}
}
$FORM{maximum_slides_possible} = $max_pics; # Needed by /content/slide_show_manage/w_images.htm
# ----------------------------------------------------------------------------------------------
# Note, the following is in sequence here since it's dependent on data read from the conf for the FILL_HASH
if(
($step) &&
($step eq 'w_settings')
){
# Read the slide_show.conf file to for a default show setting.
$FORM{default_slide_show_name} = starts_with_value("read");
### Construct the elements needed on the w_settings page
my $sitebuilder_settings = &read_sitebuilder_value;
if(
($sitebuilder_settings->{default_slide_show}) &&
($sitebuilder_settings->{default_slide_show} eq $FORM{slide_show_path})
){
$FORM{current_starting_show} = " CHECKED";
}
else{
$FORM{current_starting_show} = undef;
}
$FORM{thumbnail_button_html} = "^w_settings_tables.thumbnail_button_html^";
$FORM{thumbnail_text_html} = "^w_settings_tables.thumbnail_text_html^";
if(
(!$FILL_HASH{create_thumbnail_page}) ||
($FILL_HASH{create_thumbnail_page} eq 'true')
){ # If this key doesn't exist it's probably the first time through this slide_show and the default is on.
$FORM{thumbnail_chunk_visibility} = "position:relative;visibility:visible;";
}
else{
$FORM{thumbnail_chunk_visibility} = "position:absolute;visibility:hidden;";
}
$FORM{autopilot_button_html} = "^w_settings_tables.autopilot_button_html^";
$FORM{autopilot_text_html} = "^w_settings_tables.autopilot_text_html^";
if(
($FILL_HASH{enable_autopilot}) &&
($FILL_HASH{enable_autopilot} eq 'true')
){
$FORM{autopilot_chunk_visibility} = "position:relative;visibility:visible;";
}
else{
$FORM{autopilot_chunk_visibility} = "position:absolute;visibility:hidden;";
}
### Handle the mouseover toggle check
#do not store the following in the conf, they are to be passed in the FORM hash for w_settings
#and only apply to that step of manage, if they get stored in the slide_show conf they'll break
#the live slide show.
$FORM{disable_mouseover_check_start} = "^w_settings_tables.disable_mouseover_check_start^";
$FORM{disable_mouseover_check_end} = "^w_settings_tables.disable_mouseover_check_end^";
}
# End of FILL_HASH dependent code
# ----------------------------------------------------------------------------------------------
$partner->print($step,\%FORM,\%SHOWS);
##################################################################################################
### SUBROUTINES
###
#----------------------------------------------------------------------------------------
sub tell_disk_usage{
### Determine space used, and stats (for upgrade pitch)
my $user = new O::User($ENV{HTTP_HOST});
my $space_used = int(compute_used("$user->{directory}/"));
if($space_used<1024){
$FORM{used_space} = int($space_used) . " bytes";
$FORM{disk_quota} = int(($user->{quota} * 1024) * 1024) . " bytes (" . $user->{quota} . "MB)";
}
elsif($space_used<1048576){
$FORM{used_space} = int($space_used / 1024) . " kilobytes";
$FORM{disk_quota} = int($user->{quota} * 1024) . " kilobytes (" . $user->{quota} . "MB)";
}
else{
$space_used = int(($space_used / 1024) / 1024);
$FORM{used_space} = $space_used . " megabytes";
$FORM{used_space} = "1 megabyte" if($space_used<1);
$FORM{disk_quota} = $user->{quota} . "MB";
}
return;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub determine_wizard{
################################################
#
# WIZARD OR NON-WIZARD?
# If there ISN'T a $FORM{next_page} then we check for the existence of the slide_show directory within the user's site
# ...If there ISN'T a directory then this is the first time, so we are in the WIZARD, otherwise this is a return trip so its NONWIZARD
#
# !NOTE- The CONTENT should NOT specify WIZARD or NONWIZARD (the CGI checks for the slide_show directory)
#
################################################
my $user = O::User->new($ENV{HTTP_HOST});
my $success = 0;
if(! -d "$user->{directory}/slide_shows" ){
$FORM{wizard} = "true";
$FORM{next_page} = "w_intro";
$FORM{prev_page} = "w_intro";
}
else{
#open conf in slide_shows and check for sitebuilder key
my %CONF_HASH = conf_read( "$user->{directory}/slide_shows/slide_shows.conf" );
$FORM{sitebuilder} = $CONF_HASH{sitebuilder} if exists $CONF_HASH{sitebuilder};
$FORM{next_page} = "manage_shows";
$FORM{prev_page} = "manage_shows";
}
return;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub validate_slide_show_name{
my $user = O::User->new($ENV{HTTP_HOST});
my $success = 0;
my $error = "";
my $conf_filename = "";
#We want to store the name and path in the available slide shows conf file so we
#first need to resolve the name into a path and verify that the path can be created
$FORM{temp_slide_show_name} =~ s/[%^()@"'\\\/\.\?:;,|\{\}\+=~`<>\[\]\#\*\&\$]//g;
$FORM{slide_show_path} = $FORM{temp_slide_show_name};
$FORM{slide_show_path} =~ s/ /_/g;
my $path_ok = 0;
if( -d "$user->{directory}/slide_shows/$FORM{slide_show_path}" ){ #path already there?
$FORM{error} = "^errortext.unable_to_store^ $FORM{slide_show_path} ^errortext.already_exists^^errortext.unable_to_store2^";
}
else{
#path not already there (probably user's first visit)
if (&create_path){
### successfully created directory for slide_show, now try and save the name into the CONF file.
$conf_filename = $user->{directory} . "/slide_shows/" . $FORM{slide_show_path} . "/" . $FORM{slide_show_path} . ".conf";
if(!conf_write($conf_filename,{slide_show_name => $FORM{temp_slide_show_name}})){
#since we just created a path based on a name, store the name in our CONF
$FORM{error} = $O::conf_util::error;
}
else{
$success = 1;
}
}
else{
### couldn't create the directory for the slide_show
$FORM{error} = "^errortext.unable_to_store^ $FORM{slide_show_path} ^errortext.unable_to_store2^";
}
}
delete $FORM{temp_slide_show_name}; #remove this so we won't try and process it again later
return $success;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub create_path{
my $result = "";
my $user = O::User->new($ENV{HTTP_HOST});
require "File/Path.pm";
$result = File::Path::mkpath("$user->{directory}/slide_shows/$FORM{slide_show_path}",0,0755);
$result .= File::Path::mkpath("$user->{directory}/slide_shows/$FORM{slide_show_path}/thumbnails",0,0755);
return $result;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub build_image_drop_down{
my $user = O::User->new($ENV{HTTP_HOST});
my @objects = ();
my @dirs = ();
push @dirs, "$user->{directory}/";
while(my $directory = shift(@dirs)){
opendir(DIR,$directory);
push @objects, $directory;
while(my $fileName = readdir(DIR)){
next if $fileName =~ /^\.|^filebox$/; # ok with s2dr2fb
push @dirs, "$directory/$fileName";# if -d "$directory/$fileName";
next unless -T "$directory/$fileName";
push @objects, "$directory/$fileName";
}
closedir(DIR);
}
@objects = grep /\.(?:jpg|gif|jpeg|jpe|png)$/i, @objects;
foreach my $item (@objects){
$item =~ s/^$user->{directory}//;
$item =~ s/\/+/\//g;
}
$FORM{sitewide_image_files} = "";
$FORM{sitewide_image_files} = "\n";
}
return %IMAGES_HASH;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub store_edit_table_values{
my $user = O::User->new($ENV{HTTP_HOST});
my $success = 0;
my @inline_error = ();
my $error = "";
### $FORM{slide_show_path} must already exist (we derive a conf filename by combining it with $user)
if(!$FORM{slide_show_path}){
$FORM{error} = "^errortext.no_conf_filename^";
return $success;
}
if($FORM{table_align}){
$FORM{featured_table_align} = " ALIGN=" . $FORM{table_align};
}
else{
$FORM{table_align} = undef;
$FORM{featured_table_align} = undef;
}
if($FORM{table_valign}){
$FORM{featured_table_valign} = " VALIGN=" . $FORM{table_valign};
}
else{
$FORM{table_valign} = undef;
$FORM{featured_table_valign} = undef;
}
if($FORM{table_width}){
my $temp_unit = "";
$temp_unit = "%" if($FORM{table_width_unit} && ($FORM{table_width_unit} eq 'percent'));
$FORM{featured_table_width} = " WIDTH=" . $FORM{table_width} . $temp_unit;
}
else{
$FORM{table_width} = undef;
$FORM{featured_table_width} = undef;
}
if($FORM{table_height}){
my $temp_unit = "";
$temp_unit = "%" if($FORM{table_height_unit} && ($FORM{table_height_unit} eq 'percent'));
$FORM{featured_table_height} = " HEIGHT=" . $FORM{table_height} . $temp_unit;
}
else{
$FORM{table_height} = undef;
$FORM{featured_table_height} = undef;
}
if($FORM{table_color}){
$FORM{featured_table_color} = " BGCOLOR='" . $FORM{table_color} . "'";
}
else{
$FORM{table_color} = undef;
$FORM{featured_table_color} = undef;
}
if($FORM{table_cellspacing}){
$FORM{featured_table_cellspacing} = " CELLSPACING=" . $FORM{table_cellspacing};
}
else{
$FORM{table_cellspacing} = undef;
$FORM{featured_table_cellspacing} = undef;
}
if($FORM{table_cellpadding}){
$FORM{featured_table_cellpadding} = " CELLPADDING=" . $FORM{table_cellpadding};
}
else{
$FORM{table_cellpadding} = undef;
$FORM{featured_table_cellpadding} = undef;
}
if(
($FORM{border_color}) &&
(length $FORM{border_color} > 1)
){
$FORM{featured_border_color} = "border-color:" . $FORM{border_color} . ";";
}
else{
$FORM{border_color} = undef;
$FORM{featured_border_color} = undef;
}
if($FORM{fmcolor}){
$FORM{featured_title_color} = "color:" . $FORM{fmcolor} . ";";
$FORM{featured_caption_color} = "color:" . $FORM{fmcolor} . ";";
}
else{
$FORM{fmcolor} = undef;
$FORM{featured_title_color} = undef;
$FORM{featured_caption_color} = undef;
}
if($FORM{border_width}){
$FORM{featured_border_width} = "border-width:" . $FORM{border_width} . "px;";
}
else{
$FORM{border_width} = undef;
$FORM{featured_border_width} = undef;
}
my $conf_filename = $user->{directory}."/slide_shows/".$FORM{slide_show_path}."/".$FORM{slide_show_path}.".conf";
if(!conf_write($conf_filename,sort(\%FORM))){
$FORM{error} = $O::conf_util::error;
}
else{
$success = 1;
}
if(length $error > 0){
$FORM{error} = $error;
$FORM{inline_error} = \@inline_error;
}
return $success;
}
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
sub sort_images_in_conf{
#resolve "new_list_order" into individual _url values (split based on comma)
#build a list of applicable key/values from the conf
#examine the list for a match of each value and move all related keys form TEMP1 has to TEMP2 hash (using the index this should reorder the list)
#loop through each and scan for a matching _url value...
#when found, move all data related to that key, to it's new ordered location
my $success = 0;
my %CONF_HASH = &read_raw_form_from_conf;
my @slide_items = split /,/, $FORM{store_list_order};
my $old = '';
my %TEMP_HASH = (); #this is the existing order (different from CONF_HASH in that it only contain relevant hash keys... probably unnecessarily redundant)
my %NEW_HASH = (); #this will hold the new order
#get only the applicable keys
foreach my $key (keys(%CONF_HASH)){
if($key =~ /^(picture).+(_)/){
$TEMP_HASH{$key} = $CONF_HASH{$key};
}
}
for (my $index = 0; $index 0){
$NEW_HASH{"picture".($index+1).$ext} = "picture".($index).".jpg";
}
else{
$NEW_HASH{"picture".($index+1).$ext} = "picture".(scalar(@slide_items)).".jpg";
}
}
elsif($ext eq '_next'){
if($index < (scalar(@slide_items)-1)){
$NEW_HASH{"picture".($index+1).$ext} = "picture".($index+2).".jpg";
}
else{
$NEW_HASH{"picture".($index+1).$ext} = "picture1.jpg";
}
}
#else, if not "_previous" or "_next" then just copy it across to the new location
else{
$NEW_HASH{"picture".($index+1).$ext} = $TEMP_HASH{$key};
}
}
}
}
}
}
}
#now store the new data back out to the conf
### $FORM{slide_show_path} must already exist (we derive a conf filename by combining it with $user)
if(!$FORM{slide_show_path}){
$FORM{error} = "^errortext.no_conf_filename^";
return $success;
}
my $user = O::User->new($ENV{HTTP_HOST});
my $dir = $user->{directory}."/slide_shows/";
my $conf_filename = $dir.$FORM{slide_show_path}."/".$FORM{slide_show_path}.".conf";
if(!conf_write($conf_filename,sort(\%NEW_HASH))){
$FORM{error} = $O::conf_util::error;
}
else{
$success = 1;
}
return $success;
}
#----------------------------------------------------------------------------------------