File: /home/httpd/html/thumbnailpages.com/DEAD/wp-admin/kalimantan-settings.php
<?php
require_once('../wp-config.php');
$title = __('Kalimantan Settings');
include('admin-header.php');
// Initialize
add_option('kalimantan_realpath', ABSPATH, 'Your Gallery 2 Path', 'yes');
add_option('kalimantan_g2', 'gallery.php', 'Your Gallery 2 Under WordPress', 'yes');
add_option('kalimantan_g2_uri', get_settings('siteurl') , 'Your Gallery 2 URI', 'yes');
add_option('kalimantan_css', get_settings('siteurl').'wp-content/plugins/kalimantan/layout.css' , 'Your Gallery 2 CSS Location', 'yes');
?>
<div class="wrap">
<h2><?php _e('Kalimantan Settings') ?></h2>
<?php if(!isset($_POST['submit'])){ ?>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST" >
<fieldset class="options">
<tr><td><h2><?php _e('Required') ?></h2></td></tr>
<th width="33%" valign="top" scope="row"><?php _e('<strong>Gallery 2 Directory:</strong>') ?><br/> </th>
<td>
<input name="kalimantan_realpath" type="text" id="kalimantan_realpath" value="<?php echo get_option('kalimantan_realpath'); ?>" size="100" /><br />
<?php printf(__('It might be something like (i.e): <code>%s</code> %s'), preg_replace('/(.*\/)(.*\/)$/si','$1',ABSPATH).'gallery2' . DIRECTORY_SEPARATOR . ' or '. preg_replace('/(.*\/)(.*\/)$/si','$1',ABSPATH).'g2' . DIRECTORY_SEPARATOR , '. Remember to put a trailing slash at the end.');?>
</td>
</tr>
<tr><td><br/><br/><br/></td></tr>
<th width="33%" valign="top" scope="row"><?php _e('<strong>Gallery 2 URL:</strong>') ?> <br/></th>
<td>
<input name="kalimantan_g2_uri" type="text" id="kalimantan_g2_uri" value="<?php echo get_option('kalimantan_g2_uri'); ?>" size="100" /><br />
<?php echo 'Put your Real G2 URL here. The format should be something like: <code>http://subdomain.domain.com/gallery2/</code>' ?>
</td>
</tr>
<tr><td><br/><br/><br/></td></tr>
<tr><td><h2><?php _e('Optional') ?></h2></td></tr>
<th width="33%" valign="top" scope="row"><?php _e('<strong>Gallery 2 CSS:</strong>') ?> <br/></th>
<td>
<input name="kalimantan_css" type="text" id="kalimantan_css" value="<?php echo get_option('kalimantan_css'); ?>" size="100" /><br />
<?php echo 'Specify the CSS for your WP G2 page. Default value is: '.get_settings('siteurl').'/wp-content/plugins/kalimantan/layout.css' ?>
</td>
</tr>
<tr><td><br/><br/><br/></td></tr>
<th width="33%" valign="top" scope="row"><?php _e('<strong>Gallery 2 Name Under WordPress:</strong>') ?> <br/></th>
<td>
<input name="kalimantan_g2" type="text" id="kalimantan_g2" value="<?php echo get_option('kalimantan_g2'); ?>" size="100" /><br />
<?php echo 'This will be the Gallery 2 access point from your WordPress 1.5 (i.e. <code>http://your homepage/wordpress/gallery.php</code>). If you rename the access point file to something else (i.e <code>album.php</code>), you need to update this setting also. ' ?>
</td>
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="<?php _e('Update Settings') ?> »" />
</p>
</form>
<?php
}
else {
update_option('kalimantan_realpath', $_POST['kalimantan_realpath']);
update_option('kalimantan_g2', $_POST['kalimantan_g2']);
update_option('kalimantan_css', $_POST['kalimantan_css']);
$diff_uri = parse_url($g2_uri);
if ($_POST['kalimantan_g2_uri'] != $_SERVER['HTTP_HOST'])
{
update_option('kalimantan_g2_uri', $_POST['kalimantan_g2_uri']);
}
echo "<strong>Done</strong>. If you set it up correctly, you should see Gallery 2 images under Manage->Gallery tab";
}
?>
</div>
<?php include("admin-footer.php");?>