/[CvsGraph]/cvsgraph/contrib/cvsgraphwrapper.php3
ViewVC logotype

Annotate of /cvsgraph/contrib/cvsgraphwrapper.php3

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations)
Wed May 21 20:47:21 2008 UTC (9 years, 5 months ago) by bertho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
Remove replaced files
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <?php
3 /* Some basic checks are in place */
4 isset($r) || die("CVSroot must be set\n");
5 isset($m) || die("CVSmodule must be set\n");
6 isset($f) || die("File must be set\n");
7 if(strchr($r, "'") || strchr($m, "'") || strchr($f, "'"))
8 die("Invalid characters in arguments\n");
9 ?>
10 <html>
11 <head>
12 <title> <?php echo "CvsGraph of '$f'\n"; ?></title>
13 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
14 <meta name="generator" content="handcrafted">
15 </head>
16 <body bgcolor="#f0f0f0">
17 <center>
18 <?php
19 /* I'll be paranoid, set root and module here so no one can get access elsewhere */
20 /* Remove this or change it to suit your needs */
21 // $r = "/home/cvsgraph";
22 // $m = "cvsgraph";
23
24 /* Shell escape, PHP4 has functions for this, use them */
25 $sr = "'" . $r . "'";
26 $sm = "'" . $m . "'";
27 $sf = "'" . $f . ",v'";
28
29 /* Image references must be encoded properly */
30 $ur = urlencode($r);
31 $um = urlencode($m);
32 $uf = urlencode($f);
33 if(isset($cvsroot) && $cvsroot != "")
34 $ucr= "&cvsroot=" . urlencode($cvsroot); /* The cvsweb.cgi root */
35 else
36 $ucr = "";
37
38 /* I expose the paths here (accessible via the server). */
39 /* Set this to a private place to make it secure. */
40 $cvsgraph = "/home/bertho/public_html/cvsgraph/cvsgraph";
41 $cvsgraph_conf = "/home/bertho/public_html/cvsgraph/conf/cvsgraph.conf";
42
43 /* Print a head line */
44 echo "<h1>CvsGraph of '$f'</h1>\n";
45
46 /* Generate an imagemap */
47 $mapname = "CvsGraphMap";
48 $arg9 = "-9 './'";
49 $arg8 = "-8 '$ucr'";
50 $arg0 = "-0 'Branch:'";
51 $arg1 = "-1 'Revision:'";
52 $arg2 = "-2 'Diff:'";
53 $argM = "-M '$mapname'";
54 passthru("$cvsgraph $arg0 $arg1 $arg2 $arg8 $arg9 $argM -i -c $cvsgraph_conf -r $sr -m $sm $sf");
55
56 /* Link a CvsGraph image */
57 echo "<img border=\"0\" usemap=\"#$mapname\" src=\"./mkimage.php3?r=$ur&amp;m=$um&amp;f=$uf\" alt=\"CvsGraph of '$f'\">\n";
58 echo "<p>\nClick on the revisions/branches to display them\n";
59 echo "<br>\nClick between the revisions to display the diffs\n";
60 ?>
61 <hr>
62 </center>
63 <address>
64 Created with <a href="http://www.akhphd.au.dk/~bertho/cvsgraph/">CvsGraph</a>
65 </address>
66 </body>
67 </html>

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0