Location: PHPKode > scripts > Encaps Gallery > encaps-2.3.22s/admin/html/catalog_cfg.html
<script type="text/javascript">
function showhide(id_,display_)
{           
	if(display_=="none" || display_=="inline")
        	document.getElementById(id_).style.display = display_;
	else if (document.getElementById(id_).style.display != "none")             
     		document.getElementById(id_).style.display = "none";                   
	else                                                                       
        	document.getElementById(id_).style.display = "inline";                 
}                    
</script> 
<?php if (@$config['admin_uname'] == '' && $config['admin_passwd'] == '')
	Misc::_show_message_color('Admin authentication parameters are empty','RED');
?>
<div align="center">
<form enctype="multipart/form-data" action="" method="post" >
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<table class="block">
<tr>
	<th colspan="2">Configure Encaps:</th>
</tr>

<tr>
	<th >Database:</th>
	<th></th>
</tr>

<tr >
	<td >Database host (DNS name or IP address):</td>
	<td><INPUT name="db_host" type="text" value="<?php echo $config["db_host"]?>"></td>
</tr>

<tr>
	<td >Database user:</td>
	<td><INPUT name="db_user" type="text" value="<?php echo $config["db_user"]?>"></td>
</tr>

<tr>
	<td >Database password:</td>
	<td><INPUT name="db_pass" type="text" value="<?php echo $config["db_pass"]?>"></td>
</tr>

<tr>
	<td >Database name:</td>
	<td><INPUT name="db_name" type="text" value="<?php echo $config["db_name"]?>"></td>
</tr>

<tr>
	<td >Tables prefix (optional):</td>
	<td><INPUT name="db_prefix"  type="text" value="<?php echo $config["db_prefix"]?>"></td>
</tr>

<tr>
	<th >Common:</th>
	<th></th>
</tr>

<tr>
	<td >Pagination (num. of items per page): </td>
	<td><INPUT name="pagination" size="3" type="text" value="<?php echo $config['pagination']?>" >(0 - unlimited)</td>
</tr>
<tr>
	<td >WebRoot URL (where your catalog is visible on the Web): </td>
	<td><INPUT name="url_root" type="text" value="<?php echo $config['url_root']?>" size="50"></td>
</tr>

<tr>
	<th >Admin:</th>
	<th></th>
</tr>

<tr>
	<td >Username:</td>
	<td><input type="text" name="admin_uname" value="<?php echo $config["admin_uname"]?>" <?php echo ($config["admin_uname"]=="")?"style=\"border:1px solid red\"":""; ?>></td>
</tr>

<tr>
	<td >Password:</td>
	<td><input type="text" name="admin_passwd" value="<?php echo $config["admin_passwd"]?>" <?php echo ($config["admin_passwd"]=="")?"style=\"border:1px solid red\"":""; ?>></td>
</tr>

<tr>
	<td >E-mail:</td>
	<td><input type="text" name="admin_email" value="<?php echo $config["admin_email"]?>" ></td>
</tr>

<tr>
	<th >Image upload:</th>
	<th></th>
</tr>
<tr>
	<td >Resize uploaded images (gif,jpeg,png) to:</td>
	<td><input name="file_size" size="3" type="text" value="<?php echo $config['file_size']?>" >px (0 - don't resize, keep original widht&height)</td>
</tr>
<tr>
	<td >Thumbnail:</td>
	<td>
		<INPUT name="file_thumb_size" size="3" type="text" value="<?php echo $config['file_thumb_size']?>" >px

		<select name="file_thumb_type">
		<option value="w_or_h" <?php if($config['file_thumb_type']=="w_or_h")echo"selected";?> >width or height</option>
		<option value="w_and_h" <?php if($config['file_thumb_type']=="w_and_h")echo"selected";?>>width and height</option>
		<option value="w" <?php if($config['file_thumb_type']=="w")echo"selected";?>>width</option>
		<option value="h" <?php if($config['file_thumb_type']=="h")echo"selected";?>>height</option>
		</select>

	</td>
</tr>

<tr>
	<th >Shopcart:</th>
	<th valign="middle">
	<table cellpadding="0" cellspacing="0"><tr><th><input type="checkbox" name="shopcart_is_enabled" id="shopcart_is_enabled" <?php if($config["shopcart_is_enabled"]=="1")echo "checked";?> 
	></th><th><label for="shopcart_is_enabled">enabled?</label></th></tr></table></th>
</tr>

<tr >
	<td id="id_shopcart1" style="text-align:center; vertical-align:top"><input type="radio" name="shopcart_type" value="" <?php if($config['shopcart_type']=="")echo"checked";?> ><strong>Pay on delivery</strong>
	<br>No paygateway integration, <br>
just receive e-mail notification about selected items
	</td>
	<td id="id_shopcart2" style="text-align:center; vertical-align:top"><input type="radio" name="shopcart_type" value="paypal" <?php if($config['shopcart_type']=="paypal")echo"checked";?>><strong>PayPal</strong>

	<br>Instant Payment Notification (IPN) URL: <?php echo $config["url_root"]?>shopcart_ipn.php
	<br><input type="checkbox" name="shopcart_paypal_sandbox" value="<?php echo $config["shopcart_paypal_sandbox"]?>" <?php if($config["shopcart_paypal_sandbox"]=="1")echo"checked"?>>Test mode (sandbox)
	</td>
</tr>

<tr>
	<th >Watermark:</th>
	<th valign="middle">
	<table cellpadding="0" cellspacing="0"><tr><th><input type="checkbox" name="watermark_is_enabled" id="watermark_is_enabled" <?php if($config["watermark_is_enabled"]=="1")echo "checked";?> 
	></th><th><label for="watermark_is_enabled"> enabled?</label></th></tr></table></th>
</tr>
<tr>
	<td id="id_watermark1">Type:</td>
	<td id="id_watermark2">
	<table width="100%"><tr>
		<td valign="top"><input type="radio" name="watermark_type" value="text" <?php if($config['watermark_type']=="text")echo"checked";?>>text
			<br><INPUT name="watermark_text" type="text" value="<?php echo $config['watermark_text']?>"  >
		</td>
		<td valign="top">
			<input type="radio" name="watermark_type" value="image" <?php if($config['watermark_type']=="image")echo"checked";?> >image
			<br><INPUT name="watermark_image" type="file"  >
			<br><span style=" background-color:#CCCCCC"><img src="../rwx/<?php echo $config['watermark_image']?>" style="border:1px dashed gray"></span>
		</td>
	</tr></table>
	</td>
</tr>
<tr>
	<td id="id_watermark3">Location:</td>
	<td id="id_watermark4"><select name="watermark_location">
		<option value="topleft" <?php if($config['watermark_location']=="topleft")echo"selected";?> >topleft</option>
		<option value="topright" <?php if($config['watermark_location']=="topright")echo"selected";?> >topright</option>
		<option value="center" <?php if($config['watermark_location']=="center")echo"selected";?> >center</option>
		<option value="bottomleft" <?php if($config['watermark_location']=="bottomleft")echo"selected";?> >bottomleft</option>
		<option value="bottomright" <?php if($config['watermark_location']=="bottomright")echo"selected";?> >bottomright</option>
	</select></td>
</tr>
<tr>
	<td id="id_watermark5">Margin:</td>
	<td id="id_watermark6"><input type="text" name="watermark_margin" value="<?php echo $config["watermark_margin"]?>" size="3">px</td>
</tr>

<tr>
	<th colspan="2"><INPUT type="submit" value="Submit"></th>
</tr>

</TABLE>
<INPUT type="hidden" name="action" value="config_update">
</form>
</div>
<?php if($config["shopcart_is_enabled"]!=1){ ?>
	<script type="text/javascript">showhide('id_shopcart1','none');showhide('id_shopcart2','none');</script><?php 
} ?>
<?php if($config["watermark_is_enabled"]!=1){ ?>
	<script type="text/javascript">
	showhide('id_watermark1','none');
	showhide('id_watermark2','none');
	showhide('id_watermark3','none');
	showhide('id_watermark4','none');
	showhide('id_watermark5','none');
	showhide('id_watermark6','none');

	</script><?php 
} ?>
Return current item: Encaps Gallery