All pastes #675204 Raw Edit

Mine

public text v1 · immutable
#675204 ·published 2007-08-29 21:57 UTC
rendered paste body
<?php
	include "include.php";
	include "wpkg_functions.php";
		
	echo "<td valign=\"top\">\n";
	echo "<div class=\"main_each\">";
	
	$id = $_POST['id'];
	$name = $_POST['name'];
	$revision = $_POST['revision'];
	$priority= $_POST['priority'];
	$reboot = $_POST['reboot'];
	$execute = $_POST['execute'];
	$installcmd = $_POST['installcmd'];
	$installcmd2 = $_POST['installcmd2'];
	$installcmd3 = $_POST['installcmd3'];
	$removecmd = $_POST['removecmd'];
	$upgrademd = $_POST['removecmd'];
	$filename = "../packages/packages/" . $id . ".xml";
	
	$software='%SOFTWARE%\\';
	
	$file = fopen($filename, 'w') or die("Failed to open file $filename");
	$xmldata = '<?xml version="1.0" encoding="utf-8"?><packages><package id="'.$id.'" name="'.$name.'" revision="'.$revision.'" priority="'.$priority.'" reboot="'.$reboot.'"><install cmd="'.$installcmd.'" />';
	if($installcmd2 != $software || $installcmd2 != '') 
	{ 
		$xmldata = $xmldata . '<install cmd="'.$installcmd2.'" />';
	}
	if($installcmd3 != $software || $installcmd3!='')
	{
		$xmldata = $xmldata . '<install cmd="'.$installcmd3.'" />';
	}
	$xmldata = $xmldata . "</package></packages>";
	fwrite($file,$xmldata);
	fclose($file);
	echo "<iframe src='../packages/" . $filename . "' width='900' height='600'></iframe>";
	
	echo "</div>\n";
	echo "</td>\n";
	include "include_right_column.php";
?>