diff --git a/about.php b/about.php new file mode 100644 index 0000000000..4429117bc1 --- /dev/null +++ b/about.php @@ -0,0 +1,54 @@ +common->filesystem_separator(); + $include = $phpgw_info["server"]["server_root"] . $sep . $app . $sep . "inc" . $sep . "about.inc.php"; + if (is_file($include)) { + include($include); + $included = True; +/* if (is_file($phpgw_info["server"]["server_root"] . $sep . "inc" . $sep . "version.inc.php")) { + include($phpgw_info["server"]["server_root"] . "/inc/version.inc.php"); + } */ + } else { + $included = False; + } + } else { + $api_only = True; + } + + $tpl = new Template($phpgw_info["server"]["include_root"] . "/phpgwapi/templates/" + . $phpgw_info["server"]["template_set"]); + $tpl->set_file(array("phpgw_about" => "about.tpl", + "phpgw_about_unknown" => "about_unknown.tpl" + )); + + $tpl->set_var("webserver_url",$phpgw_info["server"]["webserver_url"]); + $tpl->set_var("phpgw_version","phpGroupWare API version " . $phpgw_info["server"]["versions"]["phpgwapi"]); + if ($included) { + $tpl->set_var("phpgw_app_about",about_app("","")); + //about_app($tpl,"phpgw_app_about"); + } else { + if ($api_only) { + $tpl->set_var("phpgw_app_about",""); + } else { + $tpl->set_var("app_header",$app); + $tpl->parse("phpgw_app_about","phpgw_about_unknown"); + } + } + + $tpl->pparse("out","phpgw_about"); +?> \ No newline at end of file diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php index 10cbacc7df..ede075b636 100644 --- a/phpgwapi/inc/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -390,7 +390,7 @@ * Verify that the users session is still active otherwise kick them out * \**************************************************************************/ if ($phpgw_info["flags"]["currentapp"] != "home" && $phpgw_info["flags"]["currentapp"] != "logout" - && $phpgw_info["flags"]["currentapp"] != "preferences") { + && $phpgw_info["flags"]["currentapp"] != "preferences" && $phpgw_info["flags"]["currentapp"] != "about") { if (! $phpgw_info["user"]["apps"][$phpgw_info["flags"]["currentapp"]]) { $phpgw->common->phpgw_header(); diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index 1379898757..e7fa58dc96 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -42,6 +42,16 @@ 'gdm' => True, 'named' => True); + // This function is used if the developer wants to stop a running app in the middle of execution + // We may need to do some clean up before hand + function phpgw_exit() + { + global $phpgw; + + $phpgw->db->disconnect(); + exit; + } + // I had to create this has a wrapper, becuase the phpgw.inc.php files needs it before the classes // are finished loading (jengo) function filesystem_separator() diff --git a/phpgwapi/templates/default/about.tpl b/phpgwapi/templates/default/about.tpl new file mode 100644 index 0000000000..cff1521c96 --- /dev/null +++ b/phpgwapi/templates/default/about.tpl @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + +
+ +
 
{phpgw_version}
Note: This will be some text on phpGroupWare it self

+ +{phpgw_app_about} + +
\ No newline at end of file diff --git a/phpgwapi/templates/default/about_unknown.tpl b/phpgwapi/templates/default/about_unknown.tpl new file mode 100644 index 0000000000..f369e59242 --- /dev/null +++ b/phpgwapi/templates/default/about_unknown.tpl @@ -0,0 +1,12 @@ + + {app_header} + + +   + + +   + + + Sorry, no futher information is avaiable on this application. + \ No newline at end of file