<!--{template header}-->
<!--{if $topic}-->
<!--{template cp_topic_menu}-->
<!--{else}-->
<!--{if $eventid}-->
<h2 class="title"><img src="image/app/event.gif">Event- <a href="space.php?do=event&id=$eventid">$event[title]</a></h2>
<!--{else}-->
<h2 class="title"><img src="image/app/album.gif">Albums</h2>
<!--{/if}-->
<div class="tabs_header">
<!--{if $_SGLOBAL['magic']['doodle']}-->
<a id="a_doodle" class="r_option" href="magic.php?mid=doodle&showid=album_doodle&target=album_message&from=album" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />Graffiti</a>
<!--{/if}-->
<ul class="tabs">
<!--{if $albumid}-->
<li><a href="cp.php?ac=album&op=edit&albumid=$albumid"><span>Edit album</span></a></li>
<li><a href="cp.php?ac=album&op=editpic&albumid=$albumid"><span>Edit Image</span></a></li>
<!--{/if}-->
<!--{if $eventid}-->
<li$actives[js]><a href="cp.php?ac=upload&eventid=$eventid"><span>Simple upload</span></a></li>
<li><a href="space.php?do=event&id=$eventid"><span>My events</span></a></li>
<!--{else}-->
<li$actives[js]><a href="cp.php?ac=upload&albumid=$albumid"><span>Simple upload</span></a></li>
<li$actives[flash]><a href="cp.php?ac=upload&op=flash&albumid=$albumid"><span>Bulk upload</span></a></li>
<li$actives[cam]><a href="cp.php?ac=upload&op=cam&albumid=$albumid"><span>Thumbnail</span></a></li>
<li><a href="space.php?uid=$space[uid]&do=album&view=me"><span>My Album</span></a></li>
<!--{/if}-->
</ul>
</div>
<!--{/if}-->
<div class="c_form">
<!--{if $haveattachsize}-->
<div class="borderbox">
You have remaining space <strong>$haveattachsize</strong> for upload!
<!--{if $_SGLOBAL[magic][attachsize]}-->
<p>
<img src="image/magic/attachsize.small.gif" class="magicicon"/>
<a id="a_magic_attachsize" href="magic.php?mid=attachsize" onclick="ajaxmenu(event, this.id, 1)"> I would like to increase the space</a>
(You can by this props ¡°{$_SGLOBAL[magic][attachsize]}¡± to increase your space to upload more images)
</p>
<!--{/if}-->
</div><br>
<!--{/if}-->
<!--{if empty($_GET['op'])}-->
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>Select image</h2>
<p><font size="1">Please select the picture,which you want to upload from computer,<br>You can also select the bulk uploader to upload multiple picture same time</font></p>
</caption>
<tbody id="attachbodyhidden" style="display:none">
<tr>
<td>
<form method="post" id="upload" action="cp.php?ac=upload<!--{if $eventid}-->&eventid=$eventid<!--{/if}-->" enctype="multipart/form-data" target="uploadframe">
<input type="file" name="attach" size="25" style="padding:10px;" />
<span id="localfile"></span>
<input type="hidden" name="uploadsubmit" id="uploadsubmit" value="true" />
<input type="hidden" name="albumid" id="albumid" value="0" />
<input type="hidden" name="topicid" id="topicid" value="0" />
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</td>
</tr>
</tbody>
<tbody id="attachbody"></tbody>
</table>
<script>
no_insert = 1;
function a_addOption() {
var obj = $('uploadalbum');
obj.value = 'addoption';
addOption(obj);
}
function album_op(id) {
$('selectalbum').style.display = 'none';
$('creatalbum').style.display = 'none';
$(id).style.display = '';
}
</script>
<script src="source/script_upload.js" type="text/javascript"></script>
<iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
<form method="post" id="albumform" action="cp.php?ac=upload" target="uploadframe">
<table cellspacing="0" cellpadding="0" class="formtable">
<!--{if $albums}-->
<caption>
<h2>
<input type="radio" id="albumop_selectalbum" name="albumop" value="selectalbum" checked onclick="album_op(this.value);"> <label for="albumop_selectalbum">Add to existing album</label>
<input type="radio" id="albumop_creatalbum" name="albumop" value="creatalbum" onclick="album_op(this.value);"> <label for="albumop_creatalbum">Creaate new album</label>
</h2>
</caption>
<tbody id="selectalbum">
<tr><td>
<table width="100%">
<tr>
<th width="60">Select Album</th>
<td>
<select name="albumid" id="uploadalbumid">
<!--{loop $albums $value}-->
<!--{if $value['albumid'] == $_GET['albumid']}-->
<option value="$value[albumid]" selected>$value[albumname]</option>
<!--{else}-->
<option value="$value[albumid]">$value[albumname]</option>
<!--{/if}-->
<!--{/loop}-->
</select>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
<tbody id="creatalbum" style="display:none;">
<!--{else}-->
<caption>
<h2Create New Album</h2>
<input type="hidden" name="albumop" value="creatalbum">
</caption>
<tbody id="creatalbum">
<!--{/if}-->
<tr><td>
<table width="100%">
<tr>
<th width="80">Album Name</th>
<td><input type="text" class="t_input" size="20" id="uploadalbumname" name="albumname" value="My Album"></td>
</tr>
<tr>
<th>Privacy</th>
<td>
<select name="friend" id="uploadfriend" onchange="passwordShow(this.value);">
<option value="0">Public</option>
<!--{if empty($_GET[topicid])}-->
<option value="1">Friends</option>
<option value="2">Selected Friends</option>
<option value="3">Myself</option>
<option value="4">Password protected</option>
<!--{/if}-->
</select>
<span id="span_password" style="display:none;">Password: <input type="text" id="uploadpassword" name="password" value="" size="10"></span>
</td>
</tr>
<tbody id="tb_selectgroup" style="display:none;">
<tr>
<th>Selected Friends</th>
<td><select name="selectgroup" onchange="getgroup(this.value);">
<option value="">Select Friends from List</option>
<!--{loop $groups $key $value}-->
<option value="$key">$value</option>
<!--{/loop}-->
</select> Select the friends name multiple times, it will add below list.</td>
</tr>
<tr>
<th> </th>
<td>
<textarea name="target_names" id="target_names" style="width:85%;" rows="3"></textarea>
<br>(Multiple friends name can be type, use space to separate)</td>
</tr>
</table>
</td></tr>
</tbody>
<tr>
<td>
<br>
<input type="hidden" name="albumsubmit" id="albumsubmit" value="true" />
<input type="hidden" name="topicid" value="$_GET[topicid]" />
<input type="submit" name="uploadsubmit" id="btnupload" value="Start Uploading" class="submit" />
</td>
</tr>
</table>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
<form method="post" id="albumresultform" action="cp.php?ac=upload<!--{if $eventid}-->&eventid=$eventid<!--{/if}-->" class="c_form">
<input type="hidden" name="opalbumid" id="opalbumid" value="0" />
<input type="hidden" name="topicid" id="optopicid" value="0" />
<input type="hidden" name="viewAlbumid" id="viewAlbumid" value="true" />
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
<!--{elseif $_GET['op'] == 'cam'}-->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="100%" height="415">
<param name="movie" value="image/cam.swf?site=$siteurl&albumid=$_GET['albumid']" />
<param name="quality" value="high" />
<embed src="image/cam.swf?site=$siteurl&albumid=$_GET['albumid']" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="415"></embed>
</object>
<!--{else}-->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="100%" height="400">
<param name="movie" value="image/upload.swf?site=$siteurl&albumid=$_GET[albumid]&topicid=$_GET[topicid]" />
<param name="quality" value="high" />
<embed src="image/upload.swf?site=$siteurl&albumid=$_GET[albumid]&topicid=$_GET[topicid]" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="400"></embed>
</object>
<!--{/if}-->
</div>
<!--{template footer}-->