[se4_repository] / trunk / website / publish.php Repository:
ViewVC logotype

View of /trunk/website/publish.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1897 - (download) (annotate)
Mon Jun 12 21:01:37 2006 UTC (6 years, 11 months ago) by kpinte
File size: 7106 byte(s)
foutje
<?
//
// THINGS TO PUBLISH
// =================
//

// Timesheets
// ----------
$users=array("tderutte" => "Tom Derutter",
"kmollema" => "Karlien Mollemans",
"ephilips" => "Eline Philips",
"kpinte" => "Kevin Pinte",
"evrijn" => "Edward van Rijn");


$xmls=array("cumul" => "all",
"01" => "week 1",
"02" => "week 2",
"03" => "week 3",
"04" => "week 4",
"05" => "week 5",
"06" => "week 6",
"07" => "week 7",
"08" => "week 8",
"09" => "week 9",
"10" => "week 10",
"11" => "week 11",
"12" => "week 12",
"13" => "week 13",
"14" => "week 14",
"15" => "week 15");



			// Reports
			// -------
			$verslagen_prefix="documents/reports/";
			$verslagen=array("verslag01" => "14/02/2006",
			"verslag02" => "17/02/2006",
			"verslag03" => "20/02/2006",
			"verslag04" => "27/02/2006",
			"verslag05" => "06/03/2006",
			"design" => "10/03/2006 Design 1",
			"verslag06" => "13/03/2006",
			"design2" => "16/03/2006 Design 2",
			"verslag07" => "20/03/2006",
			"implementation" => "24/03/2006 Implementation",
			"verslag08" => "27/03/2006",
			"verslag09" => "03/04/2006",
			"verslag10" => "11/04/2006",
			"verslag11" => "19/04/2006",
			"verslag12" => "26/04/2006",
			"verslag13" => "03/05/2006",
			"verslag14" => "10/05/2006",
			"verslag15" => "17/05/2006",
			"verslag16" => "24/05/2006");

			$unpublish_reports=array("verslag04" => false);


			// Report preparations
			// -------------------
			$preps_prefix="documents/reports/preparations/";
			$preps=array("tasks" => "Tasks",
			"meeting1" => "14/02/2006",
			"meeting2" => "17/02/2006",
			"meeting3" => "20/02/2006",
			"meeting4" => "27/02/2006",
			"meeting5" => "06/03/2006",
			"afspraken" => "afspraken",
			"meeting6" => "13/03/2006",
			"meeting7" => "20/03/2006",
			"implementation_meeting" => "24/03/2006 Implementation",
			"meeting8" => "27/03/2006",
			"meeting9" => "03/04/2006",
			"meeting10" => "11/04/2006",
			"meeting11" => "19/04/2006",
			"meeting12" => "26/04/2006",
			"meeting13" => "03/05/2006",
			"meeting14" => "10/05/2006",
			"meeting15" => "17/05/2006",
			"meeting16" => "24/05/2006");

			$unpublish_preps=array("tasks" => false, "meeting4" => false);

// Documents
// ---------


$doc_prefix="documents/";
$documents=array("template" => "Template",
				 "spmp" => "SPMP",
                 "srs" => "SRS",
				 "sdd" => "SDD (it 1)",
				 "sdd2" => "SDD (it 2)",
				 "sqap" => "SQAP",
				 "std" => "STD",
				 "scmp" => "SCMP");
					
$unpublish_docs=array("spmp" => false,
					  "srs" => false,
				 	  "sdd" => false,
				 	  "sdd2" => false,
				      "sqap" => false,
				      "std" => false,
				      "scmp" => false);
				
$conv_prefix="documents/";
$conventions=array( "ccchecklist" => "Checklist",
					"pythoncc" => "Python");

$unpublish_conv=array();

$tut_prefix="documents/";
$tutorials=array( "tutorial_python" => "Python",
									"tutorial_latex" => "LaTeX");

$unpublish_tut=array();


// Documents
// ---------


$res_prefix="documents/research/";
$research_docs=array("tderutte" => "Tom Derutter",
				 "kmollema" => "Karlien Mollemans",
                 "ephilips" => "Eline Philips",
				 "kpinte" => "Kevin Pinte",
				 "evrijn" => "Edward van Rijn",
				 "krvermei" => "Kristof Vermeir");

$unpublish_res=array("tderutte" => true,
			"kmollema" => true,
			"ephilips" => false,
			"kpinte" => true,
			"evrijn" => true,
			"krvermei" => true);
				
// ========================================				

$separate_dir=array("spmp" => "SPMP/",
					"srs" => "SRS/",
					"sdd" => "SDD/",
					"sdd2" => "SDD/",
					"sqap" => "SQAP/",
					"std" => "STD/",
					"scmp" => "SCMP/",
					"ccchecklist" => "conventions/",
					"pythoncc" => "conventions/",
					"tutorial_python" => "tutorials/",
					"tutorial_latex" => "tutorials/");


// 
// FUNCTIONS TO GENERATE TABLES
// ============================
//

function show_a_cell($prefix, $filename, $extension){
	$file=$filename . $extension;
	$link=$prefix . $file;
	if(file_exists($link)){
		echo('
			<td width="80" align="center" valign="middle" height="25">
				<a href="' . $link . '">
					<img alt="' . $file . '" src="images/doc_available.gif" width="17" height="17" border="0">
					</a>
			</td>');
	} else {
		unav_row($filename, $extension);
	}
}

function link2file($prefix, $filename, $sep_dir){
	if(array_key_exists($filename, $sep_dir)){
		$linkprefix=$prefix . $sep_dir[$filename];
	} else {
		$linkprefix=$prefix;
	}
	
	$htmlprefix=$linkprefix . $filename . "/";

	show_a_cell($linkprefix, $filename, ".ps");
	show_a_cell($linkprefix, $filename, ".pdf");
	show_a_cell($htmlprefix, $filename, ".html");
	show_a_cell($linkprefix, $filename, ".txt");
	show_a_cell($linkprefix, $filename, ".tex");
}

function reportrow($prefix, $tablekey, $filename, $sep_dir){
	echo('
		<tr>
	  		<td align="center" width="120">' . $tablekey . '</td>');
	link2file($prefix, $filename, $sep_dir);
	echo('
		</tr>');
	
}

function unav_row($filename, $extension){
	echo('<td width="80" align="center" valign="middle" height="25">
		<img alt="not available: ' . $filename . $extension . '" src="images/doc_not.gif" width="17" height="17">
	</td>');
}

function unavailable($tablekey, $filename){
	echo('<tr>
			<td align="center" width="120">' . $tablekey . '</td>');
		unav_row($filename, ".ps");
		unav_row($filename, ".pdf");
		unav_row($filename, ".html");
		unav_row($filename, ".txt");
		unav_row($filename, ".tex");
		echo('</tr>
	');
}

// Functions for timesheets:


			
function do_me_a_link($filename, $extension, $path){
	if(file_exists($path)){
		return('<a target="_blank" href="' . $path . '">
				<img alt="' . $filename . $extension . '" src="images/doc_available.gif" width="17" height="17" border="0"></a>');
	} else {
		return('<img alt="not available: ' . $filename . $extension . '" src="images/doc_not.gif" width="17" height="17">');
	}
}

function do_me_a_timesheetlink($file, $name, $user, $users){
	$xmlpath="documents/timesheets/" . $user . "/". $file . ".xml";
	//if(file_exists($xmllink)){
	//	echo("bla");
	//}
	$htmlpath="documents/timesheets/" . $user . "/". $file . ".html";
	$asciipath="documents/timesheets/" . $user . "/". $file . ".txt";
	$xmllink=do_me_a_link($file, ".xml", $xmlpath);
	$htmllink=do_me_a_link($file, ".html", $htmlpath);
	$asciilink=do_me_a_link($file, ".txt", $asciipath);
		echo('<tr>
			<td width="120" align="center" valign="middle" height="25">' . $name . '</td>
			<td width="80" align="center" valign="middle" height="25">' . $xmllink . '</td>
			<td width="80" align="center" valign="middle" height="25">' . $htmllink . '</td>
			<td width="80" align="center" valign="middle" height="25">' . $asciilink . '</td>
			</tr>');
		
}

function do_me_usertable($user, $users, $xmls){
	$full=$users[$user];
	echo('<h1 id="' . $user . '">' . $full . '</h1> 
      	<table>
	<tr>
		<th width="120" align="center">Week</th>
		<th width="80" align="center">XML</th>
		<th width="80" align="center">HTML</th>
		<th width="80" align="center">ASCII</th>
	</tr>');
	
		foreach($xmls as $file => $name){
			do_me_a_timesheetlink($file, $name, $user, $users);
		}

	
	echo('
	</table>');
}



?>

Kevin Pinte

Powered by ViewVC 1.0-dev

ViewVC Help