rendered paste body<?php
require_once 'include/config.inc.php';
require_once 'include/db.inc.php';
require_once 'include/session.inc.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="robots" content="all" />
<link rel="stylesheet" type="text/css" href="/css/main.css">
<link rel="stylesheet" type="text/css" href="/css/pictures.css">
<script type="text/javascript" src="/js/moo11.js"></script>
<script type="text/javascript" src="/swiff/Swiff.Base.js"></script>
<script type="text/javascript" src="/swiff/Swiff.Uploader.js"></script>
<script type="text/javascript" src="/js/image-upload.js"></script>
<script>
function readCookie(name)
{
var ca = document.cookie.split(';');
var nameEQ = name + "=";
for(var i=0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
</script>
<script type="text/javascript">
//<![CDATA[
/**
* Sample Data
*/
window.addEvent('load', function()
{
/**
* We take the first input with this class we can find ...
*/
var input = $('photoupload-filedata-1');
/**
* Simple and easy
*
* swf: the path to the swf
* container: the object is embedded in this container (default: document.body)
*
* NOTE: container is only used for the first uploader u create, all others depend
* on the same swf in that container, so the container option for the other uploaders
* will be ignored.
*
*/
var uplooad = new FancyUpload(input, {
swf: 'swiff/Swiff.Uploader.swf',
queueList: 'photoupload-queue',
container: $E('h1')
});
/**
* We create the clear-queue link on-demand, since we don't know if the user has flash/javascript.
*
* You can also create the complete xhtml structure thats needed for the queue here, to be sure
* that its only in the document when the user has flash enabled.
*/
$('photoupload-status').adopt(new Element('a', {
href: 'javascript:void(null);',
events: {
click: uplooad.clearList.bind(uplooad, [false])
}
}).setHTML('Clear Completed'));
/**
* Second, this one uses the already injected swf embed to upload files.
*/
var uplooad2 = new FancyUpload($('photoupload2-filedata-1'), {
swf: 'swiff/Swiff.Uploader.swf',
queueList: 'photoupload-queue-2'
});
});
//]]>
</script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/IEhacks.css">
<![endif]-->
<title>Track your workout & diet plans for free!</title>
<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<style type="text/css">
/**
* You don't need this css part, scroll down ;)
*/
.halfsize
{
width: 48%;
margin-right: 5px;
float: left;
}
form div.label,
form div.note,
form div.footer
{
clear: both;
margin: 1em 0 0 0;
padding: 0.1em 0.3em;
}
form div.note
{
margin-left: .5em;
}
input.submit
{
font-weight: bold;
color: #333;
width: auto;
padding-right: 6px;
padding-left: 6px;
}
/**
* Thats the basic css needed for the upload bars
*/
.photoupload-queue
{
list-style: none;
}
.photoupload-queue li
{
background: url(images/photo_upload.png) no-repeat 0 5px;
padding: 5px 0 5px 22px;
}
.photoupload-queue .queue-file
{
font-weight: bold;
}
.photoupload-queue .queue-size
{
color: #aaa;
margin-left: 1em;
font-size: 0.9em;
}
.photoupload-queue .queue-loader
{
position: relative;
margin: 3px 15px;
font-size: 0.9em;
background-color: #ddd;
color: #fff;
border: 1px inset #ddd;
}
.photoupload-queue .queue-subloader
{
text-align: center;
position: absolute;
background-color: #81B466;
height: 100%;
width: 0%;
left: 0;
top: 0;
}
.photoupload-queue .input-delete
{
width: 16px;
height: 16px;
background: url(images/delete.png) no-repeat 0 0;
text-decoration: none;
border: none;
float: right;
}
</style>
</head>
<body id="www-BodyGain-com">
<form id="session" name="session">
<input name="ses_id" type="hidden" value="<?php echo $_SESSION['client_id']; ?>" />
</form>
<div id="container"><div id="header">
<?php include "header.php"; ?>
<div id="content-left">
<h2>Manage Pictures</h2>
<p class="sub_text">Add, delete and edit your pictures here!</p>
<div class="big-title-container">
<p>My Photo Albums</p>
</div>
<div id="album-left">
<form id="form1" method="post" name="form1">
<fieldset class="nonlogin" style="margin-top: 15px;">
<legend>Photo Albums</legend>
<label class="album-fields" for="album_title">Album Title<br />
<input type="text" id="album_title" name="album_title" value="<?php echo $the_album['album_title']; ?>">
<input type="hidden" name="new" value="<?php if (!isset($_GET['edit_album_id'])) echo '1'; else echo '0'; ?>">
<input type="hidden" name="the_album_id" value="<?php echo $_GET['edit_album_id']; ?>">
</label>
<label class="album-fields" for="album_description">Album Description<br />
<textarea name="album_description" class="albumdesc" id="album_description"><?php echo $the_album['album_description']; ?></textarea>
</label>
<input name="" type="image" src="/images/save-album.gif" style="margin-bottom: 50px;">
</fieldset>
</form>
</div>
<div id="album-right">
<div id="album-info-title">
<p class="album-tit">Existing Album Title</p>
<p class="pictures">Pictures</p>
<p class="options">Options</p>
</div>
<?php $i = 1; foreach ($album_arr as $album) {
$query = "SELECT COUNT(*) FROM $table_pictures WHERE album_id='$album[album_id]' AND client_id='$_SESSION[client_id]'";
$pic_count = $db2->result($query);
?>
<div id="album-underline">
<p class="album-name"><?php echo $i; ?>. <?php echo $album['album_title']; ?></p>
<p class="album-pics">(<?php echo $pic_count; ?>)</p>
<p class="edit-album"><a href="/manage-pictures/?edit_album_id=<?php echo $album['album_id']; ?>">Edit Album</a></p>
<p class="delete-album"><a href="/manage-pictures/?delete_album_id=<?php echo $album['album_id']; ?>">Delete Album</a></p>
</div>
<?php $i++; } ?>
</div>
<div style="clear:both;"></div>
<div class="big-title-container">
<p>Add Picture(s)</p>
</div>
<form action="/imageuploader.php?userid=<?php echo $_SESSION['client_id']; ?>" method="post" id="photoupload" enctype="multipart/form-data">
<div class="halfsize">
<fieldset>
<legend>Select Files</legend>
<p class="click-browse"><strong>Click "Browse Images" below to select your images.</strong><br />
<span style="font-size: .9em;">(Note, you can select multiple images at once by holding CTRL).</span>
</p>
<label class="add-pics" for="all_albums">Add to Album:<br />
<select name="all_albums" id="all_albums" onChange="setCookie('album', this.value, 3);alert(readCookie(album));">
<option>Select one</option>
<?php foreach ($album_arr as $album) { ?>
<option value="<?php echo $album['album_id']; ?>"><?php echo $album['album_title']; ?></option>
<?php } ?>
</select>
</label>
<div class="label emph">
<label for="photoupload-filedata-1">
</label>
<input type="file" name="Filedata" id="photoupload-filedata-1" /><br />
</div>
</fieldset>
</div>
<div class="halfsize">
<fieldset>
<legend>Upload Queue</legend>
<div class="note" id="photoupload-status">
Check the selected files and start uploading.
</div>
<ul class="photoupload-queue" id="photoupload-queue">
<li style="display: none" />
</ul>
</fieldset>
</div>
<div class="clear"></div>
<div class="footer">
<input type="image" class="submit" src="/images/start-upload.gif" id="profile-submit" value="Start Upload"/>
</div>
</form>
</div>
<?php include "right_content.php"; ?>
</div>
<?php include "footer.php"; ?>
</div>
</body>
</html>