Location: PHPKode > scripts > Photos > photos/resolve.inc.php
<?php

// This file is part of Photos
// Copyright (c) 2001-2004 Alex King
// see LICENSE.txt for more information

?>
<div class="groupBorder"<? 
if (strstr(strtolower($HTTP_SERVER_VARS["HTTP_USER_AGENT"]), "msie") != false) {
	print(" style=\"width: 100%;\"");
}
?>>
<div class="groupHeader"><?php print($lang->str("fields_different")); ?></div>
<table width="100%" cellpadding="5" cellspacing="0">
<form name="edit" action="index.php" method="post">
<input type="hidden" name="screen" value="view">
<input type="hidden" name="action" value="save">
<input type="hidden" name="id" value="<? print($image_entry->id); ?>">
<input type="hidden" name="resolve" value="1">
<?
if (isset($_REQUEST["post_action"]) && $_REQUEST["post_action"] == "add_details") {
?>
<input type="hidden" name="post_action" value="add_details">
<?
}
?>
	<tr valign="top" class="rowHeader">
		<td width="1%">&nbsp;</td>
		<td width="50%"><b><?php print($lang->str("your_data")); ?></b></td>
		<td width="1%">&nbsp;</td>
		<td width="50%"><b><?php print($lang->str("current_version")); ?></b></td>
	</tr>
<?
$row_color = 1;
function print_row_class($row_color) {
	if ($row_color % 2 == 0) {
		print("rowEven");
	}
	else {
		print("rowOdd");
	}
}
// title
if ($image_entry->title != $old_image->title) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("title")); ?></td>
		<td>
			<input type="text" name="title" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->title)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('title','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('title','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td><? print(html($old_image->title)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="title" value="<? print(addslashes($image_entry->title)); ?>">
<?
}
// description
if ($image_entry->description != $old_image->description) {
?>
	<tr valign="top" class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("description")); ?></td>
		<td>
			<textarea name="description" class="one_pixel_border" style="height: 50px; width: 100%;" wrap="virtual"><? print(html($image_entry->description)); ?></textarea>
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('description','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('description','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td>
			<textarea name="old_image_description" class="one_pixel_border" style="height: 50px; width: 100%; background: #e8e8e8;" wrap="virtual" readonly><? print(html($old_image->description)); ?></textarea>
		</td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="description" value="<? print(addslashes($image_entry->description)); ?>">
<?
}
// keywords
if ($image_entry->keywords != $old_image->keywords) {
?>
	<tr valign="top" class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("keywords")); ?></td>
		<td>
			<textarea name="keywords" class="one_pixel_border" style="height: 50px; width: 100%;" wrap="virtual"><? print(html($image_entry->keywords)); ?></textarea>
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('keywords','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('keywords','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td>
			<textarea name="old_image_keywords" class="one_pixel_border" style="height: 50px; width: 100%; background: #e8e8e8;" wrap="virtual" readonly><? print(html($old_image->keywords)); ?></textarea>
		</td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="keywords" value="<? print(addslashes($image_entry->keywords)); ?>">
<?
}
// people
if ($image_entry->people != $old_image->people) {
?>
	<tr valign="top" class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("people")); ?></td>
		<td>
			<textarea name="people" class="one_pixel_border" style="height: 50px; width: 100%;" wrap="virtual"><? print(html($image_entry->people)); ?></textarea>
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('people','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('people','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td>
			<textarea name="old_image_people" class="one_pixel_border" style="height: 50px; width: 100%; background: #e8e8e8;" wrap="virtual" readonly><? print(html($old_image->people)); ?></textarea>
		</td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="people" value="<? print(addslashes($image_entry->people)); ?>">
<?
}
// event
if ($image_entry->event != $old_image->event) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("event")); ?></td>
		<td>
			<input type="text" name="event" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->event)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('event','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('event','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td><? print($old_image->event); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="event" value="<? print(addslashes($image_entry->event)); ?>">
<?
}
// photographer
if ($image_entry->photographer != $old_image->photographer) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("photographer")); ?></td>
		<td>
			<input type="text" name="photographer" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->photographer)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('photographer','use');">&lt;- <?php print($lang->str("use")); ?></a>
		</td>
		<td><? print($old_image->photographer); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="photographer" value="<? print(addslashes($image_entry->photographer)); ?>">
<?
}
// location
if ($image_entry->location != $old_image->location) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("location")); ?></td>
		<td>
			<input type="text" name="location" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->location)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('location','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('location','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td><? print(html($old_image->location)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="location" value="<? print(addslashes($image_entry->location)); ?>">
<?
}
// state
if ($image_entry->state != $old_image->state) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("state")); ?></td>
		<td>
			<input type="text" name="state" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->state)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('state','use');">&lt;- <?php print($lang->str("use")); ?></a>
		</td>
		<td><? print(html($old_image->state)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="state" value="<? print(addslashes($image_entry->state)); ?>">
<?
}
// country
if ($image_entry->country != $old_image->country) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("country")); ?></td>
		<td>
			<input type="text" name="country" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->country)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('country','use');">&lt;- <?php print($lang->str("use")); ?></a>
		</td>
		<td><? print(html($old_image->country)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="country" value="<? print(addslashes($image_entry->country)); ?>">
<?
}
if ($image_entry->indoors != $old_image->indoors) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("in_outdoors")); ?></td>
		<td>
<?
	$temp = array(array("Indoors"
	                   ,<?php print($lang->str("indoors")); ?>
	                   )
	             ,array("Outdoors"
	                   ,<?php print($lang->str("outdoors")); ?>
	                   )
	             );
	print(get_dropdown("indoors", $temp, $image_entry->indoors, ""));
?>
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('indoors','use');">&lt;- <?php print($lang->str("use")); ?></a>
		</td>
		<td>
<? 
	print($old_image->indoors);
?>
		</td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="indoors" value="<? print($image_entry->indoors); ?>">
<?
}
// URL
if ($image_entry->URL != $old_image->URL) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("url")); ?></td>
		<td>
			<input type="text" name="URL" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->URL)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('URL','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('URL','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td><? print(html($old_image->URL)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="URL" value="<? print(addslashes($image_entry->URL)); ?>">
<?
}
// datetaken
if ($image_entry->datetaken != $old_image->datetaken) {
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("date_taken")); ?></td>
		<td>
			<input type="text" name="datetaken" class="one_pixel_border" style="width: 100%;" value="<? print(html($image_entry->datetaken)); ?>">
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('datetaken','use');">&lt;- <?php print($lang->str("use")); ?></a>
			<br>
			<a href="javascript:resolve('datetaken','append');">&lt;- <?php print($lang->str("append")); ?></a>
		</td>
		<td><? print(html($old_image->datetaken)); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="datetaken" value="<? print(addslashes($image_entry->datetaken)); ?>">
<?
}
if ($image_entry->portfolio != $old_image->portfolio) {
	if ($old_image->portfolio == 1) {
		$old_image->portfolio = '<img src="images/icon_portfolio.gif" alt="Portfolio Shot" />';
	}
	else {
		$old_image->portfolio = "";
	}
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td align="right"><?php print($lang->str("portfolio")); ?></td>
		<td>
			<input type="checkbox" name="portfolio" value="1" <? if ($image_entry->portfolio == 1) { print("checked"); } ?>>
		</td>
		<td align="center" nowrap>
			<a href="javascript:resolve('portfolio','use');">&lt;- <?php print($lang->str("use")); ?></a>
		</td>
		<td><? print($old_image->portfolio); ?></td>
	</tr>
<?
	$row_color++;
}
else {
?>
<input type="hidden" name="portfolio" value="<? print($image_entry->portfolio); ?>">
<?
}
?>
	<tr class="<? print_row_class($row_color); ?>">
		<td colspan="4"><input type="submit" value="<?php print($lang->str("save")); ?>"></td>
	</tr>
</table>
</div>
Return current item: Photos