Beispiel #1
0
				if($name = $pubUser['pub_user_role']){
					$pubUser['pub_user_role'] = $key;
					$changed = true;
					break;
				}
			}
			
			if(!$changed){
				$pubUser['pub_user_role'] = '';
			}else{
				$changed = false;
			}
			
			
			//pack XML data
			$myPack = new packXML('sotfPublish');
			$myPack->addData(array_merge($mySeries,$myProg,$myUser,$pubUser));
			$myPack->toFile(PROG_DIR . $_GET['pid'] . "/XBMF/Metadata.xml");
			
			//echo "tar.sh " . PROG_DIR . $_GET['pid'] . " ../" . $_GET['pid'] . ".tgz";
			exec("tar -cvvf " . SYNC_DIR . SOTF_STATION_ID . "_" . $_GET['pid'] . ".xbmf -C " . PROG_DIR . $_GET['pid'] . " ./"); 
			chmod(SYNC_DIR . SOTF_STATION_ID . "_" . $_GET['pid'] . ".tgz",0777);
			
			
			//mark programme as published
			$db->query("UPDATE programme SET published = '" . date("Y-m-d H:i:s") . "' WHERE id = '$_GET[pid]'");
			
			
			//close window
			unset($_GET['pid']);
			unset($_GET['action']);
Beispiel #2
0
<?
	include("classes/packXML.class.php");			# include data wrapper
	$myPack = new packXML('sotfPublish');
	$myPack->addData(array());
	$myPack->toFile("progs/Metadata.xml");
	
	echo "I suppose there were no errors ;)";
?>