/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright ©2006 by sTEFANs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Main page that combines SWC control bar
* and additional output, e.g. project page.
* @copyright Copyright ©2006 by sTEFANs
* @license http://opensource.org/licenses/lgpl-license.php GNU General Public License
/** Project configuration interface */
require_once('inc/config.inc.php');
/** Common utility functions */
require_once('inc/utils.inc.php');
/** Common definitions */
require_once('inc/var.inc.php');
/** HTML generation library */
require_once('inc/page.inc.php');
require_once('inc/svn_executor.inc.php');
require_once('inc/user_settings.inc.php');
require_once(STD_CTRL_CONTENT);
/** SWC details content. */
require_once(STD_DETAILS_CONTENT);
/** SWC archive content. */
require_once(STD_ARCHIVE_CONTENT);
/** Default SWC main frame. */
require_once(STD_MAIN_FRAME);
* Sets cookies for each user setting.
$settings->ProcessSettings();
* Copies all entries from $_POST to $_SESSION to keep
* them availabe for all pages of the frameset.
//PrintDebugArray($_SESSION, 'Prepare session: SESSION');
$selected_project =
NULL;
// $_SESSION[IDX_ROOT_URL] = $_SERVER['REQUEST_URI'];
// workaround: If only defines are used as index, $_SESSION is empty
// within svn_control_page. No glue why!
$_SESSION['root_url'] =
$_SERVER['REQUEST_URI'];
foreach ($_POST as $key =>
$val){
foreach ($_GET as $key =>
$val){
* Returns the URL for main frame content.
* @return string URL for main frame.
} else if ($settings->IsPinProjectPage() &&
$config !=
NULL){
$main_frame_src =
$config->GetMainFrame();
} else if ($config !=
NULL){
$main_frame_src =
$config->GetMainFrame();
* Returns the URL for a child window content.
* @return string URL for child window or NULL
* if no child window should be displayed.
if ($settings->IsSeparateResultWindow()){
* Prints the HTML frameset.
* @param string $main_frame_src HTML Source for the main frame.
* @param string $ctrl_frame_src HTML Source for the control frame.
$frame_width =
$settings->GetProjectFrameWidth();
$frame_height =
$settings->GetProjectFrameHeight();
$frame_width, $frame_height, 0, 0, false,
* Prints a javascript code to open a child window.
* @return string Javascript to open a child window.
$width =
$settings->GetProjectFrameWidth();
$height =
$settings->GetProjectFrameHeight();
$code =
'window.open(\''.
$url.
'\', \'sep_window\', \'dependent=yes, innerWidth='.
$width.
', innerHeight='.
$height.
'\'); return true;';
* Main entry point for the start page.