--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+/**
+* Mimics functions that will later become the language
+* independence system and error system
+*
+* @pacakge ViewSVN
+*/
+
+/**
+* Imaginary class that does error reporting and language
+* independence
+*
+* @package ViewSVN
+* @version $Id$
+*/
+class Imaginary
+{
+ /**
+ * Mimics the error reporting function
+ *
+ * @access public
+ *
+ * @param string Error
+ *
+ * @return string Error
+ */
+ function error($error)
+ {
+ trigger_error($error, E_USER_ERROR);
+ }
+}
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+error_reporting(E_ALL);
+
+define('ISSO_MT_START', microtime());
+
+// ###################################################################
+// configuration file
+if (!file_exists('./config.php'))
+{
+ echo 'includes/config.php needs to be present!';
+ exit;
+}
+
+require_once('./config.php');
+
+// ###################################################################
+// init isso
+define('ISSO_ESCAPE_STRINGS', 1);
+define('ISSO_CHECK_POST_REFERER', 1);
+
+require_once($issopath . 'kernel.php');
+$viewsvn =& $_isso;
+$viewsvn->application = 'ViewSVN';
+$viewsvn->apppath = $viewsvn->fetch_sourcepath(getcwd());
+$viewsvn->appversion = '[#]version[#]';
+$viewsvn->debug = $debug;
+$viewsvn->sourcepath = $viewsvn->fetch_sourcepath($issopath);
+
+$viewsvn->load('functions');
+$viewsvn->exec_sanitize_data();
+
+// ###################################################################
+// imaginary reporter
+require_once('./imaginary.php');
+$viewsvn->trigger =& new Imaginary();
+
+// ###################################################################
+// load shell subsystem
+require_once('./shellcmd.php');
+$viewsvn->shell =& new Shell();
+
+// ###################################################################
+// setup repository
+require_once('./repository.php');
+$viewsvn->repos =& new Repository($repository, $iscontainer);
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+/**
+* Class that manages repositories and can produce lists of
+* repositories
+*
+* @pacakge ViewSVN
+*/
+
+/**
+* Repository class that can list repositories and prepare
+* them for use
+*
+* @package DeskPRO
+* @version $Id$
+*/
+class Repository
+{
+ /**
+ * Constructor: prepare for repository
+ *
+ * @param string Path to repository or container
+ * @param bool Whether the path is a container
+ */
+ function Repository($path, $iscontainer)
+ {
+ global $viewsvn;
+
+ $repos = array();
+
+ $path = $viewsvn->fetch_sourcepath($path);
+
+ if ($iscontainer)
+ {
+ if ($dir = @opendir($path))
+ {
+ while (($file = readdir($dir)) !== false)
+ {
+ if (is_dir($path . $file) AND $file{0} != '.' AND is_dir($path . $file . '/' . 'db'))
+ {
+ $repos[] = $file;
+ }
+ }
+ closedir($dir);
+ }
+ }
+ else
+ {
+ if (is_dir($path . 'db'))
+ {
+ $repos[] = $path;
+ }
+ }
+
+ if (count($repos) < 1)
+ {
+ $viewsvn->trigger->error('no valid repositories');
+ }
+ }
+}
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+/**
+* Class that interacts with the command line system
+*
+* @pacakge ViewSVN
+*/
+
+/**
+* Interacts with the command line via escapes and executions
+*
+* @package DeskPRO
+* @version $Id$
+*/
+class Shell
+{
+ /**
+ * Wrapper for escapeshellarg()
+ *
+ * @access public
+ *
+ * @param string The argument
+ *
+ * @return string Cleaned argument
+ */
+ function arg($argument)
+ {
+ return escapeshellarg($argument);
+ }
+
+ /**
+ * Wrapper for escapeshellcmd
+ *
+ * @access public
+ *
+ * @param string Command
+ *
+ * @return string Cleaned command
+ */
+ function cmd($command)
+ {
+ return escapeshellcmd($command);
+ }
+
+ /**
+ * Executes a shell command and returns all the output
+ * as an array
+ *
+ * @access public
+ *
+ * @param string UNIX command
+ *
+ * @return array Output
+ */
+ function exec($command)
+ {
+ exec($command, $output);
+ return $output;
+ }
+}
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # ViewSVN [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
+|| # This file may not be reproduced in any way without permission. # ||
+|| # --------------------------------------------------------------- # ||
+|| # User License Agreement at http://www.iris-studios.com/license/ # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file