}
	
	if(!isset($_GET['sortby'])){
		$_GET['sortby'] = 'msg_caller_number';
	}
	
	if($_GET['orderby']=='asc'){
		//
	}else{
		$sortstring .= ' DESC';
		$_GET['orderby'] = 'desc';
	}
	
	//if user has לטרג hurray!
	if($vbid > 0){
		$smarty->assign("db_result",$vdb->getAll("SELECT msg_caller_number, msg_ts, msg_id FROM vb_messages WHERE vb_id = '$vbid' ORDER BY $sortstring"));
		$smarty->assign("sortby",$_GET['sortby']);
		$smarty->assign("order",$_GET['orderby']);
	}else{
		$smarty->assign("failed",true);
	}
	
	//create help message
	//$myHelp = new helpBox(1);									# this will fetch a help message from the database and output it
																							# in the template (if allowed to do so)
														
	//page output :)
	pageFinish('voice.htm');								# enter the desired template name as a parameter
	//pageFinishPopup('noaccess.htm');					# same as above but in a popop
?>
Beispiel #2
0
			
				//create STATION USER
				$db->query("INSERT INTO user_map(auth_id,access_id,name,mail,role) VALUES('$my_new_id','$_POST[access_level]','$_POST[name]','$_POST[mail]','$_POST[role]')");
				
				//create maildirs
				//$fp = @fopen("/var/squirrel/maildir-creation/new-maildirs","a+");
  			//@fputs($fp,"$_POST[login]\n");
  			//@fclose($fp);
			
				//system("/usr/local/bin/maildirmake /home/imap/$_POST[login]");
				
				//redirect
				header("Location: confirm.php?action=1&next=users");
			}else{	# f**k, errorz :)
				$smarty->assign(array("submit_login"=>$_POST['login'],"submit_name"=>$_POST['name'],"submit_mail"=>$_POST['mail'],"submit_pass"=>$_POST['pass'],"submit_access_level"=>$_POST['access_level']));
			}
		}else{
			// NO XMLRPC INTERFACE JUST YET
		}
	}
	
	//output possible access levels
	$smarty->assign("access_levels",$db->getAssoc("SELECT id, name FROM user_access ORDER BY id"));
	
	//get roles
	include('common/getroles.inc.php');
	$smarty->assign("roles",$myroles);
		
	//page output :)	
	pageFinish('usersnew.htm');											# enter the desired template name as a parameter
?>
Beispiel #3
0
																	user_map.per_page AS submit_per_page,
																	user_access.name AS access_level
															 	FROM
															 		user_map
															 	LEFT JOIN user_access ON (user_map.access_id = user_access.id)
															 	WHERE auth_id = '" . $_SESSION['USER']->get("auth_id") . "'",DB_FETCHMODE_ASSOC));
		/*
		$smarty->assign($vdb->getRow("SELECT 
																	owner_telnr AS submit_tel, 
																	owner_pin AS submit_pin, 
																	welcome_msg AS submit_mes
															 	FROM
															 		vb_data
															 	WHERE owner_id = '" . $_SESSION['USER']->get("auth_id") . "'",DB_FETCHMODE_ASSOC));
		*/
		//check if autologin is valid
		if($db->getOne("SELECT auth_id FROM user_autologin WHERE auth_id = '$_COOKIE[auto_login_id]' AND next_key = '$_COOKIE[auto_login_key]'")){
			$smarty->assign("submit_autologin","t");
		}
	}
	
	//drop down fill											 
	$smarty->assign("per_page",array(5=>5,10=>10,15=>15,20=>20,25=>25,30=>30,35=>35,40=>40,45=>45,50=>50));
	//$smarty->assign("vbnum",$_SESSION['USER']->get("vbnum"));
	
	//create help message
	$myHelp = new helpBox(2,'90%');										# this will fetch a help message from the database and output it
																										# in the template (if allowed to do so)																						
	//page output :)	
	pageFinish('settings.htm');												# enter the desired template name as a parameter
?>
Beispiel #4
0
				}else{
					$db_result[$key]['status'] = 0;	# no audio
				}
			}
		}
	}
	$smarty->assign("db_result",$db_result);
	
	//make a split
	$smarty->assign(array("block"=>$_GET['block'],"order"=>$_GET['orderby'],"sortby"=>$_GET['sortby']));
	$mySplit = new pageSplit($_GET['block'],$total,"myseries.php",$_SESSION['USER']->get("per_page"));
	$smarty->assign("pageSplit",$mySplit->out());
	
	//get list of series of this person
	$go = $db->getAssoc("SELECT id, title FROM series WHERE owner = '$me'");
	while(list($key,$val)=each($go)){
		$new_go['myseries.php?id='.$key] = $val;
	}
	$smarty->assign(array(
													"series"=>$new_go,
													"series_selected"=>'myseries.php?id='.$_GET['id'],"id"=>$_GET['id'],
													"filter_active"=>array(0=>"Active And Inactive",1=>"Only Active",2=>"Only Inactive"),
													"filter_published"=>array(0=>"Published And Unpublished",1=>"Only Published",2=>"Only Unpublushed")
												));
	//create help message
	//$myHelp = new helpBox(3,'90%');
				
	//page output :)	
	pageFinish('myseries.htm');											# enter the desired template name as a parameter
?>
Beispiel #5
0
<?
	/****************
	* SOTF Station Management Tool
	*********************************
	* Author: Kulikov Alexey - alex@pvl.at, alex@ita-studio.com
	*********************************
	* Please bear in mind, that this software was written for _fun_ =) 
	*************************/

	/************************
	* No Access Page :: 08.11.2002
	*----------------------------------------
	* Display a No Access Page (403 Error)
	* 
	* Note: You may want to use this page as a starting point for the
	* creation of other subpages of the application.
	************************/
	include("init.inc.php");										# include the global framwork
	$myNav->add($SECTION[403],'index.php');			# add entry to Navigation Bar Stack

	//page output :)
	pageFinish('noaccess.htm');
?>
<?
	/****************
	* SOTF Station Management Tool
	*********************************
	* Author: Kulikov Alexey - alex@pvl.at, alex@ita-studio.com
	*********************************
	* Please bear in mind, that this software was written for _fun_ =) 
	*************************/

	/************************
	* Template Page Using the pre-build page generation framework
	*----------------------------------------
	* Purpose of page goes here
	************************/
	include("init.inc.php");										# include the global framwork
	$myNav->add("Series Forum",'index.php');			# add entry to Navigation Bar Stack
	//authorize('edit_station');								# check access rights
	
	//create help message
	//$myHelp = new helpBox(1);									# this will fetch a help message from the database and output it
																							# in the template (if allowed to do so)
														
	//page output :)
	pageFinish('seriesforum.htm');								# enter the desired template name as a parameter
	//pageFinishPopup('noaccess.htm');					# same as above but in a popop
?>
Beispiel #7
0
<?
	/****************
	* SOTF Station Management Tool
	*********************************
	* Author: Kulikov Alexey - alex@pvl.at, alex@ita-studio.com
	*********************************
	* Please bear in mind, that this software was written for _fun_ =) 
	*************************/

	/************************
	* Usersnew - add new users to the station admin panel
	*----------------------------------------
	* This page will allow the registration of new users to the station. This simply
	* inludes the creation of a new account.
	* 
	* 2DO - Tie to XMLRPC Interface
	************************/
	include("init.inc.php");												# include the global framwork
	include("classes/sendMail.class.php");					# include the mail sender
	$myNav->add($SECTION[CONFIRM],'users.php');			# add entry to Navigation Bar Stack
	
	$id = $_GET['action'];
	$smarty->assign("confirm_message",$CONFIRM[$id]);
	$smarty->assign("link",$_GET['next'] . ".php");
	
	//page output :)	
	pageFinish('confirm.htm');											# enter the desired template name as a parameter
?>
<?
	/****************
	* SOTF Station Management Tool
	*********************************
	* Author: Kulikov Alexey - alex@pvl.at, alex@ita-studio.com
	*********************************
	* Please bear in mind, that this software was written for _fun_ =) 
	*************************/

	/************************
	* Template Page Using the pre-build page generation framework
	*----------------------------------------
	* Purpose of page goes here
	************************/
	include("init.inc.php");										# include the global framwork
	$myNav->add($SECTION[403],'index.php');			# add entry to Navigation Bar Stack
	//authorize('edit_station');								# check access rights
	
	//create help message
$myHelp = new helpBox(1);									# this will fetch a help message from the database and output it
																							# in the template (if allowed to do so)
																							
	//page output :)
	pageFinish('noaccess.htm');									# enter the desired template name as a parameter
	//pageFinishPopup('noaccess.htm');					# same as above but in a popop
?>
														"submit_rights"					=>$_POST['rights']
														));
		}
	}else{
		//assign default timestamps
		$start_time = ceil(time() / 900) * 900;		# round time up to the closest quarter of an hour
		$smarty->assign("stime",$start_time);
		$smarty->assign("time",$start_time + 60*60);
		$smarty->assign("submit_series_owner",$_SESSION['USER']->get("auth_id"));
		$smarty->assign("submit_sotf_lang_default","eng");
	}
	
	//############### GET DATA FROM FILES ##############################################
	include('common/getdata.inc.php');
	
	//assign default data to drop down boxes
	$mySeries = $db->getAssoc("SELECT id, title FROM series WHERE owner = '" . $_SESSION['USER']->get("auth_id") . "' ORDER BY title");
	$mySeries[0] = 'New Series';
	
	$smarty->assign(array(
													"special_needs" => array(""=>$STRING['NONE'],"na"=>$STRING['NA'],"pp"=>$STRING['PP']),
													"series_owner" 	=> $db->getAssoc("SELECT auth_id, name || ': '::\"varchar\" || role AS name FROM user_map WHERE access_id < 4 ORDER BY name"),
													"sotf_lang"		=> $langs,
													"sotf_genres"	=> $mygenres,
													"sotf_topics"	=> $mytopics,
													"myseries"		=> $mySeries
												));
												
	//page output :)	
	pageFinish('programmenew.htm');									# enter the desired template name as a parameter
?>
Beispiel #10
0
			if(!$response){										# probably no connection to server
				$myError->add($ERR[2]);					# add an error to the error stack
			}else{														# we have a hit...
				//does the response have a value?														
				if($response->value()){					# user exists and is valid
					$val = xmlrpc_decode($response->value());
					
					//initialize user
					$_SESSION['USER'] = new User($val['id']);
					$_SESSION['USER']->setAll($val);
					
					//redirect
					header("Location: inside.php");
					exit;
				}else{													# user does not exist or other error has appears at server
					$myError->add($ERR[5] . ": " . $response->faultString());
				}	
			}
		}
		
		//assign posts
		$smarty->assign('user',$_POST['user']);
	}
	########################################### END PROCESS SUBMIT #################################
	
	//create help message
	$myHelp = new helpBox(1);
	
	//page output :)
	pageFinish('login.htm');
?>
	/**
	 * pageFinishPopup() - same as above, but loaded in a pop-up window
	 * 
	 * @return (echo)
	 */
	function pageFinishPopup($action,$errorReporting=TRUE){
		global $smarty, $myError;
		pageFinish($action,$errorReporting,true);
	}
<?
	/****************
	* SOTF Station Management Tool
	*********************************
	* Author: Kulikov Alexey - alex@pvl.at, alex@ita-studio.com
	*********************************
	* Please bear in mind, that this software was written for _fun_ =) 
	*************************/

	/************************
	* Present Box Page
	*----------------------------------------
	* Purpose of page goes here
	************************/
	include("init.inc.php");										# include the global framwork
	$myNav->add("Present Box",'index.php');			# add entry to Navigation Bar Stack
	authorize('edit_presentbox');								# check access rights
	
	//create help message
	//$myHelp = new helpBox(1);									# this will fetch a help message from the database and output it
																							# in the template (if allowed to do so)
																							
	//page output :)
	pageFinish('presentbox.htm');								# enter the desired template name as a parameter
	//pageFinishPopup('noaccess.htm');					# same as above but in a popop
?>
Beispiel #13
0
										series.title AS series_title,
										programme.id AS prog_id,
										programme.title AS prog_title,
										EXTRACT(EPOCH FROM programme.intime) AS intime,
										EXTRACT(EPOCH FROM programme.outtime) AS outtime,
										programme.special AS special,
										user_map.name AS owner_name FROM
										series 
										LEFT JOIN programme ON (series.id = programme.series_id)
										LEFT JOIN user_map ON (series.owner = user_map.auth_id)
										WHERE (programme.intime > '$start' AND programme.intime < '$end')
										OR (programme.outtime > '$start' AND programme.outtime < '$end')
										ORDER BY intime",DB_FETCHMODE_ASSOC);
	
	//process the resultset									 
	while(list($key,$val) = each($shows)){
		if(empty($val['prog_title'])){									# if no programme title has been specifid, take the series title
			$val['prog_title'] = $val['series_title'];
		}
		
		//add calendar blocks
		$myDay->add($val);
	}
	
	//output to smarty
	$smarty->assign('day',$myDay->out());
	//#################################### END TODAY'S SHOWS ######################################
															
	//page output :)	
	pageFinish('weekview.htm');											# enter the desired template name as a parameter
?>