'Coppermine - XP Web Publishing Wizard', 'welcome' => 'Welcome %s,', 'need_login' => 'You need to login to the gallery using your web browser before you can use this wizard.

When you login don\'t forget to select the remember me option if it is present.', 'no_alb' => 'Sorry but there is no album where you are allowed to upload pictures with this wizard.', 'upload' => 'Upload your pictures into an existing album', 'create_new' => 'Create a new album for your pictures', 'album' => 'Album', 'category' => 'Category', 'new_alb_created' => 'Your new album "%s" was created.', 'continue' => 'Press "Next" to start to upload your pictures', ); // ------------------------------------------------------------------------- // // Activate more language block sets. define('LOGIN_PHP', true); define('DB_INPUT_PHP', true); define('ALBMGR_PHP', true); // Call necessaryy files and subroutines. require('include/init.inc.php'); require('include/picmgmt.inc.php'); // Set the log file path. define('LOGFILE', 'xp_publish.log'); // ------------------------------------------------------------------------- // // HTML template for the login screen $template_login = <<{ENTER_LOGIN_PSWD}

{USERNAME}: 
{PASSWORD}: 
EOT; // HTML template for a successful login $template_login_success = <<< EOT

{WELCOME}

EOT; // HTML template for an unsuccessful login $template_login_failure = <<< EOT

{ERROR}

EOT; // HTML template for the select destination/create new album screen $template_select_album = <<{WELCOME}


{NO_ALBUM}

{UPLOAD}
{ALBUM}:  
 
{CREATE_NEW}
{ALBUM}:  
{CATEGORY}:  
EOT; // HTML template for a successful album creation $template_create_album = <<{NEW_ALB_CREATED}

{CONTINUE}

EOT; // ------------------------------------------------------------------------- // // Simple die function (replace the cpg_die function that can't be used inside the wizard) function simple_die($msg_code, $msg_text, $error_file, $error_line, $output_buffer = false) { global $CONFIG, $lang_cpg_die; $msg = $lang_cpg_die[$msg_code] . ': ' . $msg_text; if (!$CONFIG['debug_mode']) { $msg .= '(' . $lang_cpg_die['file'] . ': ' . $error_file . ' / ' . $lang_cpg_die['line'] . ': ' . $error_line . ')'; } echo $msg; // If debug mode is active, write the output into a log file if (!$CONFIG['debug_mode']) { $ob = ob_get_contents(); fwrite(fopen(LOGFILE, 'w'), $ob); } exit; } // Quote a string in order to make a valid JavaScript string function javascript_string($str) { // replace \ with \\ and then ' with \'. $str = str_replace('\\', '\\\\', $str); $str = str_replace('\'', '\\\'', $str); return $str; } // Retrieve the category list function get_subcat_data($parent, $ident = '') { global $CONFIG, $CAT_LIST; $result = db_query("SELECT cid, name, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent' AND cid != 1 ORDER BY pos"); if (mysql_num_rows($result) > 0) { $rowset = db_fetch_rowset($result); foreach ($rowset as $subcat) { $CAT_LIST[] = array($subcat['cid'], $ident . $subcat['name']); get_subcat_data($subcat['cid'], $ident . '   '); } } } // Return the HTML code for the album list select box function html_album_list(&$alb_count) { global $CONFIG; if (USER_IS_ADMIN) { $public_albums = db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title"); if (mysql_num_rows($public_albums)) { $public_albums_list = db_fetch_rowset($public_albums); } else { $public_albums_list = array(); } } else { $public_albums_list = array(); } if (USER_ID) { $user_albums = db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category='" . (FIRST_USER_CAT + USER_ID) . "' ORDER BY title"); if (mysql_num_rows($user_albums)) { $user_albums_list = db_fetch_rowset($user_albums); } else { $user_albums_list = array(); } } else { $user_albums_list = array(); } $alb_count = count($public_albums_list) + count($user_albums_list); $html = "\n"; foreach($user_albums_list as $album) { $html .= ' \n"; } foreach($public_albums_list as $album) { $html .= ' \n"; } return $html; } // Return the HTML code for the category list select box function html_cat_list() { global $CONFIG, $CAT_LIST; global $lang_albmgr_php; $CAT_LIST = array(); if (USER_CAN_CREATE_ALBUMS) $CAT_LIST[] = array(FIRST_USER_CAT + USER_ID, $lang_albmgr_php['my_gallery']); $CAT_LIST[] = array(0, $lang_albmgr_php['no_category']); get_subcat_data(0, ''); $html = "\n"; foreach($CAT_LIST as $category) { $html .= ' \n"; } return $html; } // Display information on how to use/install the wizard client function display_instructions() { global $PHP_SELF; ?> Coppermine Photo Gallery - XP Publish README

Coppermine Photo Gallery

XP Web Publishing Wizard Client

This module allows to use Windows XP web publishing wizard with Coppermine.

Code is based on article posted by Sebastian Delmont Creating your own XP Publishing Wizard.

What is required

How to install on client side

Testing

Notes :