Beispiel #1
0
function addUserToList($vars) {
	//delete them first!
	dbQuery('DELETE FROM subscriber_to_lists WHERE subscriber_id = ' . $vars['id']);
	//check if array
	if(isset($vars['lists'])) {
	  foreach($vars['lists'] as $list) {
		  $row['subscriber_lists_id'] = $list;
		  $row['subscriber_id'] = $vars['id'];
		  dbPerform('subscriber_to_lists', $row, 'insert');
	  }
  
	}
}
Beispiel #2
0
function unpauseMessage($queueID)
{
    //set status from pending to on hold!
    $row['email_queue_status'] = 'pending';
    dbPerform('email_queue', $row, 'update', 'email_queue_id=' . $queueID);
}
Beispiel #3
0
	$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");
	
	
	
}

switch($_GET['section']){ 
case 'manage':
$trail->add("Categories");
break;
case 'orders':
default:
$trail->add("Orders");
Beispiel #4
0
<?php

//used in conjuction with the gallery area
//display form to add caption and set sort order number.
include 'application.php';
if ($_POST) {
    $row['gallery_image_caption'] = $_POST['desc'] != '' ? $_POST['desc'] : '';
    $row['gallery_image_sort_order'] = $_POST['sort_order'] != '' ? $_POST['sort_order'] : 0;
    $row['gallery_image_featured'] = isset($_POST['featured']) ? 1 : 0;
    dbPerform('gallery_images', $row, 'update', 'gallery_image_id  = ' . $_POST['image_id']);
}
Beispiel #5
0
	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;
}
}

switch($_GET['section']){
case 'webpage':
default;
$trail->add("Webpage");
break;
Beispiel #6
0
			//get users access and set it to a session it will be an array of areas to which this user has access to.
			$accessValues = $user['user_access'];
			
			if(strstr($accessValues,  ",")) {
				$values = explode(',', $accessValues);
				foreach($values as $key=>$val) {
					$accessArray[] = $val;	
				}
			} else {
				$accessArray[] = $user['user_access'];
			}
			$_SESSION['access_permissions'] = $accessArray;
			
			//update last login!
			$row['user_last_login'] = time();
			dbPerform('user', $row, 'update', 'user_id = ' . $user['user_id']);
			
			redirect('manage.php'); //send user to index.php (unless they have something bookmarked =)
			
			
		} else {
			addError("Invalid username/password please try again.");
			redirect('login.php');
		}
		
	}
?>
<html>
<head>
<title>Intelligence Center :: Login</title>
<link rel="stylesheet" href="css/styles.css" />
Beispiel #7
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=podcasts");
	
	break;
		}
	break;
	}
if($_GET['action'] == 'deletepodcast') {
	if($_GET['id']) {
		$pResults = dbQuery('SELECT pod_casts_filename FROM pod_casts WHERE pod_casts_id = ' . $_GET['id']);
		$p = dbFetchArray($pResults);
Beispiel #8
0
					
					foreach($_POST['content_publisher'] as $key=>$val) {
						$access['page_content_id'] = $val;
						$access['user_id'] = $userID;
						$access['user_access_pages_type'] = 'publisher';
						dbPerform('user_access_pages', $access, 'insert');
						$access = array();
					}
				} 
			$count++;
			}
			
		}
		
		$useraccess['user_access'] = $access_values;
		dbPerform('user', $useraccess, 'update', 'user_id='.$userID);
		
		redirect(PAGE_USERS);
		
		
	break;
}

switch($_GET['section']){ 
case 'manage':
default:
$trail->add("Manage Users");
break;
case 'edit': 
$trail->add("Edit User");
break;
Beispiel #9
0
<?
include('../master.inc.php');
include('../application.php');
//this will capture and add the post data.
if(!$_SESSION['user_logged_in']){
	echo "You are not authorized to view this page";
	exit(); 
}


$row['subscriber_lists_name'] = input($_POST['subscriber_lists_name']);
$row['subscriber_lists_desc'] = input($_POST['subscriber_lists_desc']);


if($_POST['action'] == 'add') {
	$row['subscriber_lists_date_added'] = time();
	$row['subscriber_author'] = $_SESSION['userID'];
	dbPerform('subscriber_lists', $row, 'insert');
	echo "Added list successfully";
} else {
	dbPerform('subscriber_lists', $row, 'update', 'subscriber_lists_id = ' . $_POST['id']);
	echo "Updated list successfully";
}



?>
Beispiel #10
0
<?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;
}
Beispiel #11
0
							
							
							addMessage('Your message has been saved');
							redirect(PAGE_COMMUNICATION);
							
						} else {
							if($_POST['send'] == 'now'){
								//sendNewsletter($queueID);	
								$field['email_queue_release_date'] = time();//set the time to now! other wise, if it's set to go on specific date we add the time as 1:00am on that day!
							}
							dbPerform('email_queue', $field, 'insert');
							$queueID = dbInsertID();
							
							if($_POST['email_display_home']) {
								$rows['email_queue_id'] = $queueID;
								dbPerform('newsletters', $rows, 'insert');
							}
							
							
							
							addMessage('Your message has been added to the queue, you can view the queue at anytime by clicking on the Queue tab');
							redirect(PAGE_COMMUNICATION);
						}
						
						
						
	break;
	}
}
if(!$_GET['section']) {
	if(user_has_permission(18)){