Tak tak fik det til at virke.. Men nu er der kommet et andet problem..
Den skriver det her hvergang jeg oploader noget.
Warning: getimagesize(Files_Icons/1241461644.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /var/www/virtual/w2u3/mizou.dk/public_html/ProFolio/index.php on line 811
<?
include("config.php");
$info_query = mysql_query("SELECT * FROM ".$prefix."ProFolio_info ORDER BY id DESC LIMIT 0,1");
if(mysql_num_rows($info_query) < 1){
$red = "Location: install.php";
header($red);
die();
}
while($info_row = mysql_fetch_array($info_query)){
//Login Information
$username = $info_row['username'];
$password = $info_row['password'];
//Specific Variables
$info_id = $info_row['id'];
$firstname = html_entity_decode($info_row['firstname']);
$lastname = html_entity_decode($info_row['lastname']);
$email = html_entity_decode($info_row['email']);
$phone = html_entity_decode($info_row['phone']);
$about_page = html_entity_decode($info_row['page_about']);
$contact_page = html_entity_decode($info_row['page_contact']);
$sitename = ucwords(strtolower($firstname)).' '.ucwords(strtolower($lastname));
}
//You can change these headings below. They will affect the words that show up on the lefthand side links.
$link1 = "home";
$link2 = "portfolio";
$link3 = "about";
$link4 = "contact";
//Login System - For Security Reasons, Do Not Change The Following Unless Your Know What You're Changing
$LOGGEDIN = 'no';
$username = trim(strtolower($username));
$password = trim(strtolower($password));
if($_GET['logout'] == 'yes'){
setcookie("PFlogin", "", mktime(12,0,0,1, 1, 1000));
setcookie("PFpassw", "", mktime(12,0,0,1, 1, 1000));
$self = "Location: ".str_replace("?logout=yes", "", $_SERVER['REQUEST_URI']);
header( "$self" );
}
if(isset($_COOKIE['PFlogin']) && isset($_COOKIE['PFpassw'])){
if($_COOKIE['PFlogin'] == md5($username)){
if($_COOKIE['PFpassw'] == md5($password)){
$LOGGEDIN = 'yes';
}
}
}
if(isset($_POST['login_button'])){
$sub_username = trim(strtolower($_POST['username']));
$sub_password = trim(strtolower($_POST['password']));
if($username == $sub_username && $password == $sub_password){
$time = 86400 + time();
setcookie('PFlogin', md5($username), $time);
setcookie('PFpassw', md5($password), $time);
$LOGGEDIN = "yes";
}
}
//General Variables
$default_title = '';
$reply = '';
$show_manage = 0;
$show_settings = 0;
$show_add = 0;
$imagetypes = array("image/gif", "image/jpeg", "image/pjpeg", "image/jpg", "image/png", "image/png-x");
$image_extensions = array("jpg", "pjpeg", "png-x", "png", "jpeg", "gif");
$ok = 0;
//Show Manage if After Delete
if($_GET['s'] == 'm'){
$show_manage = 1;
}
if($_GET['s'] == 'e'){
$show_settings = 1;
}
function clean($n){
$n = trim(strip_tags($n));
$n = htmlentities($n, ENT_QUOTES);
return $n;
}
function clean_page($n){
$n = nl2br(trim($n));
$n = htmlentities($n, ENT_QUOTES);
return $n;
}
//Add To Portfolio If Set (Make sure it isn't a bot)
if(isset($_POST['add_button']) && $_POST['human'] == '' && $LOGGEDIN == 'yes'){
$show_manage = 0;
$show_add = 1;
function file_clean($n){
$n = str_replace(' ', '_', $n);
$n = str_replace("'", '', $n);
$n = str_replace('"', '', $n);
$n = str_replace('/', '', $n);
$n = str_replace('\\', '', $n);
return $n;
}
$title = clean($_POST['title']);
$type = $_POST['type'];
$file = file_clean($_FILES['file']['name']);
$file = time().'.'.end(explode(".", $file));
$file_type = strtolower($_FILES['file']['type']);
$file_tmpname = $_FILES['file']['tmp_name'];
$preview = file_clean($_FILES['preview']['name']);
$preview = time().'.'.end(explode(".", $preview));
$preview_type = strtolower($_FILES['preview']['type']);
$preview_tmpname = $_FILES['preview']['tmp_name'];
$all_types = array("image/gif", "image/jpeg", "image/pjpeg", "image/jpg", "image/png", "image/png-x", "application/x-shockwave-flash");
//Check to see if all fields were filled out
if($title == '' || $title == $default_title || $type == '' || $file == ''){
$reply = "Please give this piece a title, category and choose a file for it.";
} else {
if(!in_array($file_type, $all_types)){
$reply = "Your file's type isn't allowed.";
} else {
if(!in_array($file_type, $imagetypes) && !in_array($preview_type, $imagetypes)){
$reply = "Please select an image preview for your piece.";
}
if(in_array($file_type, $imagetypes) || in_array($preview_type, $imagetypes)){
//New Paths for files
$file_path = "Files/".$file;
if($preview != ''){
$preview_path = "Files_Previews/".$preview;
}
//Determine endings we'll use for file creations
if(!in_array($file_type, $imagetypes)){
$ending = $preview;
} else {
$ending = $file;
}
$icon_path = "Files_Icons/".$ending;
//Move Files
move_uploaded_file($file_tmpname, $file_path);
if($preview != ''){
move_uploaded_file($preview_tmpname, $preview_path);
}
//Determine if we'll use the file or preview image
if(!in_array($file_type, $imagetypes)){
$source = $preview_path;
} else {
$source = $file_path;
}
//Make Icon
include_once('Includes/thumbnail.inc.php');
list($width, $height) = getimagesize($source);
$thumb = new Thumbnail($source);
if($width > $height){
$thumb->resize(9999,150);
} else {
$thumb->resize(150,9999);
}
$thumb->cropFromCenter(120);
$thumb->crop(0,0,120,85);
$thumb->save($icon_path,100);
$thumb->destruct();
//Resize either file or preview, depending on which is the image
$thumb2 = new Thumbnail($source);
$thumb2-> resize(850,680);
if(!in_array($file_type, $imagetypes)){
$thumb2->save($preview_path,100);
move_uploaded_file($file_tmpname, $file_path);
} else {
$thumb2->save($file_path,100);
}
$thumb2->destruct();
//Insert Informaiton Into Database
$date = time();
$query = mysql_query("INSERT INTO ".$prefix."ProFolio_work (date, title, type, file, preview, icon) VALUES ('$date', '$title', '$type', '$file_path', '$preview_path', '$icon_path')");
if($query){
$title = "";
$ok = 1;
$red = "Location: index.php?add=$title";
header($red);
} else {
$reply = "There was a problem inserting the information into the database.";
}
}
}
}
$default_title = $title;
}
if($_GET['add'] != ''){
$reply = "<b>".$_GET['add']."</b> was add to your portfolio!";
}
//Delete From Portfolio If Set
if($_GET['f'] == 'de' && $LOGGEDIN == 'yes'){
$id = mysql_real_escape_string($_GET['i']);
if($id > 0){
$query = mysql_query("SELECT file, icon, preview FROM ".$prefix."ProFolio_work WHERE id = $id");
while($row = mysql_fetch_array($query)){
$file = $row['file'];
$preview = $row['preview'];
$icon = $row['icon'];
}
if(file_exists($file)){
unlink($file);
}
if(file_exists($preview)){
unlink($preview);
}
if(file_exists($icon)){
unlink($icon);
}
mysql_query("DELETE FROM ".$prefix."ProFolio_work WHERE id = '$id'");
$red = "Location: index.php?s=m";
header($red);
}
}
//Edit Portfolio Items If Set
if(isset($_POST['editButton'])){
if($LOGGEDIN == 'yes'){
$edit_id = clean($_POST['id']);
$edit_title = clean($_POST['title_form']);
$exists = mysql_num_rows(mysql_query("SELECT title FROM ".$prefix."ProFolio_work WHERE id = '$edit_id'"));
if($exists == 1){
if($edit_title != ''){
mysql_query("UPDATE ".$prefix."ProFolio_work SET title = '$edit_title' WHERE id = '$edit_id'");
$show_manage = 1;
}
}
}
}
//Reorder Portfolio Items If Set
if($_GET['f'] == 'up' && $LOGGEDIN == 'yes'){
$show_manage = 1;
$id = mysql_real_escape_string($_GET['i']);
if($id > 0){
//Find type of piece
$query = mysql_query("SELECT type FROM ".$prefix."ProFolio_work WHERE id = '$id'");
$type = mysql_fetch_assoc($query);
$type = $type['type'];
//Reorder only if others in type
if(mysql_num_rows(mysql_query("SELECT id FROM ".$prefix."ProFolio_work WHERE type = '$type' AND id > '$id'")) > 0){
//Get id of piece that current piece will switch with.
$new_query = mysql_query("SELECT id, date FROM ".$prefix."ProFolio_work WHERE type = '$type' AND id > '$id' ORDER BY id ASC LIMIT 0, 1");
while($row = mysql_fetch_assoc($new_query)){
$new_id = $row['id'];
}
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '0' WHERE id = '$id'");
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '$id' WHERE id = '$new_id'");
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '$new_id' WHERE id = '0'");
$red = "Location: index.php?s=m";
header($red);
}
}
}
if($_GET['f'] == 'dwn' && $LOGGEDIN == 'yes'){
$show_manage = 1;
$id = mysql_real_escape_string($_GET['i']);
if($id > 0){
//Find type of piece
$query = mysql_query("SELECT type FROM ".$prefix."ProFolio_work WHERE id = '$id'");
$type = mysql_fetch_assoc($query);
$type = $type['type'];
//Reorder only if others in type
if(mysql_num_rows(mysql_query("SELECT id FROM ".$prefix."ProFolio_work WHERE type = '$type' AND id < '$id'")) > 0){
//Get id of piece that current piece will switch with.
$new_query = mysql_query("SELECT id, date FROM ".$prefix."ProFolio_work WHERE type = '$type' AND id < '$id' ORDER BY id DESC LIMIT 0, 1");
while($row = mysql_fetch_assoc($new_query)){
$new_id = $row['id'];
}
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '0' WHERE id = '$id'");
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '$id' WHERE id = '$new_id'");
mysql_query("UPDATE ".$prefix."ProFolio_work SET id = '$new_id' WHERE id = '0'");
$red = "Location: index.php?s=m";
header($red);
}
}
}
//Edit Settings And Information If Set
if(isset($_POST['change_settings']) && $LOGGEDIN == 'yes'){
$new_username = clean($_POST['username']);
$new_password = clean($_POST['new_password']);
$confirm_password = clean($_POST['confirm_password']);
$new_firstname = clean($_POST['firstname']);
$new_lastname = clean($_POST['lastname']);
$new_email = clean($_POST['email']);
$new_phone = clean($_POST['phone']);
$new_aboutpage = clean_page($_POST['about_page']);
$new_contactpage = clean_page($_POST['contact_page']);
$relogin = 0;
$show_settings = 1;
if($new_username != clean($username) && $new_username != ''){
mysql_query("UPDATE ".$prefix."ProFolio_info SET username = '$new_username' WHERE id = '$info_id'");
$relogin = 1;
}
if($new_password != clean($password) && $new_password != ''){
if( $new_password == $confirm_password){
mysql_query("UPDATE ".$prefix."ProFolio_info SET password = '$new_password' WHERE id = '$info_id'");
$relogin = 1;
} else {
$reply = 'Your new passwords didn\'t match. Enter the exact same password in the "new password" field and "confirm password" field.<br />';
}
}
if($relogin == 1){
$reply = "<br />You now need to re-login in order for your new username/password to take effect.<br /><span style='color:#999;'>You are now being logged out...</span>";
$reply .= '<meta http-equiv="refresh" content="4">';
$show_settings = 0;
}
if($new_email != clean($email)){
mysql_query("UPDATE ".$prefix."ProFolio_info SET email = '$new_email' WHERE id = '$info_id'");
}
if($new_phone != clean($phone)){
mysql_query("UPDATE ".$prefix."ProFolio_info SET phone = '$new_phone' WHERE id = '$info_id'");
}
if($about_page != $new_aboutpage){
mysql_query("UPDATE ".$prefix."ProFolio_info SET page_about = '$new_aboutpage' WHERE id = '$info_id'");
}
if($contact_page != $new_contactpage){
mysql_query("UPDATE ".$prefix."ProFolio_info SET page_contact = '$new_contactpage' WHERE id = '$info_id'");
}
if($new_firstname != clean($firstname)){
mysql_query("UPDATE ".$prefix."ProFolio_info SET firstname = '$new_firstname' WHERE id = '$info_id'");
}
if($new_lastname != clean($lastname) && $new_lastname != ''){
mysql_query("UPDATE ".$prefix."ProFolio_info SET lastname = '$new_lastname' WHERE id = '$info_id'");
}
if($relogin == 1){
$reply = "<br />You now need to re-login in order for your new username/password to take effect.<br /><span style='color:#999;'>You are now being logged out...</span>";
$reply .= '<meta http-equiv="refresh" content="4">';
$show_settings = 0;
}
//Re-query database to get updated information for display
$info_query = mysql_query("SELECT * FROM ".$prefix."ProFolio_info ORDER BY id DESC LIMIT 0,1");
while($info_row = mysql_fetch_array($info_query)){
//Login Information
$username = $info_row['username'];
$password = $info_row['password'];
//Specific Variables
$firstname = html_entity_decode($info_row['firstname']);
$lastname = html_entity_decode($info_row['lastname']);
$email = html_entity_decode($info_row['email']);
$phone = html_entity_decode($info_row['phone']);
$about_page = html_entity_decode($info_row['page_about']);
$contact_page = html_entity_decode($info_row['page_contact']);
$sitename = ucfirst(strtolower($firstname)).' '.ucfirst(strtolower($lastname));
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ProFolio of <? echo ucwords($sitename); ?></title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
<? if($ok != 1){ ?>
$(".left_column").fadeIn(1000);
//Show Home Box when page loads
focusCurrent("div.side_links a","div#box1");
<? } ?>
//Clicking On Links - Fade Out All .main Divs, delay everything for 500 ms, Fade Links to half opacity, Fade In Current Link, Fade In Current Content Box
var fadeable = 1;
function hidePlinks(){
$("div.side_links_mini").slideUp("slow").dequeue()
}
function fadeMains(){
$("div.main").fadeOut("slow").fadeTo(550, 1)
$(".reply").css("display", "none")
}
function fadeSideLinks(){
$("div.side_links a").fadeTo(250, .5).dequeue()
}
function focusCurrent(l,b){
$(l).fadeTo(250, 1).dequeue()
$(b).fadeIn("slow", function(){ fadeable = 1; })
}
function fadeIcons(){
$("div.icon_holder").fadeTo(250, .75);
}
$("a#link1").click(function(){
if(fadeable == 1){
fadeable = 0;
$(this).dequeue()
fadeMains()
hidePlinks()
focusCurrent("div.side_links a","div#box1")
}
})
$("a#link2").click(function(){
if(fadeable == 1){
fadeable = 0;
$(this).dequeue()
fadeMains()
fadeSideLinks()
$("div.side_links_mini").slideDown("slow")
focusCurrent("a#link2","div#box2")
}
})
$("a#link3").click(function(){
if(fadeable == 1){
$(this).dequeue()
fadeMains()
fadeSideLinks()
hidePlinks()
focusCurrent("a#link3","div#box3")
fadeable = 0;
}
})
$("a#link4").click(function(){
if(fadeable == 1){
$(this).dequeue()
fadeMains()
fadeSideLinks()
hidePlinks()
focusCurrent("a#link4","div#box4")
fadeable = 0;
}
})
$("div.login").fadeTo(1000, .65);
$("div.login").hover(
function(){
$(this).fadeTo(200, 1).dequeue();
},
function(){
$(this).fadeTo(200, .65).dequeue();
}
);
//Portfolio Subs
<?
$under_link_query = mysql_query("SELECT DISTINCT(type), type FROM ".$prefix."ProFolio_work");
while($u_row = mysql_fetch_assoc($under_link_query)){
$type = html_entity_decode($u_row['type']);
?>
$("a#link_<? echo str_replace(' ', '_', $type); ?>").click(function(){
if(fadeable == 1){
fadeable = 0;
$(this).dequeue()
fadeMains()
fadeSideLinks()
fadeIcons()
focusCurrent("a#link_<? echo str_replace(' ', '_', $type); ?>","div#box_<? echo str_replace(' ', '_', $type); ?>");
}
})
<?
}
?>
$("div.icon_holder").mouseover(function(){
$(this).fadeTo(150, 1).dequeue()
})
$("div.icon_holder").mouseout(function(){
$(this).fadeTo(300, .75).dequeue()
})
//Add To Portfolio
<? if($show_add == 1){ ?>
$(this).dequeue()
fadeMains();
hidePlinks();
fadeSideLinks();
$(".reply").css("display", "block");
<? if($ok == 0){ ?>
$("div#box_add").fadeIn("slow");
<? } ?>
<? } ?>
$("a#link_add").click(function(){
$(this).dequeue()
fadeMains()
hidePlinks()
fadeSideLinks()
$("div#box_add").fadeIn("slow");
})
$("a#link_add").focus(function(){
$("a#link_add").css("color", "#FFFFFF")
})
$("a#link_add").blur(function(){
$("a#link_add").css("color", "#BBB")
})
//Change Settings and Info
$("a#link_settings").click(function(){
$(this).dequeue()
fadeMains()
hidePlinks()
fadeSideLinks()
$("div#box_settings").fadeIn("slow");
})
$("a#link_settings").focus(function(){
$("a#link_settings").css("color", "#FFFFFF")
})
$("a#link_settings").blur(function(){
$("a#link_settings").css("color", "#BBB")
})
<? if($show_settings == 1){ ?>
hidePlinks();
fadeSideLinks();
$(".reply").css("display", "block");
$("div#box_settings").fadeIn("slow");
<? } ?>
//Manage Portfolio
$("a#link_manage").click(function(){
$(this).dequeue()
fadeMains()
hidePlinks()
fadeSideLinks()
$("div#box_manage").fadeIn("slow");
})
$("a#link_manage").focus(function(){
$("a#link_manage").css("color", "#FFFFFF")
})
$("a#link_manage").blur(function(){
$("a#link_manage").css("color", "#BBB")
})
<? if($show_manage == 1){ ?>
hidePlinks();
fadeSideLinks();
$("a#link_manage").css("color", "#FFFFFF");
$("div#box_manage").fadeIn("slow");
<? } ?>
//Editing Names of Pieces
$("span.managelist_title").click(function(){
if(editable == 1){
editable = 1;
var title = $(this).text();
title_ = title.split('(ID-EDIT-NUM)');
var id = title_[0];
//Replace with input box
$(this).replaceWith('<form name="editTitle" action="" enctype="multipart/form-data" method="post"><input name="title_form" type="text" value="' + title_[1] + '" /><input name="id" type="hidden" value="' + id + '" /><input name="editButton" class="button" type="submit" value="Edit" /></form>');
}
})
var editable = 1;
//Hide div w/id extra
$("#preview").css("display","none");
$("#type").click(function(){
if ($("#animation_select").is(":selected")){
$("#preview").slideDown("normal");
} else {
$("#preview").slideUp("normal");
}
});
//Login Box
login_shown = 1;
$("div.login a#toggle_login").click(function(){
if(login_shown == 1){
$("div.login_box").fadeIn("normal");
$("a#toggle_login").fadeTo(200, .2);
login_shown = 0;
} else {
$("div.login_box").fadeOut("normal");
$("a#toggle_login").fadeTo(200, 1);
login_shown = 1;
}
})
});
//Lightbox Viewer
$(document).ready(function(){
//When you click on something with class, lightbox, it adds the overlay and shows the file that the a href was linked to.
$(".lightbox").click(function(){
overlayLink = $(this).attr("href"); //Show What's in the link
title = $(this).attr("title"); //Grab the title
string = $(this).next(".info").text(); //Get the parent div's p which contains the date
elements = string.split("+br");
window.startOverlay(overlayLink, title, elements[0]); //Execute the lightbox
return false; //Tells the browser to not actually go to the link when clicked on the a href
});
});
$(document).ready(function(){
$(".lightboxSWF").click(function(){
overlayLink = $(this).attr("href"); //Show What's in the link
title = $(this).attr("title"); //Grab the title
string = $(this).next(".info").text(); //Get the parent div's p which contains the date
elements = string.split("+br");
window.startOverlaySWF(overlayLink, title, elements[0], elements[1], elements[2]); //Execute the lightbox
return false; //Tells the browser to not actually go to the link when clicked on the a href
});
});
//Image Lightbox
function startOverlay(overlayLink, title, date) {
//Adds the overlay layer plus the container layer, which will contain the image and text
$("body")
.append('<div class="overlay"></div><div class="container"></div>')
//Animates the transparent black sheet covering the screen
$(".overlay").animate({"opacity":"0.85"}, 450, "linear");
//Puts the image, title and date into the .container depending on browser type
if($.browser.msie){
$(".container").html('<img src="'+overlayLink+'" alt="" /><div><p>'+title+'<br /><span>'+date+'</span></p></div>');
} else {
$(".container").html('<img src="'+overlayLink+'" alt="" /><div class="caption"><p>'+title+'<br /><span>'+date+'</span></p></div>');
}
//Alows for the removal of the lightbox.
window.removeOverlay();
//Position the image accordingly.
$(".container img").load(function() {
var imgWidth = $(".container img").width() + 2; //Plus 2 for the border
var imgHeight = $(".container img").height() + 2; //Plus 2 for the border
$(".container").css({
"top": "50%",
"left": "50%",
"width": imgWidth,
"height": imgHeight,
"margin-top": -(imgHeight/2),
"margin-left":-(imgWidth/2) //Position the image in the middle of the screen.
}).animate({"opacity":"1"}, 550, "linear", function(){
$(".overlay").css({"background-image": "none"});
});
//Make necessary changes for IE
if($.browser.msie){
$(".overlay").css({"height": "150%"});
$(".container div").css({"padding-left": "6px"});
$(".container").css({"height": imgHeight + 50});
}
//Show the actual image.
$(".container div").fadeTo(2000, 1).fadeTo(1000, .001); //Hide the comment after a while.
$(".container div").hover(
function(){
$(".container div").fadeTo(300, 1).dequeue();
},
function(){
$(".container div").fadeTo(300, .001).dequeue();
}
); //Hover over the comment above.
});
}
//SWF Lightbox
function startOverlaySWF(overlayLink, title, date, widthpop, heightpop) {
var imgWidth = widthpop; //Plus 2 for the border
var imgHeight = heightpop; //Plus 2 for the border
//Adds the overlay layer plus the container layer, which will contain the image and text
$("body")
.append('<div class="overlay"></div><div class="container"></div>');
//Animates the transparent black sheet covering the screen
$(".overlay").animate({"opacity":"0.85"}, 450, "linear");
//Puts the image, title and date into the .container
$(".container").html('<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="Flash" width="'+imgWidth+'" height="'+imgHeight+'"> <param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+overlayLink+'"><param name="quality" value="high"><embed src="'+overlayLink+'" quality="high" width='+imgWidth+' height='+imgHeight+' name="Flash" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></object></div><div id="titles"><p>'+title+'<span>'+date+'</span></p></div>');
//Alows for the removal of the lightbox.
window.removeOverlay();
//Position the image accordingly.
$(".container").css({
"top": "50%",
"left": "50%",
"width": imgWidth,
"height": imgHeight,
"margin-top": -(imgHeight/2),
"margin-left":-(imgWidth/2) //Position the image in the middle of the screen.
}).animate({"opacity":"1"}, 550, "linear", function(){
$(".overlay").css({"background-image": "none"});
}); //Show the actual image.
$(".container div#titles").fadeTo(2000, 1).fadeTo(1000, .001); //Hide the comment after a while.
$(".container div#titles").hover(
function(){
$(".container div#titles").fadeTo(300, 1).dequeue();
},
function(){
$(".container div#titles").fadeTo(300, .001).dequeue();
}
); //Hover over the comment above.
}
//Remove Lightbox
function removeOverlay() {
// When the user clicks on the overlay, the lightbox goes away.
$(".overlay").click(function(){
$(".container, .overlay").animate({"opacity":"0"}, 250, "linear", function(){
$(".container, .overlay").remove();
});
});
// When the user clicks on the actual image, the lightbox goes away.
$(".container").click(function(){
$(".container, .overlay").animate({"opacity":"0"}, 250, "linear", function(){
$(".container, .overlay").remove();
});
});
}
</script>
<script type="text/javascript">
function clearDefault(el){
if(el.defaultValue==el.value)el.value=""
}
function makeDefault(el){
if(el.value=="")el.value=el.defaultValue
}
</script>
</head>
<body>
<div class="login">
<? if($LOGGEDIN == 'no'){ ?>
<a id="toggle_login" href="#">Login</a>
<div class="login_box">
<form name="login_form" action="" enctype="multipart/form-data" method="post">
<input name="username" value="Username" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
<input name="password" value="000000" type="password" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
<input name="login_button" type="submit" value="Login" />
</form>
</div>
<? } else { ?>
<a href="?logout=yes">Logout</a>
<a href="#" id="link_add"><img src="Images/add.png" border="0" alt="" width="10" height="10"/> Add To Your Portfolio</a>
<a href="#" id="link_manage"><img src="Images/manage.png" border="0" alt="" width="14" height="10"/> Manage Your Portfolio</a>
<a href="#" id="link_settings"><img src="Images/settings.png" border="0" alt="" width="10" height="10"/> Change Settings & Pages</a>
<? } ?>
<p class="clear"></p>
</div>
<div class="reply" align="center"><? echo $reply; ?></div>
<div class="wrapper">
<div class="left_column">
<h1 class="sitename">
<a href="<? echo $_SERVER['PHP_SELF']; ?>" title="<? echo $sitename; ?>"><span class="firstname"><? echo $firstname; ?></span><span class="lastname"><? echo $lastname; ?></span></a>
</h1>
<div class="side_links">
<a href="#" id="link1" class="end"><? echo $link1; ?></a>
<a href="#" id="link2"><? echo $link2; ?></a>
<div class="side_links_mini">
<?
$under_link_query = mysql_query("SELECT DISTINCT(type), type FROM ".$prefix."ProFolio_work ORDER BY type ASC");
while($u_row = mysql_fetch_assoc($under_link_query)){
$type = html_entity_decode($u_row['type']);
?>
<a href="#" id="link_<? echo str_replace(' ', '_', $type); ?>"><? echo ucfirst($type); ?></a>
<?
}
?>
</div>
<a href="#" id="link3"><? echo $link3; ?></a>
<a href="#" id="link4"><? echo $link4; ?></a>
</div>
</div>
<div class="right_column">
<div class="meta">
<h1><h2><h3><h4><strong>The Digital Portfolio of <? echo $sitename; ?></strong></h4></h3></h2></h1><br /><br />
</div>
<div id="box1" class="main">
</div>
<div id="box2" class="main">
</div>
<div id="box3" class="content_box main">
<? echo $about_page; if(empty($about_page)){ echo "There is currently no About Page."; } ?>
</div>
<div id="box4" class="content_box main">
<? echo $contact_page; ?>
<? if(trim($email) != ''){ ?>
<p> </p>
<p><a href="mailto: <? echo $email; ?>"><img src="Images/mail.png" width="14" height="10" border="0" alt="Mail: " /> <b><? echo $email; ?></b></a></p>
<? }
if(trim($phone) != ''){ ?>
<p><img src="Images/phone.png" width="14" height="13" border="0" alt="Phone: " /> <? echo $phone; ?></p>
<? } ?>
</div>
<div id="Portfolio_Boxes">
<?
$under_box_query = mysql_query("SELECT DISTINCT(type), type FROM ".$prefix."ProFolio_work");
while($u_row = mysql_fetch_assoc($under_box_query)){
$type = html_entity_decode($u_row['type']);
?>
<div id="box_<? echo str_replace(' ', '_', $type); ?>" class="main">
<div class="strip" id="strip_<? echo str_replace(' ', '_', $type); ?>">
<?
$icon_query = mysql_query("SELECT id, date, title, type, file, preview, icon FROM ".$prefix."ProFolio_work WHERE type = '$type' ORDER BY id DESC");
while($i_row = mysql_fetch_array($icon_query)){
$title = html_entity_decode($i_row['title']);
$date = $i_row['date'];
$id = $i_row['id'];
$icon = $i_row['icon'];
list($width, $height) = getimagesize($icon);
$file = $i_row['file'];
list($width2, $height2) = getimagesize($file);
$extension = strtolower(end(explode(".", $file)));
?>
<div class="icon_holder">
<a href="<? echo $file; ?>" class="<? if(!in_array($extension, $image_extensions)){ echo 'lightboxSWF'; } else { echo 'lightbox'; } ?>" title="<? echo $title; ?>"><img src="<? echo $icon; ?>" border="0" width="<? echo $width; ?>" height="<? echo $height; ?>" alt="<? echo $title; ?>" class="icon" /></a>
<p class="info"><? echo date('F j, Y', $date).'+br'.$width2.'+br'.$height2; ?></p>
</div>
<?
}
?>
<p class="clear"></p>
</div>
</div>
<?
}
?>
</div>
<? if($LOGGEDIN == 'yes'){ ?>
<div class="content_box main" id="box_add">
<div style="width:100%;">
<form name="add" action="" enctype="multipart/form-data" method="post">
<div class="form_element">
<p>Title Of Your Piece</p>
<p><input name="title" value="<? echo $default_title; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" /></p>
</div>
<div class="form_element">
<p>Category</p>
<p>
<select id="type" name="type">
<option selected="selected" value="">Please Choose A Category </option>
<option disabled="disabled"> </option>
<option value="Artwork">Artwork</option>
<option value="Identity">Identity (Logos)</option>
<option value="Illustration">Illustration</option>
<option value="Photography">Photography</option>
<option value="Web Designs">Web Designs</option>
<option value="Animation" id="animation_select">Animation (BETA)</option>
</select>
</p>
</div>
<div class="form_element">
<p>Select The Piece's File</p>
<p class="secondary_text">Allowed Filetypes: PNG, JPG, GIF, SWF</p>
<p><input name="file" type="file" /></p>
</div>
<div id="preview">
<p>Select An Image Preview For This Piece</p>
<p class="secondary_text">Allowed Filetypes: PNG, JPG, GIF</p>
<p><input name="preview" type="file" /></p>
</div>
<p class="clear"><input name="human" type="text" value="" /></p>
<div>
<p class="form_element_below"> </p>
<p align="center"><input class="button" name="add_button" type="submit" value="Add To Your Portfolio" onclick="this.value='Please Wait...'" /></p>
</div>
</form>
</div>
</div>
<div class="content_box main" id="box_manage" style="padding-bottom:80px;">
<p><strong>Click on the piece's names to edit them.</strong> You can only edit one title at once.</p>
<p> </p>
<?
$query = mysql_query("SELECT id, title, type, icon FROM ".$prefix."ProFolio_work ORDER BY type, id DESC");
$count = 1;
while($row = mysql_fetch_assoc($query)){
$id = $row['id'];
$title = html_entity_decode($row['title']);
$type = html_entity_decode($row['type']);
$icon = $row['icon'];
?>
<div class="manage_list" <? if($count == 1){ echo "style='border-top:none;'"; } ?>>
<span class="thumb"><img src="<? echo $icon; ?>" border="0" /></span>
<div class="left"><? echo $count.'. <span class="managelist_title"><span style="display:none;">'.$id.'(ID-EDIT-NUM)</span>'.$title.'</span>'; ?></div>
<div class="right">
<span><? echo $type; ?></span>
<a href="?i=<? echo $id; ?>&f=up"> <img src="Images/arrow_up.png" width="7" height="10" border="0" /> </a>
<a href="?i=<? echo $id; ?>&f=dwn"> <img src="Images/arrow_down.png" width="7" height="10" border="0" /> </a>
<a href="?i=<? echo $id; ?>&f=de" onClick="return confirm('Are you sure you\'d like to delete this piece from your Portfolio? This cannot be undone.')">Delete</a> </div>
<p class="clear"></p>
</div>
<?
$count++;
}
?>
</div>
<div class="content_box main" id="box_settings">
<form name="settings" action="" enctype="multipart/form-data" method="post">
<div>
<p>Username</p>
<input type="text" maxlength="30" name="username" value="<? echo $username; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
</div>
<div style="display:none;">
<p>Bug Pass - Catch Scripts</p>
<input type="password" maxlength="30" name="bug" value=""/>
</div>
<div>
<p>New Password</p>
<input class="new_password" type="password" maxlength="30" name="new_password" value=""/>
</div>
<div>
<p>Confirm Password</p>
<input class="new_password" type="password" maxlength="30" name="confirm_password" value=""/>
</div>
<p> </p>
<div>
<p>Your First Name</p>
<input type="text" maxlength="255" name="firstname" value="<? echo $firstname; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
</div>
<div>
<p>Your Last Name (Optional)</p>
<input type="text" maxlength="255" name="lastname" value="<? echo $lastname; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
</div>
<div>
<div>
<p>Contact Email Address (Optional)</p>
<input type="text" maxlength="255" name="email" value="<? echo $email; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
</div>
<div>
<p>Contact Phone Number (Optional)</p>
<input type="text" maxlength="255" name="phone" value="<? echo $phone; ?>" onfocus="clearDefault(this)" onblur="makeDefault(this)" />
</div>
<p> </p>
<div>
<p>About Page</p>
<textarea name="about_page"><? echo str_replace('<br />', '', $about_page); ?></textarea>
</div>
<div>
<p>Contact Page</p>
<textarea name="contact_page"><? echo str_replace('<br />', '', $contact_page); ?></textarea>
</div>
<p> </p>
<input type="submit" class="button" name="change_settings" value="Save Settings and Info" />
<p> </p>
</form>
</div>
<? } ?>
</div>
<div class="clear"></div>
</div>
<div class="meta">
<h1>Portfolio of <? echo $sitename; ?>. Powered by ProFolio.</h1>
<h2>Portfolio ProFolio Digital Portfolio of Visual Artists MyProFolio Sticktacular Productions Created By Zach Krasner</h2>
</div>
</body>
<div class="footer"><p><a href="http://myprofolio.sticktacular.com/" target="_blank"><span>Powered By</span> ProFolio</a></p></div>
</html>