diff --git a/admin/accounts.php b/admin/accounts.php
index cd23c363fb..b5ad70a2f4 100755
--- a/admin/accounts.php
+++ b/admin/accounts.php
@@ -74,12 +74,12 @@
$p->set_var('row_loginid',$loginid);
$p->set_var('row_firstname',$firstname);
$p->set_var('row_lastname',$lastname);
- $p->set_var('row_edit','link('/admin/editaccount.php','account_id='
. $account_id) . '"> ' . lang('Edit') . ' ');
if ($phpgw_info['user']['userid'] != $account['account_lid'])
{
- $p->set_var('row_delete','link('/admin/deleteaccount.php','account_id='
. $account_id) . '"> '.lang('Delete').' ');
}
else
@@ -87,15 +87,15 @@
$p->set_var('row_delete',' ');
}
- $p->set_var('row_view','set_var('row_view',' ' . lang("View") . ' ');
$p->parse('rows','row',True);
}
} // End else
- $p->set_var('actionurl',$phpgw->link("newaccount.php"));
- $p->set_var('accounts_url',$phpgw->link("accounts.php"));
+ $p->set_var('actionurl',$phpgw->link("/admin/newaccount.php"));
+ $p->set_var('accounts_url',$phpgw->link("/admin/accounts.php"));
$p->set_var('lang_add',lang("add"));
$p->set_var('lang_search',lang("search"));
diff --git a/admin/applications.php b/admin/applications.php
index 875fcb4c5e..32f99a91b9 100644
--- a/admin/applications.php
+++ b/admin/applications.php
@@ -48,8 +48,8 @@
$p->set_var("tr_color",$tr_color);
$p->set_var("name",$name);
- $p->set_var("edit",'db->f("app_name"))) . '"> ' . lang("Edit") . ' ');
- $p->set_var("delete",'db->f("app_name"))) . '"> ' . lang("Delete") . ' ');
+ $p->set_var("edit",'db->f("app_name"))) . '"> ' . lang("Edit") . ' ');
+ $p->set_var("delete",'db->f("app_name"))) . '"> ' . lang("Delete") . ' ');
if ($phpgw->db->f("app_enabled") != 0) {
$status = lang("Yes");
@@ -61,7 +61,7 @@
$p->parse("rows","row",True);
}
- $p->set_var("new_action",$phpgw->link("newapplication.php"));
+ $p->set_var("new_action",$phpgw->link("/admin/newapplication.php"));
$p->set_var("lang_add",lang("add"));
$p->pparse("out","list");
diff --git a/admin/currentusers.php b/admin/currentusers.php
index ee8a30f62f..06f23a5cf8 100755
--- a/admin/currentusers.php
+++ b/admin/currentusers.php
@@ -86,7 +86,7 @@
if ($phpgw->db->f('session_id') != $phpgw_info['user']['sessionid'])
{
- $phpgw->template->set_var('row_kill','link('/admin/killsession.php','ksession='
. $phpgw->db->f('session_id') . '&kill=true') . '">' . lang('Kill').'');
}
else
diff --git a/admin/deleteaccount.php b/admin/deleteaccount.php
index 76cb6ce306..6038f1534e 100755
--- a/admin/deleteaccount.php
+++ b/admin/deleteaccount.php
@@ -52,7 +52,7 @@
// Make sure they are not attempting to delete there own account.
// If they are, they should not reach this point anyway.
if ($phpgw_info["user"]["account_id"] == $account_id) {
- Header("Location: " . $phpgw->link("accounts.php"));
+ Header('Location: ' . $phpgw->link('/admin/accounts.php'));
$phpgw->common->phpgw_exit();
}
@@ -61,9 +61,9 @@
$account_id = rawurlencode($account_id);
$phpgw->template->set_var("message",lang("Are you sure you want to delete this account ?") . "
"
. "");
- $phpgw->template->set_var("yes",'template->set_var("yes",'' . lang("Yes") . '');
- $phpgw->template->set_var("no",'template->set_var("no",'' . lang("No") . '');
$phpgw->template->pparse("out","body");
@@ -73,7 +73,7 @@
if ($confirm) {
$cd = account_delete($account_id);
- Header("Location: " . $phpgw->link("accounts.php","cd=$cd"));
+ Header("Location: " . $phpgw->link("/admin/accounts.php","cd=$cd"));
}
account_close();
?>
diff --git a/admin/deleteapplication.php b/admin/deleteapplication.php
index dedbddfec3..2c185201d4 100644
--- a/admin/deleteapplication.php
+++ b/admin/deleteapplication.php
@@ -14,7 +14,7 @@
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "admin");
if (! $app_name) {
- Header("Location: " . $phpgw->link("applications.php"));
+ Header("Location: " . $phpgw->link("/admin/applications.php"));
}
include("../header.inc.php");
$phpgw->template->set_file(array("body" => "delete_common.tpl"));
@@ -22,7 +22,7 @@
if ($confirm) {
$phpgw->db->query("delete from phpgw_applications where app_name='$app_name'",__LINE__,__FILE__);
- Header("Location: " . $phpgw->link("applications.php"));
+ Header("Location: " . $phpgw->link("/admin/applications.php"));
$phpgw->common->phpgw_exit();
}
@@ -30,9 +30,9 @@
echo parse_navbar();
$phpgw->template->set_var("message",lang("Are you sure you want to delete this application ?"));
- $phpgw->template->set_var("no",'template->set_var("no",'' . lang("No") . '');
- $phpgw->template->set_var("yes",'' . lang("Yes") . '');
+ $phpgw->template->set_var("yes",'' . lang("Yes") . '');
$phpgw->template->pparse("out","body");
$phpgw->common->phpgw_footer();
diff --git a/admin/deletegroup.php b/admin/deletegroup.php
index e3d5020d84..cce00a1d79 100755
--- a/admin/deletegroup.php
+++ b/admin/deletegroup.php
@@ -15,7 +15,7 @@
$phpgw_info['flags'] = array('noheader' => True, 'nonavbar' => True, 'currentapp' => 'admin');
if (! $group_id) {
- Header('Location: ' . $phpgw->link('groups.php'));
+ Header('Location: ' . $phpgw->link('/admin/groups.php'));
}
include('../header.inc.php');
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
@@ -47,11 +47,11 @@
$p->parse('messages','message_row',True);
while (list(,$id) = each($old_group_list)) {
- $p->set_var('message_display','
\n"; - echo "
\n";
+ echo '' . lang('Applications')."
\n";
+ echo "
\n";
- echo "";
- echo lang("Applications")."
\n";
+ echo '' . lang('Change main screen message') . "
\n";
+ echo "
\n"; - echo "
\n";
+ echo '' . lang('View sessions') . "
\n";
+ echo '' . lang('View Access Log') . "
\n";
- echo "";
- echo lang("Change main screen message")."
\n";
-
- echo "
\n";
-
- echo "";
- echo lang("View sessions")." \n";
- }
- }
+ for ($i =0; $i < sizeof($apps); $i++)
+ {
+ $appname = $apps[$i];
+ $f = PHPGW_SERVER_ROOT . '/' . $appname . '/inc/hook_admin.inc.php';
-if ( $SHOW_INFO > 0 ) {
- echo " link("", "SHOW_INFO=0")."\">Hide PHP Information";
- echo " link("", "SHOW_INFO=1")."\">PHP Information";
-}
- $phpgw->common->phpgw_footer();
-?>
+ if (file_exists($f))
+ {
+ include($f);
+ echo " \n";
+ }
+ }
+
+ if ($SHOW_INFO > 0)
+ {
+ echo ' ' . lang('Hide PHP Information') . '';
+ echo " ' . lang('PHP Information') . '';
+ }
+ $phpgw->common->phpgw_footer();
+?>
\ No newline at end of file
diff --git a/admin/killsession.php b/admin/killsession.php
index 4f3a722503..5bf129a3df 100755
--- a/admin/killsession.php
+++ b/admin/killsession.php
@@ -18,14 +18,13 @@
$phpgw_info["flags"]["currentapp"] = "admin";
include("../header.inc.php");
if ($ksessionid == $phpgw_info["user"]["sessionid"]) {
- Header("Location: " . $phpgw->link("currentusers.php"));
+ Header("Location: " . $phpgw->link("/admin/currentusers.php"));
$phpgw->common->phpgw_exit();
}
if ($confirm) {
$phpgw->db->query("delete from phpgw_sessions where session_id='$ksession'");
- Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/admin/currentusers.php",
- "cd=19"));
+ Header("Location: " . $phpgw->link("/admin/currentusers.php","cd=19"));
} else {
?>
link("navbar-sel.php","filename=".$phpgw_info["server"]["server_root"]."/".$key."/images/navbar.gif")."\">";
+ echo "\nlink("/admin/navbar-sel.php","filename=".$phpgw_info["server"]["server_root"]."/".$key."/images/navbar.gif")."\">";
echo $phpgw_info["apps"][$key]["title"]."
\n";
-
- echo "";
- echo lang("View Access Log")."
\n";
-
- section_end();
+ section_end();
}
-?>
+?>
\ No newline at end of file
diff --git a/admin/index.php b/admin/index.php
index 079d1c8d7c..a6cc883cf8 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,70 +1,80 @@
*
- * Modified by Stephen Brown \n";
- echo "
\n\n";
- }
+ // This func called by the includes to dump a row header
+ function section_start($name='',$icon='')
+ {
+ global $phpgw,$phpgw_info;
+ echo '";
- if ($icon != "") {
- echo " \n";
- echo "";
- echo " ";
- } else {
- echo "$name ";
- }
- echo "\n";
- }
- function section_end() {
- echo "
';
+ }
- $phpgw->db->query("select app_name from phpgw_applications where app_enabled = 1 order by app_title",__LINE__,__FILE__);
+ // We only want to list applications that are enabled, plus the common stuff
+ // (if they can get to the admin page, the admin app is enabled, hence it is shown)
+
+ $phpgw->db->query("select app_name from phpgw_applications where app_enabled = 1 order by app_title",__LINE__,__FILE__);
- // Stuff it in an array in the off chance the admin includes need the db
- while ($phpgw->db->next_record() ) {
- $apps[] = $phpgw->db->f("app_name");
- }
+ // Stuff it in an array in the off chance the admin includes need the db
+ while ($phpgw->db->next_record())
+ {
+ $apps[] = $phpgw->db->f('app_name');
+ }
- for( $i =0; $i < sizeof($apps); $i++) {
- $appname = $apps[$i];
- $f = PHPGW_SERVER_ROOT . "/" . $appname . "/inc/hook_admin.inc.php";
- if (file_exists($f)) {
- include($f);
- echo "';
+ if ($icon)
+ {
+ echo ' ';
+ echo '';
+ echo ' ';
+ }
+ else
+ {
+ echo '' . $name . ' ';
+ }
+ echo '';
+ }
- // We only want to list applications that are enabled, plus the common stuff
- // (if they can get to the admin page, the admin app is enabled, hence it is shown)
+ function section_end()
+ {
+ echo '
\n";
- phpinfo();
- echo "
\n";
-}
-else {
- echo "
\n";
+ phpinfo();
+ echo "
\n";
+ }
+ else
+ {
+ echo '
diff --git a/admin/mainscreen_message.php b/admin/mainscreen_message.php
index d788084f6f..179f3aa6c2 100644
--- a/admin/mainscreen_message.php
+++ b/admin/mainscreen_message.php
@@ -30,7 +30,7 @@
if (! isset($select_lang)) {
$phpgw->template->set_var("header_lang",lang("Main screen message"));
- $phpgw->template->set_var("form_action",$phpgw->link("mainscreen_message.php"));
+ $phpgw->template->set_var("form_action",$phpgw->link("/admin/mainscreen_message.php"));
$phpgw->template->set_var("tr_color",$phpgw_info["theme"]["th_bg"]);
$phpgw->template->set_var("value"," ");
$phpgw->template->parse("rows","row_2",True);
@@ -76,7 +76,7 @@
} else {
$phpgw->template->set_var("header_lang",lang("Edit login screen message"));
}
- $phpgw->template->set_var("form_action",$phpgw->link("mainscreen_message.php","select_lang=$select_lang§ion=$section"));
+ $phpgw->template->set_var("form_action",$phpgw->link("/admin/mainscreen_message.php","select_lang=$select_lang§ion=$section"));
$phpgw->template->set_var("tr_color",$phpgw_info["theme"]["th_bg"]);
$phpgw->template->set_var("value"," ");
$phpgw->template->parse("rows","row_2",True);
diff --git a/admin/navbar-create.php b/admin/navbar-create.php
index 92344d6386..13fc39cefb 100644
--- a/admin/navbar-create.php
+++ b/admin/navbar-create.php
@@ -24,7 +24,7 @@ The instructions are as follows:
- " . lang("No"); ?>
+ " . lang("No"); ?>
- " . lang("Yes"); ?>
";
}
diff --git a/admin/newaccount.php b/admin/newaccount.php
index f57598f67b..cdbb149a12 100755
--- a/admin/newaccount.php
+++ b/admin/newaccount.php
@@ -156,7 +156,7 @@
$phpgw->common->hook_single('add_user_data', $value);
}
*/
- Header('Location: ' . $phpgw->link('accounts.php','cd='.$cd));
+ Header('Location: ' . $phpgw->link('/admin/accounts.php','cd='.$cd));
$phpgw->common->phpgw_exit();
}
}
@@ -186,7 +186,7 @@
$phpgw->template->set_var('tr_color1',$phpgw_info['theme']['row_on']);
$phpgw->template->set_var('tr_color2',$phpgw_info['theme']['row_off']);
- $phpgw->template->set_var('form_action',$phpgw->link('newaccount.php'));
+ $phpgw->template->set_var('form_action',$phpgw->link('/admin/newaccount.php'));
$phpgw->template->set_var('lang_loginid',lang('LoginID'));
if ($account_status)
diff --git a/admin/newapplication.php b/admin/newapplication.php
index 7bb0c72f94..162847bd2e 100644
--- a/admin/newapplication.php
+++ b/admin/newapplication.php
@@ -64,7 +64,7 @@
$phpgw->acl->add($n_app_name,'everywhere',0,'g',1);
}
- Header("Location: " . $phpgw->link("applications.php"));
+ Header("Location: " . $phpgw->link("/admin/applications.php"));
$phpgw->common->phpgw_exit();
} else {
$phpgw->template->set_var("error","
");
@@ -79,7 +79,7 @@
$phpgw->template->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
$phpgw->template->set_var("hidden_vars","");
- $phpgw->template->set_var("form_action",$phpgw->link("newapplication.php"));
+ $phpgw->template->set_var("form_action",$phpgw->link("/admin/newapplication.php"));
display_row(lang("application name"),'');
display_row(lang("application title"),'');
diff --git a/admin/newgroup.php b/admin/newgroup.php
index 376b1a6460..92e2a1bbdd 100755
--- a/admin/newgroup.php
+++ b/admin/newgroup.php
@@ -108,7 +108,7 @@
$phpgw->db->unlock();
- Header("Location: " . $phpgw->link("groups.php","cd=$cd"));
+ Header("Location: " . $phpgw->link("/admin/groups.php","cd=$cd"));
$phpgw->common->phpgw_exit();
}
}
@@ -125,7 +125,7 @@
$p->set_var("error","");
}
- $p->set_var("form_action",$phpgw->link("newgroup.php"));
+ $p->set_var("form_action",$phpgw->link("/admin/newgroup.php"));
$p->set_var("hidden_vars","");
$p->set_var("lang_group_name",lang("New group name"));
$p->set_var("group_name_value","");
diff --git a/admin/viewaccount.php b/admin/viewaccount.php
index 823068f89d..164442f982 100755
--- a/admin/viewaccount.php
+++ b/admin/viewaccount.php
@@ -28,7 +28,7 @@
if (! $account_id)
{
- Header('Location: ' . $phpgw->link('accounts.php'));
+ Header('Location: ' . $phpgw->link('/admin/accounts.php'));
}
$t = new Template($phpgw->common->get_tpl_dir('admin'));