addMessage("Deleted product successfully"); redirect(PAGE_STORE."?section=products&c=".$_GET['c']); } if($_POST['action'] == 'editshipping') { $row['embryo_shipping_price'] = $_POST['embryo_shipping_price']; $row['embryo_shipping_desc'] = $_POST['embryo_shipping_desc']; $row['semen_shipping_price_1'] = $_POST['semen_shipping_price_1']; $row['semen_shipping_price_2'] = $_POST['semen_shipping_price_2']; $row['semen_shipping_desc'] = $_POST['semen_shipping_desc']; $row['semen_shipping_image'] = $_POST['semen_shipping_image']; if($_FILES['semen_shipping_image']['name'] != '') {//upload image yo! $filename = time().fixFilename($_FILES['semen_shipping_image']['name']); uploadFile($_FILES['semen_shipping_image'], $filename); makeThumbnail($filename, UPLOAD_DIR, 480, '', 'medium'); $row['semen_shipping_image'] = $filename; } dbPerform('store_shipping', $row, 'update', 'shipping_id = 1'); addMessage("Updated shipping information successfully"); redirect(PAGE_STORE."?section=shipping&action=editshipping"); }
if($_POST['email_from_new'] != "") { $field['email_queue_from'] = $_POST['email_from_new']; //add this to the fromt table $from['email_queue_from_email'] = $_POST['email_from_new']; dbPerform('email_queue_from', $from, 'insert'); } else { $field['email_queue_from'] = $_POST['email_from']; } //add to queue! $field['email_display_home'] = $_POST['email_display_home']; if($_FILES['attachment']['name'] != "") { //we are going to attach a document to the newsletter! $filename = fixFilename($_FILES['attachment']['name']); uploadAttachment($_FILES['attachment'], $filename); $field['email_queue_attachment'] = $filename; } if($_POST['email_display_home']) { //add this to the newsletter table which is displayed on the homepage! $rows['newsletter_title'] = $_POST['email_subject']; $rows['newsletter_subject'] = $_POST['email_subject']; $rows['newsletter_attachment'] = $filename; $rows['newsletter_date_added'] = time(); $rows['newsletter_content'] = $content; }
$row['pod_casts_title'] = input($_POST['pod_casts_title']); $row['pod_casts_desc'] = $_POST['pod_casts_desc']; $row['pod_casts_publish_date'] = $publishDateStart; $row['pod_casts_url'] = $_POST['pod_casts_url']; $row['pod_casts_date_updated'] = time(); $row['pod_casts_author'] = $_SERVER['user_id']; $row['pod_casts_status'] = input($_POST['pod_casts_status']); //$row['pod_casts_feature'] = $_POST['feature']; if($_POST['feature'] == '1') { //delete existing and make this one featured. dbQuery('UPDATE pod_casts SET pod_casts_feature = 0'); $row['pod_casts_feature'] = 1; } if($_FILES['file']['name'] != "" ) { //uploading flash file $filename = fixFilename($_FILES['file']['name']); uploadFile($_FILES['file'], $filename); $row['pod_casts_filename'] = $filename; } if($_POST['id'] != '') { dbPerform('pod_casts', $row, 'update', 'pod_casts_id = ' . $_POST['id']); addMessage("Updated podcast successfully"); } else { $row['pod_casts_date_added'] = time(); dbPerform('pod_casts', $row, 'insert'); addMessage("Added podcast successfully"); }
redirect(PAGE_MANAGE."?section=news"); break; case 'class': break; case 'banners': $row['banner_title'] = input($_POST['banner_title']); $row['banner_url'] = $_POST['banner_url']; $row['banner_url_target'] = $_POST['banner_url_target']; $row['banner_publish_date'] = strtotime($_POST['publish_date']); $row['banner_date_added'] = time(); $row['client_id'] = $_SESSION['client']; if($_FILES['banner']['name'] != "" ){ $filename = fixFilename($_FILES['banner']['name']); uploadBanner($_FILES['banner'], $filename); $row['banner_filename'] = $filename; } dbPerform('banners', $row, 'insert'); addMessage("Added banner successfully"); redirect(PAGE_MANAGE."?section=banners"); //upload main banner! break; } }
<?php /* This script is used with swfupload */ /* We are going to be upload and storing the gallery images /* /* Create thumbnails and return a true statement! */ include 'application.php'; if ($_FILES['Filedata']['name'] != "" && isset($_POST['gallery_id'])) { $filename = time() . fixFilename($_FILES['Filedata']['name']); uploadFile($_FILES['Filedata'], $filename); foreach ($galleryImageSizes as $name => $size) { makeThumbnail($filename, UPLOAD_DIR, $size, '', $name); } $row['gallery_id'] = $_POST['gallery_id']; $row['gallery_image_filename'] = $filename; $row['gallery_date_added'] = time(); $row['gallery_image_caption'] = ''; dbPerform('gallery_images', $row, 'insert'); $imageID = dbInsertID(); //get total images then add one for the sort order number! $imgResults = dbQuery('SELECT gallery_image_id FROM gallery_images WHERE gallery_id = ' . $_POST['gallery_id']); $count = dbNumRows($imgResults); $next = $count++; $row2['gallery_image_sort_order'] = $next; dbPerform('gallery_images', $row2, 'update', 'gallery_image_id = ' . $imageID); echo "FILEID:" . UPLOAD_DIR_URL . getThumbnailFilename($filename, 'thumb'); } else { return false; die; }