$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); if($width > 680 || $height > 850){ $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 = "".$_GET['add']." 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'){ $show_manage = 1; $edit_id = clean($_POST['id']); $edit_title = clean($_POST['title_form']); $edit_type = clean($_POST['type']); $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'"); } if($edit_type != ''){ mysql_query("UPDATE ".$prefix."ProFolio_work SET type = '$edit_type' WHERE id = '$edit_id'"); } } } } //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.
'; } } if($relogin == 1){ $reply = "
You now need to re-login in order for your new username/password to take effect.
You are now being logged out..."; $reply .= ''; $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)){ mysql_query("UPDATE ".$prefix."ProFolio_info SET lastname = '$new_lastname' WHERE id = '$info_id'"); } if($relogin == 1){ $reply = "
You now need to re-login in order for your new username/password to take effect.
You are now being logged out..."; $reply .= ''; $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)); } } //Customize ProFolio if set if(isset($_POST['change_customize']) && $LOGGEDIN == 'yes'){ function makeColor($n){ $n = trim($n); $n = str_replace('#', '', $n); $n = substr($n, 0, 6); $n = '#'.$n; return $n; } $show_customize = 1; $new_categories = clean($_POST['categories']); $new_firstname_color = makeColor($_POST['firstname_color']); $new_lastname_color = makeColor($_POST['lastname_color']); $new_link_color = makeColor($_POST['link_color']); $new_text_color = makeColor($_POST['text_color']); $new_bg_color = makeColor($_POST['bg_color']); $new_lb_color = makeColor($_POST['lb_color']); $new_bg_image = clean($_POST['bg_image']); $new_bg_pos = clean($_POST['bg_pos']); $new_bg_repeat = clean($_POST['bg_repeat']); if($new_categories != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET categories = '$new_categories'"); } if($new_firstname_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_firstname = '$new_firstname_color'"); } if($new_lastname_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_lastname = '$new_lastname_color'"); } if($new_link_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_links = '$new_link_color'"); } if($new_text_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_text = '$new_text_color'"); } if($new_bg_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_background = '$new_bg_color'"); } if($new_lb_color != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET color_lightbox = '$new_lb_color'"); } if($new_bg_image != 'no'){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET opt_backgroundimg = '$new_bg_image'"); } if($new_bg_pos != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET opt_backgroundpos = '$new_bg_pos'"); } if($new_bg_repeat != ''){ mysql_query("UPDATE ".$prefix."ProFolio_customize SET opt_backgroundrep = '$new_bg_repeat'"); } } } //Ending IF LOGGEDIN Bracket //Query Data for Customize $query = mysql_query("SELECT * FROM ".$prefix."ProFolio_customize ORDER BY id DESC LIMIT 0,1"); while($row = mysql_fetch_array($query)){ $categories = html_entity_decode($row['categories']); function createCategories($list){ $list = explode(',', $list); $output = ''; return $output; } $firstname_color = $row['color_firstname']; $lastname_color = $row['color_lastname']; $link_color = $row['color_links']; $text_color = $row['color_text']; $bg_color = $row['color_background']; $lb_color = $row['color_lightbox']; $bg_image = $row['opt_backgroundimg']; $bg_pos = $row['opt_backgroundpos']; $bg_repeat = $row['opt_backgroundrep']; } ?> <? echo ucwords($sitename); ?>
Login
Logout   Add To Your Portfolio   Manage Your Portfolio   Change Settings & Pages   Customize

dev/ops

The Digital Portfolio of



 

"; } if(trim($email) != ''){ ?>

Mail:  

Phone:  

<? echo $title; ?>

Title Of Your Piece

Category

Select The Piece's File

Allowed Filetypes: PNG, JPG, GIF, SWF

Select An Image Preview For This Piece

Allowed Filetypes: PNG, JPG, GIF

 

Click on the piece's names to edit them. You can only edit one piece at a time.

 

>
'.$id.'(ID-EDIT-NUM)'.$title.''; ?>

Portfolio Categories (Seperate With Commas)

 

First Name Color

Last Name Color

Link Colors

Text Color

Background Color

Lightbox Color

 

Background Image

Background Position

Background Repeat

 

 

Username

Bug Pass - Catch Scripts

New Password

Confirm Password

 

Your First Name

Your Last Name (Optional)

Contact Email Address (Optional)

Contact Phone Number (Optional)

 

About Page

Contact Page