Location: PHPKode > projects > Uchome and Discuz > template/default/cp_album.htm
<!--{template header}-->

<!--{if $_GET['op']=='edit' || $_GET['op']=='editpic'}-->
<h2 class="title"><img src="image/app/album.gif" />Album<!--{if $album[albumname]}--> - $album[albumname]<!--{/if}--></h2>
<div class="tabs_header">
	<ul class="tabs">
		<li<!--{if $_GET['op']=='edit'}--> class="active"<!--{/if}-->><a href="cp.php?ac=album&op=edit&albumid=$albumid"><span>Edit Album</span></a></li>
		<li<!--{if $_GET['op']=='editpic'}--> class="active"<!--{/if}-->><a href="cp.php?ac=album&op=editpic&albumid=$albumid"><span>Edit Image</span></a></li>
		<li><a href="space.php?uid=$space[uid]&do=album&view=me"><span>Simple Upload</span></a></li>
		<li><a href="cp.php?ac=upload&op=flash&albumid=$albumid"><span>Bulk Upload</span></a></li>
		<li><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>
	</ul>
</div>
<!--{/if}-->

<!--{if $_GET['op'] == 'edit'}-->

<script type="text/javascript">
	function passwordShow(value) {
		if(value==4) {
			$('span_password').style.display = '';
			$('tb_selectgroup').style.display = 'none';
		} else if(value==2) {
			$('span_password').style.display = 'none';
			$('tb_selectgroup').style.display = '';
		} else {
			$('span_password').style.display = 'none';
			$('tb_selectgroup').style.display = 'none';
		}
	}
	function getgroup(gid) {
		if(gid) {
			var x = new Ajax();
			x.get('cp.php?ac=privacy&op=getgroup&gid='+gid, function(s){
				$('target_names').innerHTML += s;
			});
		}
	}
</script>
<form method="post" id="theform" name="theform" action="cp.php?ac=album&op=edit&albumid=$albumid" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<th width="80"><label for="albumname">Album Name</label></th>
		<td><input type="text" id="albumname" name="albumname" value="$album[albumname]" size="20" class="t_input" /></td>
	</tr>
	<tr>
		<th>Privacy Settings</th>
		<td>
			<select name="friend" onchange="passwordShow(this.value);">
				<option value="0"$friendarr[0]>All</option>
				<option value="1"$friendarr[1]>Friends Only</option>
				<option value="2"$friendarr[2]>Selected Friends Only</option>
				<option value="3"$friendarr[3]>Private</option>
				<option value="4"$friendarr[4]>Password Protected</option>
			</select>
			<span id="span_password" style="$passwordstyle">ÃÜÂë:<input type="text" name="password" value="$album[password]" size="10"></span>
		</td>
	</tr>
	<tbody id="tb_selectgroup" style="$selectgroupstyle">
	<tr>
		<th>Select Friends</th>
		<td><select name="selectgroup" onchange="getgroup(this.value);">
			<option value="">Select Friends</option>
			<!--{loop $groups $key $value}-->
			<option value="$key">$value</option>
			<!--{/loop}-->
			</select>Select multiple names to add to list below</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
		<textarea name="target_names" id="target_names" style="width:85%;" rows="3">$album[target_names]</textarea>
		<br>(or type friend's names separated by spaces)</td>
	</tr>
	</tbody>
	<tr>
		<th>&nbsp;</th>
		<td>
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="editsubmit" value="true" />
		<button name="submit" type="submit" class="submit" value="true">Submit</button>&nbsp;
		</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td><a href="cp.php?ac=album&op=delete&albumid=$album[albumid]" id="album_delete_$album[albumid]" onclick="ajaxmenu(event, this.id)">Delete Album</a></td>
	</tr>

</table>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>


<!--{elseif $_GET['op'] == 'editpic'}-->

<div class="notice">
Select an image for album cover. Though, System will select the newest image as Album Cover.
</div>

<!--{if $list}-->
<div class="album_list">
	<form method="post" id="theform" name="theform" action="cp.php?ac=album&op=editpic&albumid=$albumid">
	
	<table cellspacing="6" cellpadding="0">
		<!--{loop $list $value}-->
		<tr>
			<td class="album">
				<table cellspacing="0" cellpadding="0">
					<tr>
						<td width="20"><input type="checkbox" name="ids[{$value[picid]}]" value="{$value[picid]}"></td>
						<td class="image">
							<a href="$value[bigpic]" target="_blank"><img src="$value[pic]" alt="" /></a>
							<!--{if $album[albumname]}--><p style="text-align: center;"><a href="cp.php?ac=album&op=setpic&picid=$value[picid]" id="a_picid_$value[picid]" onclick="ajaxmenu(event, this.id, 0, 2000)">Set As Album Cover</a></p><!--{/if}-->
						</td>
						<td>
							<textarea name="title[{$value[picid]}]" rows="4" cols="70">$value[title]</textarea>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<!--{/loop}-->
		<tr>
			<td style="padding:10px;">
				<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')"><label for="chkall"> Select All</label>
				<input type="submit" name="editpicsubmit" value="Update Caption" class="submit" onclick="this.form.action+='&subop=update';">
				<input type="submit" name="editpicsubmit" value="Delete" class="submit" onclick="this.form.action+='&subop=delete';return ischeck('theform', 'ids')">
				<input type="submit" name="editpicsubmit" value="Move To:" class="submit" onclick="this.form.action+='&subop=move';return ischeck('theform', 'ids')">
				<select name="newalbumid">
				<!--{loop $albumlist $key $value}-->
				<!--{if $albumid != $value[albumid]}--><option value="$value[albumid]">$value[albumname]</option><!--{/if}-->
				<!--{/loop}-->
				<!--{if $albumid>0}--><option value="0">Default Album</option><!--{/if}-->
				</select>
				<br>Delete Photo Tip: If you will deleted this photo, It will also removed from  your blog, topic, delete, in case if you have shared there
			</td>
		</tr>
	</table>
	<input type="hidden" name="page" value="$page" />
	<input type="hidden" name="editpicsubmit" value="true" />
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>
</div>
<div class="page">$multi</div>
<!--{else}-->
<div class="c_form">Empty Album</div>
<!--{/if}-->


<!--{elseif $_GET['op'] == 'delete'}-->

<h1>Delete Album</h1>
<a href="javascript:hideMenu();" class="float_del" title="Close">Close</a>
<div class="popupmenu_inner">
<form method="post" id="theform" name="theform" action="cp.php?ac=album&op=delete&albumid=$albumid">
	<p>Are you sure ?, Do you want to delete selected Album?</p>
	<p>
		Album Images:
		<select name="moveto">
			<option value="-1">Delete</option>
			<option value="0">Move To Default Album</option>
			<!--{loop $albums $value}-->
			<option value="$value[albumid]">Move To $value[albumname]</option>
			<!--{/loop}-->
		</select>
	</p>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="deletesubmit" value="true" />
		<button name="submit" type="submit" class="submit" value="true">Submit</button>&nbsp;
	</p>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $_GET['op'] == 'edittitle'}-->

<h1>Modify Description</h1>
<a href="javascript:hideMenu();" class="float_del" title="Close">Close</a>
<div class="popupmenu_inner">
	<form id="titleform" name="titleform" action="cp.php?ac=album&op=editpic&subop=update&albumid=$pic[albumid]" method="post">
		<textarea name="title[{$pic[picid]}]" cols="50" rows="7">$pic[title]</textarea>
		<p class="btn_line">
			<input type="submit" name="editpicsubmit" class="submit" value="Update">
			<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		</p>
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>
</div>

<!--{elseif $_GET[op] == 'edithot'}-->

<h1>Edit Hot Points</h1>
<a href="javascript:hideMenu();" class="float_del" title="Close">Close</a>
<div class="popupmenu_inner">
<form method="post" action="cp.php?ac=album&op=edithot&picid=$picid">
	<p class="btn_line">
		New Value£º<input type="text" name="hot" value="$pic[hot]" size="5">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="hotsubmit" value="true" />
		<input type="submit" name="btnsubmit" value="Submit" class="submit" />
	</p>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{/if}-->
<!--{template footer}-->
Return current item: Uchome and Discuz