} else { $new_height = $icon_width; $ratio = $new_height/$the_size[1]; $new_width = $the_size[0] * $ratio; } $dst_img = ImageCreateTrueColor($new_width, $new_height); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, imagesx($src_img), imagesy($src_img)); imagejpeg($dst_img, $path . "i_" . $lnew_image_name, $thumb_quality); imagedestroy($src_img); imagedestroy($dst_img); //ADDED IN PS350 TO CLEANUP DATA ENTRY $lprice = price_cleanup($lprice); $sql2 = "INSERT INTO uploaded_images (reference,reference_id,filename,price,quality,quality_order,added,price_contact,original) VALUES ('$reference','$last_id','$lnew_image_name','$lprice','$lquality','$lquality_order','$added','$price_contact1','$loriginal')"; $result2 = mysql_query($sql2); unset($lnew_image_name); unset($new_width); unset($new_height); unset($lnew_width); unset($lnew_height); //unset($the_size); } } }
/*-----------------------------------------------------------------------------------------------------------------------*/ /* SAVE PHOTO DETAILS */ /*-----------------------------------------------------------------------------------------------------------------------*/ /* UPDATE IMAGE DETAILS */ /*-----------------------------------------------------------------------------------------------------------------------*/ /* SAVE PHOTO DETAILS */ /*-----------------------------------------------------------------------------------------------------------------------*/ /* UPDATE IMAGE DETAILS */ case "update_image_details": // Register globals bypass $price = $_POST['price']; $quality = $_POST['quality']; $quality_order = $_POST['quality_order']; $price_contact = $_POST['price_contact']; //ADDED IN PS350 TO CLEANUP DATA $price = price_cleanup($price); //SAVE DATA TO DATABASE $sql = "UPDATE uploaded_images SET price='{$price}',quality='{$quality}',quality_order='{$quality_order}',price_contact='{$price_contact}' WHERE id = " . $_POST['id']; $result = mysql_query($sql); header("location: " . $_POST['return'] . "&image_path=" . $_POST['image_path']); exit; /*-----------------------------------------------------------------------------------------------------------------------*/ /* DEFAULT */ /*-----------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------*/ /* DEFAULT */ /*-----------------------------------------------------------------------------------------------------------------------*/ default: header("location: login.php"); exit; break;
$fix_cart3 = price_cleanup($fix_cart3); $fix_cart4 = price_cleanup($fix_cart4); $fix_cart5 = price_cleanup($fix_cart5); $fix_cart6 = price_cleanup($fix_cart6); $fix_cart7 = price_cleanup($fix_cart7); $fix_cart8 = price_cleanup($fix_cart8); $fix_price1 = price_cleanup($fix_price1); $fix_price2 = price_cleanup($fix_price2); $fix_price3 = price_cleanup($fix_price3); $fix_price4 = price_cleanup($fix_price4); $tax1_name = cleanup($tax1_name); $tax1 = price_cleanup($tax1); $tax2_name = cleanup($tax2_name); $tax2 = price_cleanup($tax2); $sub_price = price_cleanup($sub_price); $sub_price_month = price_cleanup($sub_price_month); $sql = "UPDATE settings SET site_title='{$site_title}',site_tagline='{$site_tagline}',site_url='{$site_url}',support_email='{$support_email}',personal_email='{$personal_email}',site_description='{$site_description}',site_keywords='{$site_keywords}',paypal_email='{$paypal_email}',use_paypal='{$use_paypal}',use_2checkout='{$use_2checkout}',twocheck_account='{$twocheck_account}',default_price='{$default_price}',allow_subs='{$allow_subs}',sub_price='{$sub_price}',allow_subs_month='{$allow_subs_month}',sub_price_month='{$sub_price_month}',style='{$style}',show_num='{$show_num}',show_news='{$show_news}',pf_feed='{$pf_feed}',show_abanner='{$show_abanner}',abanner_name='{$abanner_name}',kaffiliate='{$kaffiliate}',allow_digital='{$allow_digital}',allow_prints='{$allow_prints}',perpage='{$perpage}',show_views='{$show_views}',thumb_width='{$thumb_width}',sample_width='{$sample_width}',dis_columns='{$dis_columns}',allow_ktools='{$allow_ktools}',use_money='{$use_money}',download_days='{$download_days}',show_preview='{$show_preview}',preview_size='{$preview_size}',fix_cart1='{$fix_cart1}',fix_cart2='{$fix_cart2}',fix_cart3='{$fix_cart3}',fix_cart4='{$fix_cart4}',fix_cart5='{$fix_cart5}',fix_cart6='{$fix_cart6}',fix_cart7='{$fix_cart7}',fix_cart8='{$fix_cart8}',fix_price1='{$fix_price1}',fix_price2='{$fix_price2}',fix_price3='{$fix_price3}',fix_price4='{$fix_price4}',tax1='{$tax1}',tax2='{$tax2}',tax_total='{$tax_total}',tax1_name='{$tax1_name}',tax2_name='{$tax2_name}',dis_title_gallery='{$dis_title_gallery}',dis_title_pri='{$dis_title_pri}',dis_title_search='{$dis_title_search}',dis_title_new='{$dis_title_new}',dis_title_popular='{$dis_title_popular}',dis_title_featured='{$dis_title_featured}',dis_filename='{$dis_filename}',hide_id='{$hide_id}',pnpid='{$pnpid}',pnpstatus='{$pnpstatus}',show_private='{$show_private}',show_watermark='{$show_watermark}',large_size='{$large_size}',hover_on='{$hover_on}',hover_usr='******',hover_feature='{$hover_feature}',hover_new='{$hover_new}',hover_popular='{$hover_popular}',hover_gallery='{$hover_gallery}',hover_pri='{$hover_pri}',hover_search='{$hover_search}',sort_by='{$sort_by}',sort_order='{$sort_order}',show_tree='{$show_tree}',show_stats='{$show_stats}',allow_sub_free='{$allow_sub_free}',no_cache='{$no_cache}',no_right_click='{$no_right_click}',debug='{$debug}',slide_type='{$slide_type}',slide_speed='{$slide_speed}',force_members='{$force_members}',force_mac='{$force_mac}',force_approve='{$force_approve}',description_length='{$description_length}',featured='{$featured}',thumb_display_quality='{$thumb_display_quality}',hover_display_quality='{$hover_display_quality}',sample_display_quality='{$sample_display_quality}',large_display_quality='{$large_display_quality}',show_watermark_thumb='{$show_watermark_thumb}',show_watermark_hover='{$show_watermark_hover}',hover_size='{$hover_size}',com_level='{$com_level}',photog_price='{$photog_price}',appc='{$appc}',photog_old_sizes='{$photog_old_sizes}',photog_new_sizes='{$photog_new_sizes}',photog_sizes_locked='{$photog_sizes_locked}',photog_upload='{$photog_upload}',photog_edit='{$photog_edit}',rate_on='{$rate_on}',member_rate='{$member_rate}',use_authorize_net='{$use_authorize_net}',api_login_id='{$api_login_id}',transaction_key='{$transaction_key}',sr_featured='{$sr_featured}',sr_gallery='{$sr_gallery}',sr_pri='{$sr_pri}',sr_new='{$sr_new}',sr_pop='{$sr_pop}',sr_search='{$sr_search}',sr_photog='{$sr_photog}',down_limit_y='{$down_limit_y}',down_limit_m='{$down_limit_m}',print_info='{$print_info}',size_info='{$size_info}',popular='{$popular}',newest='{$newest}',search='{$search}',charset='{$charset}',no_photo_message='{$no_photo_message}',mygatesupport='{$mygatesupport}',mygateid='{$mygateid}',mygateaid='{$mygateaid}',allow_contact_download='{$allow_contact_download}',sub_paypal='{$sub_paypal}',sub_2co='{$sub_2co}',sub_auth='{$sub_auth}',sub_pnp='{$sub_pnp}',sub_mygate='{$sub_mygate}',sub_cmo='{$sub_cmo}',upload_thumb_quality='{$upload_thumb_quality}',upload_sample_quality='{$upload_sample_quality}',upload_large_quality='{$upload_large_quality}',onoff='{$onoff}',dropdown='{$dropdown}',multi_lang='{$multi_lang}',lang='{$lang}',photo_dir='{$photo_dir}',video_dir='{$video_dir}',sample_dir='{$sample_dir}',sample_size='{$sample_size}',photog_upload_email='{$photog_upload_email}',photog_size_width='{$photog_size_width}',photog_size_height='{$photog_size_height}',photog_reg='{$photog_reg}',print_ship='{$print_ship}',thumb_slide_count='{$thumb_slide_count}',modrw='{$modrw}',thumb_slide_arrowcontrol='{$thumb_slide_arrowcontrol}',thumb_slide_border='{$thumb_slide_border}',thumb_slide_bordercolor='{$thumb_slide_bordercolor}',thumb_slide_bordercornerradius='{$thumb_slide_bordercornerradius}',thumb_slide_bordersize='{$thumb_slide_bordersize}',thumb_slide_builtinpreloader='{$thumb_slide_builtinpreloader}',thumb_slide_preloadercolor='{$thumb_slide_preloadercolor}',thumb_slide_easetype='{$thumb_slide_easetype}',thumb_slide_effectamount='{$thumb_slide_effectamount}',thumb_slide_effecttimein='{$thumb_slide_effecttimein}',thumb_slide_effecttimeout='{$thumb_slide_effecttimeout}',thumb_slide_rollovereffect='{$thumb_slide_rollovereffect}',thumb_slide_reverserollovereffect='{$thumb_slide_reverserollovereffect}',thumb_slide_orientation='{$thumb_slide_orientation}',thumb_slide_resizetype='{$thumb_slide_resizetype}',thumb_slide_spacing='{$thumb_slide_spacing}',thumb_slide_thumbheight='{$thumb_slide_thumbheight}',thumb_slide_thumbwidth='{$thumb_slide_thumbwidth}',thumb_slide_speed='{$thumb_slide_speed}',thumb_slide_bgcolor='{$thumb_slide_bgcolor}',pf_mousewheelflip='{$pf_mousewheelflip}',pf_autoflipseconds='{$pf_autoflipseconds}',pf_flipsound='{$pf_flipsound}',pf_flipspeed='{$pf_flipspeed}',pf_namebold='{$pf_namebold}',pf_namecolor='{$pf_namecolor}',pf_namedistance='{$pf_namedistance}',pf_nameposition='{$pf_nameposition}',pf_namesize='{$pf_namesize}',pf_namefont='{$pf_namefont}',pf_preloadset='{$pf_preloadset}',pf_hpers='{$pf_hpers}',pf_vpers='{$pf_vpers}',pf_view='{$pf_view}',pf_reflectionalpha='{$pf_reflectionalpha}',pf_reflectiondepth='{$pf_reflectiondepth}',pf_reflectiondistance='{$pf_reflectiondistance}',pf_reflectionextend='{$pf_reflectionextend}',pf_selectedreflectionalpha='{$pf_selectedreflectionalpha}',pf_showname='{$pf_showname}',pf_showreflection='{$pf_showreflection}',pf_photoheight='{$pf_photoheight}',pf_photowidth='{$pf_photowidth}',pf_selectedy='{$pf_selectedy}',pf_defaultid='{$pf_defaultid}',pf_holderalpha='{$pf_holderalpha}',pf_holderborderalpha='{$pf_holderborderalpha}',pf_holderbordercolor='{$pf_holderbordercolor}',pf_holdercolor='{$pf_holdercolor}',pf_scalemode='{$pf_scalemode}',pf_selectedscale='{$pf_selectedscale}',pf_spacing='{$pf_spacing}',pf_zoom='{$pf_zoom}',pf_zoomtype='{$pf_zoomtype}',pf_bgcolor='{$pf_bgcolor}',leftbox1='{$leftbox1}',leftbox2='{$leftbox2}',leftbox3='{$leftbox3}',leftbox4='{$leftbox4}',leftbox5='{$leftbox5}',leftbox6='{$leftbox6}',headerbox='{$headerbox}',footerbox='{$footerbox}',emailchar='{$emailchar}',flashtrans='{$flashtrans}',flashthumbs='{$flashthumbs}',flashsamples='{$flashsamples}',free_approve='{$free_approve}',flash_featured_on='{$flash_featured_on}',flash_thumb_on='{$flash_thumb_on}',photog_dir='{$photog_dir}',photog_batch_upload='{$photog_batch_upload}',private_search='{$private_search}',search_onoff='{$search_onoff}',cart_price='{$cart_price}',tos_check='{$tos_check}',tax_download='{$tax_download}',menu_click='{$menu_click}' WHERE id = '1'"; $result = mysql_query($sql); $sql = "UPDATE currency SET active=0"; $results = mysql_query($sql, $db); $sql = "UPDATE currency SET active=1 WHERE code='{$code}'"; $results = mysql_query($sql, $db); if ($error1 or $error2 or $error3 or $error4) { header("location: mgr.php?nav=0" . $error1 . $error2 . $error3 . $error4); } else { header("location: mgr.php?nav=0&message=mgr_settings_saved"); } break; /*-----------------------------------------------------------------------------------------------------------------------*/ /* DELETE FILE OR IMAGE */ /*-----------------------------------------------------------------------------------------------------------------------*/
include "config_mgr.php"; if ($_SESSION['access_type'] != "mgr") { echo "Operation cannot be performed in demo mode"; exit; } $settings_result = mysql_query("SELECT * FROM settings where id = '1'", $db); $setting = mysql_fetch_object($settings_result); switch ($_GET['pmode']) { /* SAVE PROMO CODE */ case "save_coupon_settings": if ($_SESSION['access_type'] != "mgr") { echo "Operation cannot be performed in demo mode"; exit; } //ADDED IN PS350 TO CLEANUP DATA ENTRY $amount = price_cleanup($_POST['amount']); $code = cleanup($_POST['code']); //SAVE DATA $sql = "INSERT INTO coupon (amount,percent,type,item_count,expire,quantity,code,article,display) VALUES ('{$amount}','" . $_POST['percent'] . "','" . $_POST['type'] . "','" . $_POST['item_count'] . "','" . $_POST['expire'] . "','" . $_POST['quantity'] . "','{$code}','" . $_POST['article'] . "','" . $_POST['display'] . "')"; $result = mysql_query($sql); header("location:" . $_POST['return']); exit; break; /* DELETE PROMO CODE */ /* DELETE PROMO CODE */ case "delete": $result = mysql_query("SELECT * FROM coupon", $db); while ($rs = mysql_fetch_object($result)) { if ($_POST[$rs->id] == "1") { $sql = "DELETE FROM coupon WHERE id = '{$rs->id}'"; $result2 = mysql_query($sql);