<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<a href="catalog_item.php?categ_id=<?php echo (int)@$postget["categ_id"]?>">[Add more]</a>
<br>
<form enctype="multipart/form-data" action="" method="post" >
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<table border="0" class="block">
<tr><th colspan="2" style="text-align: center ">
<?php if($html["id"]["prev"]!=""){
?><a href="?id=<?php echo $html["id"]["prev"]?>" style="color:#FFFFFF ">«prev</a>
<?php }else{
?>«prev<?php }?>
|
<?php if($html["id"]["next"]!=""){
?><a href="?id=<?php echo $html["id"]["next"]?>" style="color:#FFFFFF ">next»</a>
<?php }else{
?>next»<?php }?>
</th></tr>
<tr>
<td >Title:</td>
<td><INPUT name="title" type="text" style="width: 100%;" value="<?php echo $html["item"]["title"]?>"></td>
</tr>
<tr>
<td >File:</td>
<td >
<?php
$ext = strtolower(strrchr($html["item"]["file"],'.'));
if($ext == ".swf"){?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
<?php echo ($html["item"]["file_width"])?"width=\"".$html["item"]["file_width"]."\"":""?> <?php echo ($html["item"]["file_height"])?"height=\"".$html["item"]["file_height"]."\"":""?> >
<PARAM NAME=movie VALUE="../rwx/<?php echo ($html["item"]["file"])?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="../rwx/<?php echo ($html["item"]["file"])?>" quality=high bgcolor="#FFFFFF" <?php echo ($html["item"]["file_width"])?"width=\"".$html["item"]["file_width"]."\"":""?> <?php echo ($html["item"]["file_height"])?"height=\"".$html["item"]["file_height"]."\"":""?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
<?php }else if($ext == ".mov" || $ext == ".pano"){?>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" <?php echo ($html["item"]["file_width"])?"width=\"".$html["item"]["file_width"]."\"":""?> <?php echo ($html["item"]["file_height"])?"height=\"".$html["item"]["file_height"]."\"":""?> codebase="http://www.apple.com/qtactivex/qtplugin.cab" id="qtvrObject">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="pluginspage" value="http://www.apple.com/quicktime/download/indext.html">
<param name="target" value="myself">
<param name="type" value="video/quicktime">
<param name="src" value="../rwx/<?php echo $html["item"]["file"]?>">
<embed src="../rwx/<?php echo $html["item"]["file"]?>" <?php echo ($html["item"]["file_width"])?"width=\"".$html["item"]["file_width"]."\"":""?> <?php echo ($html["item"]["file_height"])?"height=\"".$html["item"]["file_height"]."\"":""?> autoplay="true" controller="true" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html" target="myself" type="video/quicktime" name="qtvrObject" EnableJavaSript="true" ></embed>
</object>
<?php } else if($ext == ".jpg" || $ext == ".jpeg" || $ext == ".png" || $ext == ".gif"){?>
<IMG src="../rwx/<?php echo $html["item"]["file"]?>" <?php echo ($html["item"]["file_width"])?"width=\"".$html["item"]["file_width"]."\"":""?> <?php echo ($html["item"]["file_height"])?"height=\"".$html["item"]["file_height"]."\"":""?> alt="file" style="border:1px dashed gray">
<?php } else { ?>
<a href="../rwx/<?php echo $html["item"]["file"]?>">../rwx/<?php echo $html["item"]["file"]?></a>
<?php } ?>
<br>
<INPUT name="file" type="file" onClick="document.getElementById('thumb_auto').checked=true;showhide_thumb();">
<table>
<tr><td>width:</td><td><input type="text" size="3" name="file_width" value="<?php echo $html["item"]["file_width"]?>">px
(0 is default for .jpg, .png, .gif; for .swf, .mov, .pano please specify explicitly)</td></tr>
<tr><td>height:</td><td><input type="text" size="3" name="file_height" value="<?php echo $html["item"]["file_height"]?>">px
(0 is default for .jpg, .png, .gif; for .swf, .mov, .pano please specify explicitly)</td></tr>
<tr><td>align:</td><td><select name="file_align">
<option value="left" <?php if($html["item"]["file_align"]=="left")echo"selected"?>>left</option>
<option value="right" <?php if($html["item"]["file_align"]=="right")echo"selected"?>>right</option>
</select>
</td></tr></table>
</td>
</tr>
<tr>
<td>Thumbnail:</td>
<td>
<table><tr>
<td><IMG src="../rwx/<?php echo $html["item"]["file_thumb"]?>" alt="file_thumb" style="border:1px dashed gray"></td>
<td>
<input type="radio" name="thumb_static" id="thumb_static" checked value="Y" onClick="showhide_thumb()">static (upload a file)
<input type="file" name="file_thumb" id="file_thumb" >
<br><input type="radio" name="thumb_static" value="N" id="thumb_auto" onClick="showhide_thumb()">auto
(<?php
if( !function_exists('imagepng') && !function_exists('imagejpg') && !function_exists('imagegif'))
echo "disabled: no GD library image formats available";
else
{
echo "only for ";
if(function_exists('imagejpeg'))echo ".jpg/.jpeg";
if(function_exists('imagepng'))echo " .png";
if(function_exists('imagegif'))echo " .gif";
}
?>)
<script type="text/javascript">
function showhide_thumb()
{
if(document.getElementById("thumb_static").checked)
document.getElementById("file_thumb").style.visibility = "visible";
else
document.getElementById("file_thumb").style.visibility = "hidden";
}
showhide_thumb();
</script>
</td>
</tr></table>
align:<select name="file_thumb_align">
<option value="left" <?php if($html["item"]["file_thumb_align"]=="left")echo"selected"?>>left</option>
<option value="right" <?php if($html["item"]["file_thumb_align"]=="right")echo"selected"?>>right</option>
</select>
</td>
</tr>
<tr >
<td>Intro:</td>
<td><textarea name="comment" cols="50" rows="5" style="width: 100%;"><?php echo stripslashes($html["item"]["comment"])?></textarea></td>
</tr>
<tr>
<td >Description:</td>
<td ><textarea cols="80" rows="24" class="ckeditor" id="description" name="description"><?php echo stripslashes($html["item"]["description"])?></textarea>
</td>
</tr>
<tr>
<td >Category::</td>
<td >
<?php
function category_parse_($_categories,$_nbsp,$categ_id_)
{
$postget = $_POST?$_POST:$_GET;
foreach($_categories as $_category)
{
?><option value="<?php echo $_category['id']?>" <?php echo ($_category['id']==$categ_id_)?"selected":"";?> ><?php echo $_nbsp.$_category['title']?></option>
<?php if(count($_category['childs']))
category_parse_($_category['childs'],$_nbsp.$_nbsp,$categ_id_);
}
}
?>
<select name="categ_id" >
<option value="0">/</option>
<?php category_parse_($html['categs']," ",$html["item"]["categ_id"]?$html["item"]["categ_id"]:@$postget["categ_id"])?>
</select>
</td>
</tr>
<?php if($config["shopcart_is_enabled"]=="1"){?>
<tr>
<td >Price</td>
<td ><input type="text" name="price" value="<?php echo $html["item"]["price"]?>" size="3"></td>
</tr>
<?php } ?>
<tr>
<td >Enabled?</td>
<td ><input type="checkbox" name="is_enabled" <?php if($html["item"]["is_enabled"]=="1" || !isset($html["item"]["is_enabled"]))echo "checked";?>></td>
</tr>
<tr>
<th colspan="2" ><INPUT type="submit" value="Submit"></th>
</tr>
</TABLE>
<INPUT type="hidden" name="action" value="catalog_items_update_submit">
<INPUT type="hidden" name="id" value="<?php echo $html["item"]["id"]?>">
</form>
<br>
<a href="catalog_item.php?categ_id=<?php echo (int)@$postget["categ_id"]?>">[Add more]</a>