mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
Initial revision
This commit is contained in:
commit
fb03d1cbaa
92
addressbook/add.php
Executable file
92
addressbook/add.php
Executable file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
|
||||
if ($add_email) {
|
||||
list($fields["lastname"],$fields["firstname"]) = explode(" ", $name);
|
||||
$fields["email"] = $add_email;
|
||||
form("","add.php","Add",$fields);
|
||||
} else if (! $submit && ! $add_email) {
|
||||
form("","add.php","Add","","","");
|
||||
} else {
|
||||
if ($bday_month == "" && $bday_day == "" && $bday_year == "")
|
||||
$bday = "";
|
||||
else
|
||||
$bday = "$bday_month/$bday_day/$bday_year";
|
||||
|
||||
$access = $phpgw->groups->array_to_string($access,$n_groups);
|
||||
|
||||
$sql = "insert into addressbook (owner,access,firstname,lastname,email,"
|
||||
. "hphone,wphone,fax,pager,mphone,ophone,street,city,state,zip,bday,"
|
||||
. "notes,company) values ('" . $phpgw->session->loginid . "','$access','"
|
||||
. addslashes($firstname). "','"
|
||||
. addslashes($lastname) . "','"
|
||||
. addslashes($email) . "','"
|
||||
. addslashes($hphone) . "','"
|
||||
. addslashes($wphone) . "','"
|
||||
. addslashes($fax) . "','"
|
||||
. addslashes($pager) . "','"
|
||||
. addslashes($mphone) . "','"
|
||||
. addslashes($ophone) . "','"
|
||||
. addslashes($street) . "','"
|
||||
. addslashes($city) . "','"
|
||||
. addslashes($state) . "','"
|
||||
. addslashes($zip) . "','"
|
||||
. addslashes($bday) . "','"
|
||||
. addslashes($notes) . "','"
|
||||
. addslashes($company). "')";
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
|
||||
"cd=14"));
|
||||
}
|
||||
|
||||
?>
|
||||
<TABLE border=0 cellPadding=0 cellSpacing=0 width="95%">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE border=0 cellPadding=1 cellSpacing=1>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD align=left>
|
||||
<INPUT type=submit name=submit value="OK">
|
||||
</TD>
|
||||
<TD align=left>
|
||||
<INPUT name=reset type=reset value="Clear">
|
||||
</TD>
|
||||
<TD align=left>
|
||||
<a href="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/") . "\">" . lang_common("Cancel"); ?></a>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
</FORM>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
54
addressbook/delete.php
Executable file
54
addressbook/delete.php
Executable file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
|
||||
if (! $con) {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
}
|
||||
|
||||
if ($confirm != "true") {
|
||||
$phpgw->db->query("select owner from addressbook where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f("owner") != $phpgw->session->loginid)
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
|
||||
?>
|
||||
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
|
||||
<center><?php echo lang_common("Are you sure you want to delete this entry ?"); ?><center>
|
||||
<br><center><a href="<?php
|
||||
echo $phpgw->link("view.php","&con=$con&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
|
||||
?>"><?php echo lang_common("NO"); ?></a>
|
||||
<a href="delete.php?sessionid=<?php
|
||||
echo $phpgw->session->id . "&con=$con&confirm=true&order=$order&sort="
|
||||
. "$sort&filter=$filter&start=$start&query=$query";
|
||||
?>"><?php echo lang_common("YES"); ?></a><center>
|
||||
<?php
|
||||
|
||||
//exit;
|
||||
} else {
|
||||
|
||||
$phpgw->db->query("delete from addressbook where owner='" . $phpgw->session->loginid
|
||||
. "' and con='$con'");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
}
|
||||
|
||||
|
115
addressbook/edit.php
Executable file
115
addressbook/edit.php
Executable file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
|
||||
if (! $con) {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (! $submit) {
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE owner='"
|
||||
. $phpgw->session->loginid . "' AND con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$fields = array(
|
||||
'con' => $phpgw->db->f("con"),
|
||||
'owner' => $phpgw->db->f("owner"),
|
||||
'access' => $phpgw->db->f("access"),
|
||||
'firstname' => $phpgw->db->f("firstname"),
|
||||
'lastname' => $phpgw->db->f("lastname"),
|
||||
'email' => $phpgw->db->f("email"),
|
||||
'hphone' => $phpgw->db->f("hphone"),
|
||||
'wphone' => $phpgw->db->f("wphone"),
|
||||
'fax' => $phpgw->db->f("fax"),
|
||||
'pager' => $phpgw->db->f("pager"),
|
||||
'mphone' => $phpgw->db->f("mphone"),
|
||||
'ophone' => $phpgw->db->f("ophone"),
|
||||
'street' => $phpgw->db->f("street"),
|
||||
'city' => $phpgw->db->f("city"),
|
||||
'state' => $phpgw->db->f("state"),
|
||||
'zip' => $phpgw->db->f("zip"),
|
||||
'bday' => $phpgw->db->f("bday"),
|
||||
'notes' => $phpgw->db->f("notes"),
|
||||
'company' => $phpgw->db->f("company")
|
||||
);
|
||||
|
||||
form("","edit.php","Edit",$fields);
|
||||
|
||||
} else {
|
||||
$bday = $bday_month . "/" . $bday_day . "/" . $bday_year;
|
||||
$access = $phpgw->groups->array_to_string($access,$n_groups);
|
||||
|
||||
$sql = "UPDATE addressbook set email='" . addslashes($email)
|
||||
. "', firstname='" . addslashes($firstname)
|
||||
. "', lastname='" . addslashes($lastname)
|
||||
. "', hphone='" . addslashes($hphone)
|
||||
. "', wphone='" . addslashes($wphone)
|
||||
. "', fax='" . addslashes($fax)
|
||||
. "', pager='" . addslashes($pager)
|
||||
. "', mphone='" . addslashes($mphone)
|
||||
. "', ophone='" . addslashes($ophone)
|
||||
. "', street='" . addslashes($street)
|
||||
. "', city='" . addslashes($city)
|
||||
. "', state='" . addslashes($state)
|
||||
. "', zip='" . addslashes($zip)
|
||||
. "', bday='" . addslashes($bday)
|
||||
. "', notes='" . addslashes($notes)
|
||||
. "', company='" . addslashes($company)
|
||||
. "', access='" . addslashes($access)
|
||||
. "' WHERE owner='" . $phpgw->session->loginid . "' AND con='$con'";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
Header("Location: " . $phpgw->link("view.php","&con=$con&order=$order&sort=$sort&filter="
|
||||
. "$filter&start=$start"));
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<input type="hidden" name="con" value="<? echo $con; ?>">
|
||||
<input type="hidden" name="sort" value="<? echo $sort; ?>">
|
||||
<input type="hidden" name="order" value="<? echo $order; ?>">
|
||||
<input type="hidden" name="filter" value="<? echo $filter; ?>">
|
||||
<input type="hidden" name="start" value="<? echo $start; ?>">
|
||||
|
||||
<TABLE border=0 cellPadding=1 cellSpacing=1 width="95%">
|
||||
<TBODY>
|
||||
<tr>
|
||||
<TD align=left width=7%>
|
||||
<input type="submit" name="submit" value="<?php echo lang_common("Submit"); ?>">
|
||||
</TD>
|
||||
<TD align=left width=7%>
|
||||
<a href="<?php echo $phpgw->link("view.php","con=$con") . "\">" . lang_common("Cancel"); ?></a>
|
||||
</TD>
|
||||
<TD align=right>
|
||||
<a href="<?php echo $phpgw->link("delete.php","con=$con") . "\">" . lang_common("Delete"); ?></a>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
287
addressbook/inc/functions.inc.php
Executable file
287
addressbook/inc/functions.inc.php
Executable file
@ -0,0 +1,287 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@mail.com> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
function form($format,$action,$title,$fields)
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$email = $fields["email"];
|
||||
$firstname = $fields["firstname"];
|
||||
$lastname = $fields["lastname"];
|
||||
$hphone = $fields["hphone"];
|
||||
$wphone = $fields["wphone"];
|
||||
$fax = $fields["fax"];
|
||||
$pager = $fields["pager"];
|
||||
$mphone = $fields["mphone"];
|
||||
$ophone = $fields["ophone"];
|
||||
$street = $fields["street"];
|
||||
$city = $fields["city"];
|
||||
$state = $fields["state"];
|
||||
$zip = $fields["zip"];
|
||||
$bday = $fields["bday"];
|
||||
$notes = $fields["notes"];
|
||||
$access = $fields["access"];
|
||||
$company = $fields["company"];
|
||||
|
||||
if ($format != "view") {
|
||||
$email = "<input name=\"email\" value=\"$email\">";
|
||||
$firstname = "<input name=\"firstname\" value=\"$firstname\">";
|
||||
$lastname = "<input name=\"lastname\" value=\"$lastname\">";
|
||||
$hphone = "<input name=\"hphone\" value=\"$hphone\">";
|
||||
$wphone = "<input name=\"wphone\" value=\"$wphone\">";
|
||||
$fax = "<input name=\"fax\" value=\"$fax\">";
|
||||
$pager = "<input name=\"pager\" value=\"$pager\">";
|
||||
$mphone = "<input name=\"mphone\" value=\"$mphone\">";
|
||||
$ophone = "<input name=\"ophone\" value=\"$ophone\">";
|
||||
$street = "<input name=\"street\" value=\"$street\">";
|
||||
$city = "<input name=\"city\" value=\"$city\">";
|
||||
$state = "<input name=\"state\" value=\"$state\">";
|
||||
$zip = "<input name=\"zip\" value=\"$zip\">";
|
||||
$company = "<input name=\"company\" value=\"$company\">";
|
||||
|
||||
if (strlen($bday) > 2) {
|
||||
list( $month, $day, $year ) = split( '/', $bday );
|
||||
$temp_month[$month] = "SELECTED";
|
||||
|
||||
$bday ="<select name=bday_month>"
|
||||
. "<option value=\"\" $temp_month[0]> </option>"
|
||||
. "<option value=1 $temp_month[1]>January</option>"
|
||||
. "<option value=2 $temp_month[2]>February</option>"
|
||||
. "<option value=3 $temp_month[3]>March</option>"
|
||||
. "<option value=4 $temp_month[4]>April</option>"
|
||||
. "<option value=5 $temp_month[5]>May</option>"
|
||||
. "<option value=6 $temp_month[6]>June</option>"
|
||||
. "<option value=7 $temp_month[7]>July</option>"
|
||||
. "<option value=8 $temp_month[8]>August</option>"
|
||||
. "<option value=9 $temp_month[9]>September</option>"
|
||||
. "<option value=10 $temp_month[10]>October</option>"
|
||||
. "<option value=11 $temp_month[11]>November</option>"
|
||||
. "<option value=12 $temp_month[12]>December</option>"
|
||||
. "</select>"
|
||||
. "<input maxlength=2 name=bday_day value=\"$day\" size=2>"
|
||||
. "<input maxlength=4 name=bday_year value=\"$year\" size=4>"
|
||||
. "<font face=\"$theme[font]\" size=\"-2\">(e.g. 1969)</font>";
|
||||
} else {
|
||||
$bday ="<select name=bday_month>"
|
||||
. "<option value=\"\" SELECTED> </option>"
|
||||
. "<option value=1>January</option>"
|
||||
. "<option value=2>February</option>"
|
||||
. "<option value=3>March</option>"
|
||||
. "<option value=4>April</option>"
|
||||
. "<option value=5>May</option>"
|
||||
. "<option value=6>June</option>"
|
||||
. "<option value=7>July</option>"
|
||||
. "<option value=8>August</option>"
|
||||
. "<option value=9>September</option>"
|
||||
. "<option value=10>October</option>"
|
||||
. "<option value=11>November</option>"
|
||||
. "<option value=12>December</option>"
|
||||
. "</select>"
|
||||
. "<input maxlength=2 name=bday_day size=2>"
|
||||
. "<input maxlength=4 name=bday_year size=4>"
|
||||
. "<font face=\"$theme[font]\" size=\"-2\">(e.g. 1969)</font>";
|
||||
}
|
||||
|
||||
$notes = "<TEXTAREA cols=\"60\" name=\"notes\" rows=\"4\">"
|
||||
. $notes . "</TEXTAREA>";
|
||||
} else {
|
||||
$notes = "<form><TEXTAREA cols=\"60\" name=\"notes\" rows=\"4\">"
|
||||
. $notes . "</TEXTAREA></form>";
|
||||
if ($bday == "//")
|
||||
$bday = "";
|
||||
}
|
||||
|
||||
if ($action) {
|
||||
echo "<FORM action=\"$action\" method=\"post\">\n"
|
||||
. $phpgw->session->hidden_var();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table width="75%" border="0" align="center">
|
||||
<tr>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_common("Last Name"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $lastname; ?>
|
||||
</font></td>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_common("First Name"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $firstname; ?>
|
||||
</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font color="#000000" face="" size="-1"><?php echo lang_common("E-mail"); ?>:</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $email; ?>
|
||||
</font></td>
|
||||
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Company Name"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $company; ?>
|
||||
</font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Home Phone"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $hphone; ?>
|
||||
</font></td>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Fax"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $fax; ?>
|
||||
</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Work Phone"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $wphone; ?>
|
||||
</font></td>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Pager"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $pager; ?>
|
||||
</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("Mobile"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $mphone; ?>
|
||||
</font></td>
|
||||
<td><font face="" size="-1" color="#000000"><?php echo lang_addressbook("Other number"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $ophone; ?>
|
||||
</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font face="" size="-1"><?php echo lang_addressbook("Street"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $street; ?>
|
||||
</font></td>
|
||||
<td><font face="" size="-1"><?php echo lang_addressbook("Birthday"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $bday; ?>
|
||||
</font> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font face="" size="-1"><?php echo lang_addressbook("City"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $city; ?>
|
||||
</font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#000000" face="" size="-1"><?php echo lang_addressbook("State"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $state; ?>
|
||||
</font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font face="" size="-1"><?php echo lang_addressbook("ZIP Code"); ?>:</font></td>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<?php echo $zip; ?>
|
||||
</font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
<td><font size="-1"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><font size="-1"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<?php
|
||||
if ($format == "view") {
|
||||
if ($access != "private" && $access != "public") {
|
||||
echo "<td><font size=\"-1\">" . lang_common("Group access") . ":</font></td>"
|
||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
||||
. $phpgw->groups->convert_string_to_names($access);
|
||||
} else {
|
||||
echo "<td><font size=\"-1\">" . lang_common("access") . ":</font></td>"
|
||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
||||
. $access;
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<td><font size="-1"><?php echo lang_common("Access"); ?>:</font></td>
|
||||
<td colspan="3">
|
||||
<font size="-1">
|
||||
|
||||
<select name="access">
|
||||
<option value="private"<?php
|
||||
if ($access == "private") echo " selected"; ?>><?php echo lang_common("private"); ?></option>
|
||||
<option value="public"<?php
|
||||
if ($access == "public") echo " selected"; ?>><?php echo lang_common("Global Public"); ?></option>
|
||||
<option value="group"<?php
|
||||
if ($access != "public" && $access != "private" && $access != "")
|
||||
echo " selected";
|
||||
echo ">" . lang_common("Group Public") . "</option></select>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
if ($format != "view") {
|
||||
echo "<tr><td><font size=\"-1\">" . lang_common("Which groups")
|
||||
. ":</font></td><td colspan=\"3\"><select name=\"n_groups[]\" "
|
||||
. "multiple size=\"5\">";
|
||||
|
||||
$user_groups = $phpgw->groups->read_names($fields["owner"]);
|
||||
for ($i=0;$i<count($user_groups);$i++) {
|
||||
echo "<option value=\"" . $user_groups[$i][0] . "\"";
|
||||
if (ereg(",".$user_groups[$i][0].",",$access))
|
||||
echo " selected";
|
||||
|
||||
echo ">" . $user_groups[$i][1] . "</option>\n";
|
||||
}
|
||||
echo "</select></font></td></tr>";
|
||||
}
|
||||
|
||||
if ($format == "view")
|
||||
echo "<tr><td><font size=\"-1\">" . lang_common("Created by") . ":</font></td>"
|
||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
||||
. grab_owner_name($fields[owner]);
|
||||
|
||||
?></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font size="-1"><?php echo lang_addressbook("Notes"); ?>:
|
||||
|
||||
</font></td>
|
||||
<td colspan="3">
|
||||
<font size="-1">
|
||||
<?php echo $notes; ?>
|
||||
</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
}
|
183
addressbook/index.php
Executable file
183
addressbook/index.php
Executable file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "addressbook";
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
echo "<center>" . lang_addressbook("Address book");
|
||||
|
||||
if (! $start)
|
||||
$start = 0;
|
||||
|
||||
$limit =$phpgw->nextmatchs->sql_limit($start);
|
||||
|
||||
if ($order)
|
||||
$ordermethod = "order by $order $sort";
|
||||
else
|
||||
$ordermethod = "order by lastname,firstname,email asc";
|
||||
|
||||
if ($filter != "private")
|
||||
$filtermethod = " or access='public' " . $phpgw->groups->sql_search();
|
||||
|
||||
if ($query) {
|
||||
$phpgw->db->query("select count(*) from addressbook where ( owner='"
|
||||
. $phpgw->session->loginid
|
||||
. "' $filtermethod ) AND (lastname like '%$query%' OR firstname like "
|
||||
. "'%$query%' OR email like '%$query%' OR street like '%$query%' OR "
|
||||
. "city like '%$query%' OR state like '%$query%' OR zip like '%$query%'"
|
||||
. " OR notes like '%$query%' OR company like '%$query%')");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) == 1)
|
||||
echo "<br>" . lang_common("your search returned 1 match");
|
||||
else
|
||||
echo "<br>" . lang_common("your search returned x matchs",$phpgw->db->f(0));
|
||||
} else {
|
||||
$phpgw->db->query("select count(*) from addressbook where owner='"
|
||||
. $phpgw->session->loginid . "' $filtermethod");
|
||||
}
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) > $phpgw_info["user"]["preferences"]["maxmatchs"])
|
||||
echo "<br>" . lang_common("showing x - x of x",($start + 1),
|
||||
($start + $phpgw_info["user"]["preferences"]["maxmatchs"]),$phpgw->db->f(0));
|
||||
else
|
||||
echo "<br>" . lang_common("showing x",$phpgw->db->f(0));
|
||||
?>
|
||||
|
||||
<?php
|
||||
$phpgw->nextmatchs->show("index.php",$start,$phpgw->db->f(0),
|
||||
"&order=$order&filter=$filter&sort="
|
||||
. "$sort&query=$query", "75%", $phpgw_info["theme"][th_bg]);
|
||||
?>
|
||||
|
||||
<table width=75% border=0 cellspacing=1 cellpadding=3>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"][th_bg]; ?>">
|
||||
<td width=29% height="21">
|
||||
<font size="-1" face="Arial, Helvetica, sans-serif">
|
||||
<?php echo $phpgw->nextmatchs->show_sort_order($sort,"lastname",$order,"index.php",
|
||||
lang_common("Last Name"));
|
||||
?>
|
||||
</font>
|
||||
</td>
|
||||
<td width="63%" height="21" bgcolor="<?php echo $phpgw_info["theme"][th_bg]; ?>">
|
||||
<font face="Arial, Helvetica, sans-serif" size="-1">
|
||||
<?php echo $phpgw->nextmatchs->show_sort_order($sort,"firstname",$order,"index.php",
|
||||
lang_common("First Name"));
|
||||
?>
|
||||
</font>
|
||||
</td>
|
||||
<td width="3%" height="21">
|
||||
<font face="Arial, Helvetica, sans-serif" size="-1">
|
||||
<?php echo lang_common("View"); ?>
|
||||
</font>
|
||||
</td>
|
||||
<td width="5%" height="21">
|
||||
<font face="Arial, Helvetica, sans-serif" size="-1">
|
||||
<?php echo lang_common("Edit"); ?>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ($query) {
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE (owner='" . $phpgw->session->loginid
|
||||
. "' $filtermethod ) AND (lastname like '%$query%' OR "
|
||||
. "firstname like '%$query%' OR email like '%$query%' OR "
|
||||
. "street like '%$query%' OR city like '%$query%' OR state "
|
||||
. "like '%$query%' OR zip like '%$query%' OR notes like "
|
||||
. "'%$query%') $ordermethod limit $limit");
|
||||
} else {
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE owner='" . $phpgw->session->loginid
|
||||
. "' $filtermethod $ordermethod limit $limit");
|
||||
}
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
$firstname = $phpgw->db->f("firstname");
|
||||
$lastname = $phpgw->db->f("lastname");
|
||||
$con = $phpgw->db->f("con");
|
||||
|
||||
/* This for for just showing the company name stored in lastname. */
|
||||
if (($lastname) && (! $firstname))
|
||||
$t_colspan = " colspan=2";
|
||||
else {
|
||||
$t_colspan = "";
|
||||
if ($firstname == "") $firstname = " ";
|
||||
if ($lastname == "") $lastname = " ";
|
||||
}
|
||||
|
||||
?>
|
||||
<tr bgcolor=<?php echo $tr_color; ?>>
|
||||
<td valign=top width=29%<?php echo $t_colspan; ?>>
|
||||
<font face=Arial, Helvetica, sans-serif size=2>
|
||||
<?php echo $lastname; ?>
|
||||
</font>
|
||||
</td>
|
||||
<?php if (! $t_colspan)
|
||||
echo "
|
||||
<td valign=top width=63%>
|
||||
<font face=Arial, Helvetica, sans-serif size=2>
|
||||
$firstname
|
||||
</font>
|
||||
</td>";
|
||||
?>
|
||||
<td valign=top width=3%>
|
||||
<font face=Arial, Helvetica, sans-serif size=2>
|
||||
<a href="<?php echo $phpgw->link("view.php","con=$con&start=$start&order=$order&filter="
|
||||
. "$filter&query=$query&sort=$sort");
|
||||
?>"> <?php echo lang_common("View"); ?> </a>
|
||||
</font>
|
||||
</td>
|
||||
<td valign=top width=5%>
|
||||
<font face=Arial, Helvetica, sans-serif size=2>
|
||||
<?php echo check_owner($phpgw->db->f("owner"),$phpgw->db->f("con")); ?>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
<form method="POST" action="add.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<input type="hidden" name="sort" value="<?php echo $sort; ?>">
|
||||
<input type="hidden" name="order" value="<?php echo $order; ?>">
|
||||
<input type="hidden" name="query" value="<?php echo $query; ?>">
|
||||
<input type="hidden" name="start" value="<?php echo $start; ?>">
|
||||
<input type="hidden" name="filter" value="<?php echo $filter; ?>">
|
||||
<table width="75%" border="0" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td width="4%">
|
||||
<div align="right">
|
||||
<input type="submit" name="Add" value="<?php echo lang_common("Add"); ?>">
|
||||
</div>
|
||||
</td>
|
||||
<td width="72%"> </td>
|
||||
<td width="24%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
29
addressbook/lang/br_addressbook.inc.php
Normal file
29
addressbook/lang/br_addressbook.inc.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Contatos"; break;
|
||||
case "last name": $s = "Ultimo Nome"; break;
|
||||
case "first name": $s = "Primeiro Nome"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Fone Residencial"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Fone Comercial"; break;
|
||||
case "pager": $s = "Pager"; break;
|
||||
case "mobile": $s = "Celular"; break;
|
||||
case "other number": $s = "Outro Numero"; break;
|
||||
case "street": $s = "Rua"; break;
|
||||
case "birthday": $s = "Aniversario"; break;
|
||||
case "city": $s = "Cidade"; break;
|
||||
case "state": $s = "Estado"; break;
|
||||
case "zip code": $s = "CEP"; break;
|
||||
case "notes": $s = "Notas"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
32
addressbook/lang/de_addressbook.inc.php
Executable file
32
addressbook/lang/de_addressbook.inc.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Addressbuch"; break;
|
||||
case "last name": $s = "Name"; break;
|
||||
case "first name": $s = "Vorname"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Tel privat"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Tel dienstl."; break;
|
||||
case "pager": $s = "Pager"; break;
|
||||
case "mobile": $s = "Mobil"; break;
|
||||
case "other number": $s = "andere Nr."; break;
|
||||
case "street": $s = "Straße"; break;
|
||||
case "birthday": $s = "Geburtstag"; break;
|
||||
case "city": $s = "Stadt"; break;
|
||||
case "state": $s = "Land"; break;
|
||||
case "zip code": $s = "PLZ"; break;
|
||||
case "notes": $s = "Notizen"; break;
|
||||
case "company name": $s = "Firma"; break;
|
||||
|
||||
default: $s = "* " . $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
?>
|
30
addressbook/lang/en_addressbook.inc.php
Executable file
30
addressbook/lang/en_addressbook.inc.php
Executable file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Address Book"; break;
|
||||
case "last name": $s = "Last Name"; break;
|
||||
case "first name": $s = "First Name"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Home Phone"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Work Phone"; break;
|
||||
case "pager": $s = "Pager"; break;
|
||||
case "mobile": $s = "Mobile"; break;
|
||||
case "other number": $s = "Other Number"; break;
|
||||
case "street": $s = "Street"; break;
|
||||
case "birthday": $s = "Birthday"; break;
|
||||
case "city": $s = "City"; break;
|
||||
case "state": $s = "State"; break;
|
||||
case "zip code": $s = "ZIP Code"; break;
|
||||
case "notes": $s = "Notes"; break;
|
||||
case "company name": $s = "company name"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
29
addressbook/lang/fr_addressbook.inc.php
Executable file
29
addressbook/lang/fr_addressbook.inc.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Carnet d'adresse"; break;
|
||||
case "last name": $s = "Nom"; break;
|
||||
case "first name": $s = "Prénom"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Téléphone Personnel"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Téléphone Professionnel"; break;
|
||||
case "pager": $s = "Pager"; break;
|
||||
case "mobile": $s = "Téléphone Portable"; break;
|
||||
case "other number": $s = "Autre numéro"; break;
|
||||
case "street": $s = "Rue"; break;
|
||||
case "birthday": $s = "Anniversaire"; break;
|
||||
case "city": $s = "Ville"; break;
|
||||
case "state": $s = "Etat"; break;//doesn't exist in france !!!
|
||||
case "zip code": $s = "Code Postal"; break;
|
||||
case "notes": $s = "Notes"; break;
|
||||
|
||||
default: $s = "* ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
29
addressbook/lang/kr_addressbook.inc.php
Executable file
29
addressbook/lang/kr_addressbook.inc.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "주소록"; break;
|
||||
case "last name": $s = "이름"; break;
|
||||
case "first name": $s = "성"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "집전화"; break;
|
||||
case "fax": $s = "팩스"; break;
|
||||
case "work phone": $s = "직장전화"; break;
|
||||
case "pager": $s = "삐삐"; break;
|
||||
case "mobile": $s = "핸드폰"; break;
|
||||
case "other number": $s = "기타번호"; break;
|
||||
case "street": $s = "주소"; break;
|
||||
case "birthday": $s = "생일"; break;
|
||||
case "city": $s = "도시"; break;
|
||||
case "state": $s = "지역"; break;
|
||||
case "zip code": $s = "우편번호"; break;
|
||||
case "notes": $s = "기타"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
29
addressbook/lang/nl_addressbook.inc.php
Executable file
29
addressbook/lang/nl_addressbook.inc.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Adresboek"; break;
|
||||
case "last name": $s = "Achteraam"; break;
|
||||
case "first name": $s = "Voornaam"; break;
|
||||
case "e-mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Telefoon privé"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Telefoon werk"; break;
|
||||
case "pager": $s = "Pieper"; break;
|
||||
case "mobile": $s = "Telefoon Mobiel"; break;
|
||||
case "other number": $s = "Ander nummer"; break;
|
||||
case "street": $s = "Straat"; break;
|
||||
case "birthday": $s = "Verjaardag"; break;
|
||||
case "city": $s = "Stad"; break;
|
||||
case "state": $s = "Provincie"; break;
|
||||
case "zip code": $s = "Postcode"; break;
|
||||
case "notes": $s = "Opmerkingen"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
29
addressbook/lang/no_addressbook.inc.php
Executable file
29
addressbook/lang/no_addressbook.inc.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "address book": $s = "Addresse Bok"; break;
|
||||
case "last name": $s = "Etternavn"; break;
|
||||
case "first name": $s = "Fornavn"; break;
|
||||
case "E-Mail": $s = "E-Post"; break;
|
||||
case "home phone": $s = "Hjemme telefon"; break;
|
||||
case "fax": $s = "Telefaks"; break;
|
||||
case "work phone": $s = "Arbeids telefon"; break;
|
||||
case "pager": $s = "Personsřker"; break;
|
||||
case "mobile": $s = "Mobil"; break;
|
||||
case "other number": $s = "Annet Nummer"; break;
|
||||
case "street": $s = "Gate"; break;
|
||||
case "birthday": $s = "Fřdselsdag"; break;
|
||||
case "city": $s = "By"; break;
|
||||
case "state": $s = "Stat"; break;
|
||||
case "zip code": $s = "Postnummer"; break;
|
||||
case "notes": $s = "Annet"; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
29
addressbook/lang/sp_addressbook.inc.php
Executable file
29
addressbook/lang/sp_addressbook.inc.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
function lang_addressbook($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last name": $s = "Apellido"; break;
|
||||
case "first name": $s = "Nombre"; break;
|
||||
case "E-Mail": $s = "E-Mail"; break;
|
||||
case "home phone": $s = "Tel.Particular"; break;
|
||||
case "fax": $s = "Fax"; break;
|
||||
case "work phone": $s = "Tel.Trabajo"; break;
|
||||
case "pager": $s = "Pager"; break;
|
||||
case "mobile": $s = "Tel.Celular"; break;
|
||||
case "other number": $s = "Otro Numero"; break;
|
||||
case "street": $s = "Calle"; break;
|
||||
case "birthday": $s = "Cumpleaños"; break;
|
||||
case "city": $s = "Ciudad"; break;
|
||||
case "state": $s = "Estado"; break;
|
||||
case "zip code": $s = "Codigo Postal"; break;
|
||||
case "notes": $s = "Notas"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
83
addressbook/view.php
Executable file
83
addressbook/view.php
Executable file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - addressbook *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] .
|
||||
"/addressbook/?sessionid=" . $phpgw->session->id);
|
||||
|
||||
if ($filter != "private")
|
||||
$filtermethod = " or access='public' " . $phpgw->groups->sql_search();
|
||||
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE con='$con' AND (owner='"
|
||||
. $phpgw->session->loginid . "' $filtermethod)");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$fields = array(
|
||||
'con' => $phpgw->db->f("con"),
|
||||
'owner' => $phpgw->db->f("owner"),
|
||||
'access' => $phpgw->db->f("access"),
|
||||
'firstname' => $phpgw->db->f("firstname"),
|
||||
'lastname' => $phpgw->db->f("lastname"),
|
||||
'email' => $phpgw->db->f("email"),
|
||||
'hphone' => $phpgw->db->f("hphone"),
|
||||
'wphone' => $phpgw->db->f("wphone"),
|
||||
'fax' => $phpgw->db->f("fax"),
|
||||
'pager' => $phpgw->db->f("pager"),
|
||||
'mphone' => $phpgw->db->f("mphone"),
|
||||
'ophone' => $phpgw->db->f("ophone"),
|
||||
'street' => $phpgw->db->f("street"),
|
||||
'city' => $phpgw->db->f("city"),
|
||||
'state' => $phpgw->db->f("state"),
|
||||
'zip' => $phpgw->db->f("zip"),
|
||||
'bday' => $phpgw->db->f("bday"),
|
||||
'company' => $phpgw->db->f("company"),
|
||||
'notes' => $phpgw->db->f("notes")
|
||||
);
|
||||
|
||||
$owner = $phpgw->db->f("owner");
|
||||
$con = $phpgw->db->f("con");
|
||||
|
||||
form("view","","View",$fields);
|
||||
?>
|
||||
<TABLE border=0 cellPadding=0 cellSpacing=0 width="95%">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE border=0 cellPadding=1 cellSpacing=1>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD align=left>
|
||||
<?php
|
||||
echo check_owner($owner,$con);
|
||||
?>
|
||||
</TD>
|
||||
<TD align=left>
|
||||
<a href="<?php echo $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>">Done</a>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
<?php
|
||||
//include($directorys["include_root"] . "/footer.inc.php");
|
84
admin/accesslog.php
Executable file
84
admin/accesslog.php
Executable file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
$show_maxlog = 30;
|
||||
?>
|
||||
<br>
|
||||
<table border="0" align="center" width="75%">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $phpgw_info["theme"][th_bg]; ?>" align="center" colspan="5">
|
||||
<?php echo lang_admin("Last x logins",$show_maxlog); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"][th_bg]; ?>">
|
||||
<td><?php echo lang_admin("LoginID"); ?></td>
|
||||
<td><?php echo lang_admin("IP"); ?></td>
|
||||
<td><?php echo lang_common("Login"); ?></td>
|
||||
<td><?php echo lang_common("Logout"); ?></td>
|
||||
<td><?php echo lang_common("Total"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
$phpgw->db->query("select loginid,ip,li,lo from access_log order by li desc "
|
||||
. "limit $show_maxlog");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
// In case there was a problem creating there session. eg, bad login time
|
||||
// I still want it to be printed here. This will alert the admin there
|
||||
// is a problem.
|
||||
if ($phpgw->db->f("li") && $phpgw->db->f("lo")) {
|
||||
$total = $phpgw->db->f("lo") - $phpgw->db->f("li");
|
||||
if ($total > 86400 && $total > 172800)
|
||||
$total = gmdate("z \d\a\y\s - G:i:s",$total);
|
||||
else if ($total > 172800)
|
||||
$total = gmdate("z \d\a\y - G:i:s",$total);
|
||||
else
|
||||
$total = gmdate("G:i:s",$total);
|
||||
} else
|
||||
$total = " ";
|
||||
|
||||
if ($phpgw->db->f("li"))
|
||||
$li = $phpgw->preferences->show_date($phpgw->db->f("li"));
|
||||
else
|
||||
$li = " ";
|
||||
|
||||
if ($phpgw->db->f("lo"))
|
||||
$lo = $phpgw->preferences->show_date($phpgw->db->f("lo"));
|
||||
else
|
||||
$lo = " ";
|
||||
|
||||
echo "<tr bgcolor=$tr_color><td>" . $phpgw->db->f("loginid") . "</td><td>"
|
||||
. $phpgw->db->f("ip") . "</td><td>$li</td><td>$lo</td><td>$total</td></tr>";
|
||||
}
|
||||
|
||||
$phpgw->db->query("select count(*) from access_log");
|
||||
$phpgw->db->next_record();
|
||||
$total = $phpgw->db->f(0);
|
||||
|
||||
$phpgw->db->query("select count(*) from access_log where lo!='0'");
|
||||
$phpgw->db->next_record();
|
||||
$loggedout = $phpgw->db->f(0);
|
||||
|
||||
$percent = round((10000 * ($loggedout / $total)) / 100);
|
||||
|
||||
echo "<tr bgcolor=" . $theme["bg_color"] . "><td colspan=5 align=left>"
|
||||
. lang_admin("Total records") . ": $total</td></tr>";
|
||||
|
||||
echo "<tr bgcolor=" . $theme["bg_color"] . "><td colspan=5 align=left>"
|
||||
. lang_admin("Percent of users that logged out") . ": $percent%</td></tr></table>";
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
50
admin/accounts.php
Executable file
50
admin/accounts.php
Executable file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
echo "<p><center>" . lang_admin("user accounts") . "<br><table border=0 width=65%>"
|
||||
. "<tr bgcolor=" . $theme["th_bg"] . "><td>" . lang_common("Last name") . "</td><td>"
|
||||
. lang_common("First name") . "</td><td> " . lang_common("Edit") . " </td> <td> "
|
||||
. lang_common("Delete") . " </td> <td> " . lang_common("View") . " </td></tr>\n";
|
||||
|
||||
$phpgw->db->query("select con,firstname,lastname,loginid from accounts order by "
|
||||
. "lastname, firstname");
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
$lastname = $phpgw->db->f("lastname");
|
||||
$firstname = $phpgw->db->f("firstname");
|
||||
|
||||
if (! $lastname) $lastname = ' ';
|
||||
if (! $firstname) $firstname = ' ';
|
||||
|
||||
echo "<tr bgcolor=$tr_color><td>$lastname</td><td>$firstname</td>"
|
||||
. "<td width=5%><a href=\"" . $phpgw->link("editaccount.php",
|
||||
"con=" . $phpgw->db->f("con")) . "\"> " . lang_common("Edit") . " </a></td>";
|
||||
|
||||
if ($phpgw->session->loginid != $phpgw->db->f("loginid"))
|
||||
echo "<td width=5%><a href=\"" . $phpgw->link("deleteaccount.php",
|
||||
"con=" . $phpgw->db->f("con")) . "\"> " . lang_common("Delete") . " </a></td>";
|
||||
else
|
||||
echo "<td width=5%> </td>";
|
||||
echo "<td width=5%><a href=\"" . $phpgw->link("viewaccount.php",
|
||||
"con=" . $phpgw->db->f("con")) . "\"> " . lang_common("View") . " </a> </td></tr>\n";
|
||||
}
|
||||
echo "\n<form method=POST action=\"newaccount.php\">"
|
||||
. $phpgw->session->hidden_var()
|
||||
. "<tr><td colspan=5><input type=\"submit\" value=\"" . lang_common("Add")
|
||||
. "\"></td></tr></form></table></center>";
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
72
admin/creategroup.php
Executable file
72
admin/creategroup.php
Executable file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $submit) {
|
||||
?>
|
||||
<form action="creategroup.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<center>
|
||||
<p><?php echo lang_admin("New group name"); ?> <input name="n_group">
|
||||
<br><?php echo lang_admin("Select users for inclusion"); ?>
|
||||
<?php
|
||||
echo "<select name=\"n_users[]\" multiple size=10>\n";
|
||||
|
||||
$phpgw->db->query("SELECT con, firstname, lastname FROM accounts ORDER BY lastname asc");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("con") . "\">"
|
||||
. $phpgw->db->f("firstname") . " " . $phpgw->db->f("lastname") . "</option>";
|
||||
}
|
||||
echo "</select>\n";
|
||||
?>
|
||||
<br><input type="submit" name="submit" value="<?php echo lang_admin("Create Group"); ?>">
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
} else {
|
||||
|
||||
$phpgw->db->lock(array("accounts","groups"));
|
||||
|
||||
$phpgw->db->query("INSERT INTO groups (group_name) VALUES ('$n_group') ");
|
||||
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
||||
$groups_con = $phpgw->db->f("group_id");
|
||||
|
||||
for($i=0; $i<count($n_users);$i++)
|
||||
{
|
||||
$phpgw->db->query("SELECT groups FROM accounts WHERE con=".$n_users[$i]);
|
||||
$user_groups = $phpgw->db->f("groups") . ",$group_con,";
|
||||
$user_groups = ereg_replace(",,",",",$user_groups);
|
||||
$phpgw->db->query("UPDATE accounts SET groups='$user_groups' WHERE con=".$n_users[$i]);
|
||||
}
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"]
|
||||
. $phpgw_info["server"]["dir_separator"]
|
||||
. "filemanager"
|
||||
. $phpgw_info["server"]["dir_separator"]
|
||||
. "groups"
|
||||
. $phpgw_info["server"]["dir_separator"];
|
||||
|
||||
$cd = 31;
|
||||
|
||||
if (!mkdir ($basedir . $n_group, 0707)) $cd = 37;
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link("groups.php","cd=$cd"));
|
||||
}
|
82
admin/currentusers.php
Executable file
82
admin/currentusers.php
Executable file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $start)
|
||||
$start = 0;
|
||||
|
||||
$limit =$phpgw->nextmatchs->sql_limit($start);
|
||||
$phpgw->db->query("select count(*) from sessions");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$total = $phpgw->db->f(0);
|
||||
$limit = $phpgw->nextmatchs->sql_limit($start);
|
||||
?>
|
||||
<center>
|
||||
<?php echo lang_admin("List of current users"); ?>:
|
||||
<table border="0" width="50%">
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"][bg_color]; ?>">
|
||||
<?php echo $phpgw->nextmatchs->left("currentusers.php",$start,$total);
|
||||
?>
|
||||
<td> </td>
|
||||
<?php echo $phpgw->nextmatchs->right("currentusers.php",$start,$total);
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"][th_bg]; ?>">
|
||||
<?php // This will pass unneeded vars, not a big deal ?>
|
||||
<td><?php echo $phpgw->nextmatchs->show_sort_order($sort,"loginid",$order,"currentusers.php",
|
||||
lang_admin("LoginID")); ?></td>
|
||||
<td><?php echo $phpgw->nextmatchs->show_sort_order($sort,"ip",$order,"currentusers.php",
|
||||
lang_admin("IP")); ?></td>
|
||||
<td><?php echo $phpgw->nextmatchs->show_sort_order($sort,"logintime",$order,"currentusers.php",
|
||||
lang_admin("Login Time"));?></td>
|
||||
<td><?php echo $phpgw->nextmatchs->show_sort_order($sort,"dla",$order,"currentusers.php",
|
||||
lang_admin("idle")); ?></td>
|
||||
<td><?php echo lang_admin("Kill"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($order)
|
||||
$ordermethod = "order by $order $sort";
|
||||
else
|
||||
$ordermethod = "order by dla asc";
|
||||
|
||||
$phpgw->db->query("select * from sessions $ordermethod limit $limit");
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
?>
|
||||
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||
<td><?php echo $phpgw->db->f("loginid"); ?></td>
|
||||
<td><?php echo $phpgw->db->f("ip"); ?></td>
|
||||
<td><?php echo $phpgw->preferences->show_date($phpgw->db->f("logintime")); ?></td>
|
||||
<td><?php echo gmdate("G:i:s",(time() - $phpgw->db->f("dla")) ); ?></td>
|
||||
<td><?php if ($phpgw->db->f("sessionid") != $phpgw->session->id) {
|
||||
echo "<a href=\"" . $phpgw->link("killsession.php","ksession="
|
||||
. $phpgw->db->f("sessionid") . "&kill=true\">"
|
||||
. lang_admin("Kill"));
|
||||
} else {
|
||||
echo " ";
|
||||
}
|
||||
?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</center>
|
||||
</table>
|
||||
|
||||
<?php include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); ?>
|
102
admin/deleteaccount.php
Executable file
102
admin/deleteaccount.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
// Make sure they are not attempting to delete there own account.
|
||||
// If they are, they should not reach this point anyway.
|
||||
if ($phpgw->session->con == $con) {
|
||||
Header("Location: " . $phpgw->link("accounts.php"));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (($con) && (! $confirm)) {
|
||||
?>
|
||||
<center>
|
||||
<table border=0 with=65%>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("Are you sure you want to delete this account ?"); ?>
|
||||
<td>
|
||||
</tr>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("All records and account information will be lost!"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("accounts.php") . "\">" . lang_common("No"); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("deleteaccount.php","con=$con&confirm=true") . "\">" . lang_common("Yes"); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("select loginid from accounts where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
$lid = $phpgw->db->f(0);
|
||||
|
||||
$phpgw->db->query("select cal_id from webcal_entry where cal_create_by='$lid'");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$cal_id[$i] = $phpgw->db->f("cal_id");
|
||||
echo "<br>" . $phpgw->db->f("cal_id");
|
||||
$i++;
|
||||
}
|
||||
|
||||
$table_locks = array('preferences','todo','addressbook','accounts','users_headlines',
|
||||
'webcal_entry','webcal_entry_user','webcal_entry_repeats',
|
||||
'webcal_entry_groups');
|
||||
$phpgw->db->lock($table_locks);
|
||||
|
||||
for ($i=0; $i<count($cal_id); $i++) {
|
||||
$phpgw->db->query("delete from webcal_entry_repeats where cal_id='$cal_id[$i]'");
|
||||
$phpgw->db->query("delete from webcal_entry_groups where cal_id='$cal_id[$i]'");
|
||||
}
|
||||
|
||||
$phpgw->db->query("delete from webcal_entry where cal_create_by='$lid'");
|
||||
$phpgw->db->query("delete from webcal_entry_user where cal_login='$lid'");
|
||||
|
||||
$phpgw->db->query("delete from preferences where owner='$lid'");
|
||||
$phpgw->db->query("delete from todo where owner='$lid'");
|
||||
$phpgw->db->query("delete from addressbook where owner='$lid'");
|
||||
$phpgw->db->query("delete from accounts where loginid='$lid'");
|
||||
$phpgw->db->query("delete from users_headlines where owner='$lid'");
|
||||
$phpgw->db->query("delete from profiles where owner='$lid'");
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users"
|
||||
. $sep;
|
||||
|
||||
if (! @rmdir($basedir . $lid)) {
|
||||
$cd = 34;
|
||||
} else {
|
||||
$cd = 29;
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("accounts.php","cd=$cd"));
|
||||
}
|
||||
?>
|
86
admin/deletegroup.php
Executable file
86
admin/deletegroup.php
Executable file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
if (! $group_id)
|
||||
Header("Location: " . $phpgw->link("groups.php"));
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
// I would like to have an option to auto remove users from the group
|
||||
if (($group_id) && (! $confirm)) {
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
|
||||
$phpgw->db->query("select con,loginid from accounts where groups like '%$group_id%'");
|
||||
if ($phpgw->db->num_rows()) {
|
||||
echo '<p><center>';
|
||||
echo lang_admin("Sorry, the follow users are still a member of the group x",$group_name)
|
||||
. '<br>' . lang_admin("They must be removed before you can continue")
|
||||
. '</td></tr>';
|
||||
|
||||
echo '<table border="0"><tr><td>';
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo '<tr><td><a href="' . $phpgw->link("editaccount.php","con=" . $phpgw->db->f("con")) . '">' . $phpgw->db->f("loginid") . '</a></tr></td>';
|
||||
}
|
||||
echo "</table></center>";
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<center>
|
||||
<table border=0 with=65%>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("Are you sure you want to delete this group ?"); ?>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("groups.php") . "\">" . lang_common("No") . "</a>"; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("deletegroup.php","group_id=$group_id&confirm=true") . "\">" . lang_common("Yes") . "</a>"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
}
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->next_record();
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
|
||||
$phpgw->db->query("delete from groups where group_id='$group_id'");
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users"
|
||||
. $sep;
|
||||
|
||||
if (! @rmdir($basedir . $group_name)) {
|
||||
$cd = 38;
|
||||
} else {
|
||||
$cd = 32;
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("groups.php","cd=$cd"));
|
||||
}
|
64
admin/deleteheadline.php
Executable file
64
admin/deleteheadline.php
Executable file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
|
||||
function remove_account_data($query,$t)
|
||||
{
|
||||
global $phpgw->db;
|
||||
$phpgw->db->query("delete from $t where $query");
|
||||
}
|
||||
|
||||
if (($con) && (! $confirm)) {
|
||||
?>
|
||||
<center>
|
||||
<table border=0 with=65%>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("Are you sure you want to delete this news site ?"); ?>
|
||||
<td>
|
||||
</tr>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("All records and account information will be lost!"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("headlines.php") . "\">" . lang_common("No"); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("deleteheadline.php","con=$con&confirm=true") . "\">" . lang_common("Yes"); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
}
|
||||
else {
|
||||
$table_locks = array('news_site','news_headlines','users_headlines');
|
||||
$phpgw->db->lock($table_locks);
|
||||
|
||||
remove_account_data("con=$con","news_site");
|
||||
remove_account_data("site=$con","news_headlines");
|
||||
remove_account_data("site=$con","users_headlines");
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link("headlines.php","cd=29"));
|
||||
}
|
232
admin/editaccount.php
Executable file
232
admin/editaccount.php
Executable file
@ -0,0 +1,232 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: " . $phpgw->link("accounts.php"));
|
||||
|
||||
function change_owner($app,$table,$field,$new,$old)
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
if ($phpgw_info["apps"][$app]["enabled"] || ! $app) {
|
||||
$phpgw->db->query("update $table set $field='$new' where $field='$old'");
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit) {
|
||||
$phpgw->db->query("select loginid from accounts where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
$lid = $phpgw->db->f("loginid");
|
||||
|
||||
$phpgw->db->lock(array('accounts','preferences','sessions'));
|
||||
|
||||
if ($n_passwd || $n_passwd_2) {
|
||||
if ($n_passwd != $n_passwd_2)
|
||||
$error .= lang_admin("The two passwords are not the same");
|
||||
|
||||
if (! $n_passwd)
|
||||
$error .= lang_admin("You must enter a password");
|
||||
}
|
||||
|
||||
if ($lid != $n_loginid) {
|
||||
$phpgw->db->query("select loginid from accounts where loginid='$n_loginid'");
|
||||
if ($phpgw->db->num_rows() != 0) {
|
||||
$error .= "<br>" . lang_admin("That loginid has already been taken");
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
if ($n_passwd) {
|
||||
$phpgw->db->query("update accounts set passwd='" . md5($n_passwd) . "', "
|
||||
. "lastpasswd_change='" . time() . "' where loginid='"
|
||||
. "$lid'");
|
||||
|
||||
$phpgw->db->query("update sessions set passwd='" . addslashes($n_passwd)
|
||||
. "' where loginid='$lid'");
|
||||
}
|
||||
|
||||
while ($permission = each($new_permissions)) {
|
||||
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
|
||||
$phpgw->permissions->add($permission[0]);
|
||||
}
|
||||
}
|
||||
$phpgw->permissions->add("hr");
|
||||
|
||||
if ($new_permissions["anonymous"] && ! $new_permissions["admin"])
|
||||
$phpgw->permissions->add("anonymous");
|
||||
|
||||
if (! $n_account_status)
|
||||
$n_account_status = "L";
|
||||
|
||||
$cd = 27;
|
||||
|
||||
// If they changed there loginid, we need to change the owner in ALL
|
||||
// tables to reflect on the new one
|
||||
if ($lid != $n_loginid) {
|
||||
change_owner("","preferences","owner",$n_loginid,$lid);
|
||||
change_owner("addressbook","addressbook","owner",$n_loginid,$lid);
|
||||
change_owner("todo","todo","owner",$n_loginid,$lid);
|
||||
change_owner("","accounts","loginid",$n_loginid,$lid);
|
||||
change_owner("","sessions","loginid",$n_loginid,$lid);
|
||||
change_owner("calendar","webcal_entry","cal_create_by",$n_loginid,$lid);
|
||||
change_owner("calendar","webcal_entry_user","cal_login",$n_loginid,$lid);
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep
|
||||
. "users" . $sep;
|
||||
|
||||
if (! rename($basedir . $lid, $basedir . $n_loginid)) {
|
||||
$cd = 35;
|
||||
}
|
||||
}
|
||||
|
||||
$phpgw->db->query("update accounts set firstname='" . addslashes($n_firstname) . "',"
|
||||
. " lastname='" . addslashes($n_lastname) . "', permissions='"
|
||||
. $phpgw->permissions->add_rebuild() . "', status='"
|
||||
. "$n_account_status', groups='"
|
||||
. $phpgw->groups->array_to_string("none",$n_groups)
|
||||
. "' where loginid='$n_loginid'");
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link("accounts.php", "cd=$cd"));
|
||||
exit;
|
||||
} // if ! $error
|
||||
} // if $submit
|
||||
|
||||
$phpgw->common->header();
|
||||
$phpgw->common->navbar();
|
||||
|
||||
$phpgw->db->query("select * from accounts where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$account_status = $phpgw->db->f("status");
|
||||
$db_perms = $phpgw->permissions->read_other($phpgw->db->f("loginid"));
|
||||
?>
|
||||
|
||||
<form method="POST" action="editaccount.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<input type="hidden" name="con" value="<? echo $con; ?>">
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<center>" . lang_common("Error") . ":$error</center>";
|
||||
}
|
||||
?>
|
||||
<center>
|
||||
<table border=0 width=65%>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("LoginID"); ?></td>
|
||||
<td><input name="n_loginid" value="<? echo $phpgw->db->f("loginid"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("First Name"); ?></td>
|
||||
<td><input name="n_firstname" value="<?echo $phpgw->db->f("firstname"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("Last Name"); ?></td>
|
||||
<td><input name="n_lastname" value="<? echo $phpgw->db->f("lastname"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("Groups"); ?></td>
|
||||
<td><select name="n_groups[]" multiple size="5">
|
||||
<?php
|
||||
$user_groups = $phpgw->groups->read_names($phpgw->db->f("loginid"));
|
||||
|
||||
$phpgw->db->query("select * from groups");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("group_id") . "\"";
|
||||
|
||||
for ($i=0; $i<count($user_groups); $i++) {
|
||||
if ($user_groups[$i][0] == $phpgw->db->f("group_id"))
|
||||
echo " selected";
|
||||
}
|
||||
echo ">" . $phpgw->db->f("group_name") . "</option>\n";
|
||||
|
||||
}
|
||||
?></select>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
while ($permission = each($phpgw_info["apps"])) {
|
||||
if ($permission[1]["enabled"]) {
|
||||
$perm_display[$i][0] = $permission[0];
|
||||
$perm_display[$i][1] = $permission[1]["title"];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
||||
if (! $perm_display[$i][1]) break;
|
||||
|
||||
echo '<tr><td>' . lang_common($perm_display[$i][1]) . '</td>'
|
||||
. '<td><input type="checkbox" name="new_permissions['
|
||||
. $perm_display[$i][0] . ']" value="True"';
|
||||
if ($new_permissions[$perm_display[$i][0]] || $db_perms[$perm_display[$i][0]]) {
|
||||
echo " checked";
|
||||
}
|
||||
echo "></td>";
|
||||
|
||||
$i++;
|
||||
|
||||
if (! $perm_display[$i][1]) break;
|
||||
|
||||
echo '<td>' . lang_common($perm_display[$i][1]) . '</td>'
|
||||
. '<td><input type="checkbox" name="new_permissions['
|
||||
. $perm_display[$i][0] . ']" value="True"';
|
||||
if ($new_permissions[$perm_display[$i][0]] || $db_perms[$perm_display[$i][0]]) {
|
||||
echo " checked";
|
||||
}
|
||||
echo "></td></tr>";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "<tr><td>" . lang_admin("Anonymous user") . "</td><td><input type=\""
|
||||
. "checkbox\" name=\"new_permissions[anonymous]\" value=\"True\"";
|
||||
if ($db_perms["anonymous"] || $new_permissions[anonymous])
|
||||
echo " checked";
|
||||
echo "></td>";
|
||||
|
||||
echo "<td>" . lang_admin("Manager") . "</td><td><input type=\""
|
||||
. "checkbox\" name=\"new_permissions[manager]\" value=\"True\"";
|
||||
if ($db_perms["manager"] || $new_permissions[manager])
|
||||
echo " checked";
|
||||
echo "></td></tr>";
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Account active"); ?></td>
|
||||
<td><input type="checkbox" name="n_account_status" value="A" <?php
|
||||
if ($account_status == "A") { echo " checked"; } ?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("New password [ Leave blank for no change ]"); ?></td>
|
||||
<td><input type=password name="n_passwd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Re-enter password"); ?></td>
|
||||
<td><input type=password name="n_passwd_2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2><input type="submit" name="submit" value="<?php echo lang_common("submit"); ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
61
admin/editgroup.php
Executable file
61
admin/editgroup.php
Executable file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
if (! $group_id)
|
||||
Header("Location: " . $phpgw->link("groups.php"));
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $submit) {
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->next_record();
|
||||
?>
|
||||
<form action="editgroup.php">
|
||||
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<center>
|
||||
<p><?php echo lang_admin("Group name"); ?> <input name="n_group" value="<?php echo $phpgw->db->f("group_name"); ?>">
|
||||
<br><input type="submit" name="submit" value="<?php echo lang_common("Change"); ?>">
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
} else {
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
|
||||
$phpgw->db->query("update groups set group_name='" . addslashes($n_group)
|
||||
. "' where group_id='$group_id'");
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "groups"
|
||||
. $sep;
|
||||
|
||||
if (! rename($basedir . $group_name,$basedir . $n_group)) {
|
||||
$cd = 39;
|
||||
} else {
|
||||
$cd = 33;
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("groups.php","cd=$cd"));
|
||||
}
|
||||
|
93
admin/editheadline.php
Executable file
93
admin/editheadline.php
Executable file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: " . $phpgw->link("headlines.php"));
|
||||
|
||||
if ((! $submit) && ($con)) {
|
||||
|
||||
$phpgw->db->query("select * from news_site where con=$con");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
?>
|
||||
|
||||
<form method="POST" action="editheadline.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<input type="hidden" name="o_con" value="<? echo $con; ?>">
|
||||
|
||||
<center>
|
||||
<table border=0 width=65%>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Display"); ?></td>
|
||||
<td><input name="n_display" value="<?echo $phpgw->db->f("display"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Base URL"); ?></td>
|
||||
<td><input name="n_base_url" value="<? echo $phpgw->db->f("base_url"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("News File"); ?></td>
|
||||
<td><input name="n_newsfile" value="<? echo $phpgw->db->f("newsfile"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Minutes between Reloads"); ?></td>
|
||||
<td><input name="n_cachetime" value="<? echo $phpgw->db->f("cachetime"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Listings Displayed"); ?></td>
|
||||
<td><input name="n_listings" value="<? echo $phpgw->db->f("listings"); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("News Type"); ?></td>
|
||||
<td>
|
||||
<?
|
||||
$news_type = array('rdf','fm','lt','sf','rdf-chan');
|
||||
for ($i=0;$i<count($news_type);$i++) {
|
||||
echo "<input type=\"radio\" name=\"n_newstype\" value=\"" . $news_type[$i] . "\"";
|
||||
if($phpgw->db->f("newstype") == $news_type[$i]) echo " checked";
|
||||
echo "> $news_type[$i]<br>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2><input type="submit" name="submit" value="<?php echo lang_common("submit"); ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
} else {
|
||||
$phpgw->db->lock("news_site");
|
||||
|
||||
$phpgw->db->query("UPDATE news_site SET display='" . addslashes($n_display) . "', "
|
||||
. "base_url='" . addslashes($n_base_url) . "', "
|
||||
. "newsfile='" . addslashes($n_newsfile) . "', "
|
||||
. "lastread=0, newstype='" . $n_newstype . "', "
|
||||
. "cachetime=$n_cachetime, listings=$n_listings "
|
||||
. "WHERE con=$o_con");
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/admin/headlines.php", "cd=27"));
|
||||
}
|
||||
?>
|
41
admin/groups.php
Executable file
41
admin/groups.php
Executable file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
echo "<p><center>" . lang_admin("User groups") . "<br><table border=0 width=35%>"
|
||||
. "<tr bgcolor=" . $theme["th_bg"] . "><td>" . lang_common("Name") . "</td>"
|
||||
. "<td> " . lang_common("Edit") . " </td> <td> " . lang_common("Delete")
|
||||
. " </td> </tr>";
|
||||
|
||||
$phpgw->db->query("select * from groups order by group_name");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
|
||||
if (! $group_name) $group_name = ' ';
|
||||
|
||||
echo "<tr bgcolor=$tr_color><td>$group_name</td>"
|
||||
. "<td width=5%><a href=\"" . $phpgw->link("editgroup.php","group_id=" . $phpgw->db->f("group_id"))
|
||||
. "\"> " . lang_common("Edit") . " </a></td>" . "<td width=5%><a href=\""
|
||||
. $phpgw->link("deletegroup.php","group_id=" . $phpgw->db->f("group_id"))
|
||||
. "\"> " . lang_common("Delete") . " </a></td>";
|
||||
}
|
||||
echo "<form method=POST action=\"creategroup.php\">"
|
||||
. $phpgw->session->hidden_var()
|
||||
. "<tr><td colspan=5><input type=\"submit\" value=\"" . lang_common("Add") . "\"></td></tr>"
|
||||
. "</form></table></center>";
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
47
admin/headlines.php
Executable file
47
admin/headlines.php
Executable file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
echo "<p><center>" . lang_admin("Headline Sites") . "<br><table border=0 width=65%>"
|
||||
. "<tr bgcolor=" . $theme["th_bg"] . "><td>" . lang_admin("Site") . "</td>"
|
||||
. "<td> " . lang_common("Edit") . " </td> <td> " . lang_common("Delete") . " </td> <td> "
|
||||
. lang_common("View") . " </td></tr>";
|
||||
$phpgw->db->query("select con,display from news_site order by "
|
||||
. "display");
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
$display = $phpgw->db->f("display");
|
||||
|
||||
if (! $display)
|
||||
$display = ' ';
|
||||
|
||||
echo "<tr bgcolor=$tr_color><td>$display</td>"
|
||||
. "<td width=5%><a href=\"".$phpgw->link("editheadline.php",
|
||||
"con=".$phpgw->db->f("con"))."\"> ".lang_common("Edit")." </a></td>";
|
||||
|
||||
echo "<td width=5%><a href=\"".$phpgw->link("deleteheadline.php",
|
||||
"con=".$phpgw->db->f("con"))."\"> ".lang_common("Delete")." </a></td>";
|
||||
echo "<td width=5%><a href=\"".$phpgw->link("viewheadline.php",
|
||||
"con=".$phpgw->db->f("con"))."\"> ".lang_common("View")." </a> </td></tr>\n";
|
||||
}
|
||||
echo "<form method=POST action=\"newheadline.php\">"
|
||||
. $phpgw->session->hidden_var()
|
||||
. "<tr><td colspan=\"5\"><input type=\"submit\" value=\"".lang_common("Add")
|
||||
. "\"></td></tr></form></table></center>";
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
41
admin/index.php
Executable file
41
admin/index.php
Executable file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
|
||||
include("../header.inc.php");
|
||||
check_code($cd);
|
||||
?>
|
||||
|
||||
<p>
|
||||
<br><a href="<?php echo $phpgw->link("accounts.php") . "\">" . lang_admin("User accounts"); ?></a>
|
||||
<br><a href="<?php echo $phpgw->link("groups.php") . "\">" . lang_admin("User groups"); ?></a>
|
||||
<p><a href="<?php echo $phpgw->link("currentusers.php") . "\">" . lang_admin("View sessions"); ?></a>
|
||||
<br><a href="<?php echo $phpgw->link("accesslog.php") . "\">" . lang_admin("View Access Log"); ?></a>
|
||||
<p><a href="<?php echo $phpgw->link("headlines.php") . "\">" . lang_admin("Headline Sites"); ?></a>
|
||||
<p><a href="<?php echo $phpgw->link("nntp.php") . "\">" . lang_admin("Network News"); ?></a>
|
||||
<?php
|
||||
if ( $SHOW_INFO > 0 ) {
|
||||
echo "<p><a href=\"".$phpgw->link($PHP_SELF, "SHOW_INFO=0")."\">Hide PHP Information</a>";
|
||||
echo "<hr>\n";
|
||||
phpinfo();
|
||||
echo "<hr>\n";
|
||||
}
|
||||
else {
|
||||
echo "<p><a href=\"".$phpgw->link($PHP_SELF, "SHOW_INFO=1")."\">PHP Information</a>";
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
51
admin/killsession.php
Executable file
51
admin/killsession.php
Executable file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if ($ksessionid == $phpgw->session->id) {
|
||||
Header("Location: " . $phpgw->link("currentusers.php"));
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("delete from sessions where sessionid='$ksession'");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/admin/currentusers.php",
|
||||
"cd=19"));
|
||||
} else {
|
||||
?>
|
||||
<center>
|
||||
<table border=0 with=65%>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang_admin("Are you sure you want to kill this session ?"); ?>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("currentusers.php") . "\">" . lang_common("No"); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("killsession.php","ksession=$ksession&confirm=true")
|
||||
. "\">" . lang_common("Yes"); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?
|
||||
}
|
||||
|
103
admin/lang/br_admin.inc.php
Normal file
103
admin/lang/br_admin.inc.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Ultimo $m1 login"; break;
|
||||
case "loginid": $s = "Identificativo Login"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Total de registros"; break;
|
||||
case "user accounts": $s = "Contas de Usuarios"; break;
|
||||
case "new group name": $s = "Novo nome do Grupo"; break;
|
||||
case "create group": $s = "Criar Grupo"; break;
|
||||
case "kill": $s = "Matar"; break;
|
||||
case "idle": $s = "inativo"; break;
|
||||
case "login time": $s = "Hora do Login"; break;
|
||||
case "anonymous user": $s = "Usuario Anonimo"; break;
|
||||
case "account active": $s = "Conta Inativa"; break;
|
||||
case "re-enter password": $s = "Re-digite sua senha"; break;
|
||||
case "group name": $s = "Nome do Grupo"; break;
|
||||
case "display": $s = "Visualiza"; break;
|
||||
case "base url": $s = "URL de base"; break;
|
||||
case "news file": $s = "Arquivo de news"; break;
|
||||
case "minutes between reloads": $s = "Minutos entre reloads"; break;
|
||||
case "listings displayed": $s = "listagens mostradas"; break;
|
||||
case "news type": $s = "Tipo de news"; break;
|
||||
case "user groups": $s = "Grupos de Usuarios"; break;
|
||||
case "headline sites": $s = "Headlines"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "Visualiza Sessao"; break;
|
||||
case "view access log": $s = "Visualiza Log de acesso"; break;
|
||||
case "active": $s = "Ativo"; break;
|
||||
case "disabled": $s = "Desabilitato"; break;
|
||||
case "last time read": $s = "Ultima Leitura"; break;
|
||||
case "manager": $s = "Gerente"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Voce tem certeza que deseja apagar este grupo ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Voce tem certeza que deseja matar esta secao ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Todos registros e informacoes de contas serao perdidas!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Tem certeza que deseja apagar esta conta ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Tem certeza que deseja apagar este site news ?"; break;
|
||||
|
||||
case "* make sure that you remove users from this group before you delete it.":
|
||||
$s = "* tenha certeza de apagar os usuarios deste grupo antes de voce apaga-lo."; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Percentual de usuarios que terminaram a secao corretamente"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "Lista de usuarios correntes"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nova Senha [ Deixe em branco para nao alterar ]"; break;
|
||||
|
||||
case "The two passwords are not the same":
|
||||
$s = "As duas senhas nao sao a mesma"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "O login nao pode ser o mesmo da senha"; break;
|
||||
|
||||
case "You must enter a password":
|
||||
$s = "Voce deve digitar uma senha"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Este nome ja esta em uso"; break;
|
||||
|
||||
case "you must enter a display":
|
||||
$s = "Voce deve digitar o display"; break;
|
||||
|
||||
case "you must enter a base url":
|
||||
$s = "Insira a URL base"; break;
|
||||
|
||||
case "you must enter a news url":
|
||||
$s = "Voce deve digitar uma URL de news"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Entre com o numero de minutos entre os reloads"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Digite o numero de listagens exibidas"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Voce deve selecionar um tipo de arquivo"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Este site ja foi cadastrado"; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
98
admin/lang/de_admin.inc.php
Executable file
98
admin/lang/de_admin.inc.php
Executable file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Letze $m1 Logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Anzahl Datensätze insgesamt"; break;
|
||||
case "user accounts": $s = "Benutzerkonten"; break;
|
||||
case "new group name": $s = "Neuer Gruppenname"; break;
|
||||
case "create group": $s = "Erstelle Gruppe"; break;
|
||||
case "kill": $s = "Kill"; break;
|
||||
case "idle": $s = "idle"; break;
|
||||
case "login time": $s = "Login Zeit"; break;
|
||||
case "anonymous user": $s = "Anonymer User"; break;
|
||||
case "account active": $s = "Konto aktiv"; break;
|
||||
case "re-enter password": $s = "Passwort wiederholen"; break;
|
||||
case "group name": $s = "Gruppenname"; break;
|
||||
case "display": $s = "Bezeichnung"; break;
|
||||
case "base url": $s = "Basis URL"; break;
|
||||
case "news file": $s = "News File"; break;
|
||||
case "minutes between reloads": $s = "Minuten zwischen Reloads"; break;
|
||||
case "listings displayed": $s = "Zeilen maximal"; break;
|
||||
case "news type": $s = "Nachrichtentyp"; break;
|
||||
case "user groups": $s = "Benutzergruppen"; break;
|
||||
case "headline sites": $s = "Sites für Schlagzeilen"; break;
|
||||
case "network news": $s = "Network News"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "Sitzungen anzeigen"; break;
|
||||
case "view access log": $s = "Access Log anzeigen"; break;
|
||||
case "active": $s = "Aktiv"; break;
|
||||
case "disabled": $s = "Deaktiviert"; break;
|
||||
case "last time read": $s = "Zuletzt gelesen"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Sind Sie sicher, daß Sie diese Gruppe löschen wollen ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Sind Sie sicher, daß Sie diese Session killen wollen ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Alle Datensätze und Account Informationen sind dann verloren!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Sind Sie sicher, daß Sie diesen Account löschen wollen ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Sind Sie sicher, diese News Site löschen zu wollen ?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Prozent der User, die sich korrekt ausgelogged haben"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "Liste der gegenwärtigen User"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Neues Passwort [ Lassen Sie das Feld leer, wenn es nicht geändert werden soll ]"; break;
|
||||
|
||||
case "the two passwords are not the same":
|
||||
$s = "Die Passworte stimmen nicht überein"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "Login und Passwort dürfen nicht identisch sein"; break;
|
||||
|
||||
case "you must enter a password": $s = "Sie müssen ein Passwort eingeben"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Diese LoginID ist bereits vergeben"; break;
|
||||
|
||||
case "you must enter a display": $s = "Sie müssen einen Namen für die Site eingeben"; break;
|
||||
case "you must enter a base url": $s = "Sie müssen eine Basis URL angeben"; break;
|
||||
case "you must enter a news url": $s = "Sie müssen eine News URL angeben"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Sie müssen eine Anzahl von Minuten zwischen Reloads angeben"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Sie müssen die Anzahl der anzuzeigenden Zeilen angeben"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Sie müssen einen Filetyp auswählen"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Diese Site wurde bereits eingegeben"; break;
|
||||
|
||||
case "select users for inclusion":
|
||||
$s = "Wählen Sie Benutzer für diese Gruppe aus"; break;
|
||||
|
||||
default: $s = "* ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
107
admin/lang/en_admin.inc.php
Executable file
107
admin/lang/en_admin.inc.php
Executable file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Last $m1 logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Total records"; break;
|
||||
case "user accounts": $s = "User accounts"; break;
|
||||
case "new group name": $s = "New group name"; break;
|
||||
case "create group": $s = "Create Group"; break;
|
||||
case "kill": $s = "Kill"; break;
|
||||
case "idle": $s = "idle"; break;
|
||||
case "login time": $s = "Login Time"; break;
|
||||
case "anonymous user": $s = "Anonymous user"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
case "account active": $s = "Account active"; break;
|
||||
case "re-enter password": $s = "Re-enter password"; break;
|
||||
case "group name": $s = "Group Name"; break;
|
||||
case "display": $s = "Display"; break;
|
||||
case "base url": $s = "Base URL"; break;
|
||||
case "news file": $s = "News File"; break;
|
||||
case "minutes between reloads": $s = "Minutes between Reloads"; break;
|
||||
case "listings displayed": $s = "Listings Displayed"; break;
|
||||
case "news type": $s = "News Type"; break;
|
||||
case "user groups": $s = "User groups"; break;
|
||||
case "headline sites": $s = "Headline Sites"; break;
|
||||
case "network news": $s = "Network News"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "View sessions"; break;
|
||||
case "view access log": $s = "View Access Log"; break;
|
||||
case "active": $s = "Active"; break;
|
||||
case "disabled": $s = "Disabled"; break;
|
||||
case "last time read": $s = "Last Time Read"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
case "permissions": $s = "Permissions"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Are you sure you want to delete this group ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Are you sure you want to kill this session ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "All records and account information will be lost!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Are you sure you want to delete this account ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Are you sure you want to delete this news site ?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Percent of users that logged out"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "list of current users"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "New password [ Leave blank for no change ]"; break;
|
||||
|
||||
case "the two passwords are not the same":
|
||||
$s = "The two passwords are not the same"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "The login and password can not be the same"; break;
|
||||
|
||||
case "you must enter a password": $s = "You must enter a password"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "That loginid has already been taken"; break;
|
||||
|
||||
case "you must enter a display": $s = "You must enter a display"; break;
|
||||
case "you must enter a base url": $s = "You must enter a base url"; break;
|
||||
case "you must enter a news url": $s = "You must enter a news url"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "You must enter the number of minutes between reload"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "You must enter the number of listings display"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "You must select a file type"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "That site has already been entered"; break;
|
||||
|
||||
case "select users for inclusion":
|
||||
$s = "Select users for inclusion"; break;
|
||||
|
||||
case "sorry, the follow users are still a member of the group x":
|
||||
$s = "Sorry, the follow users are still a member of the group $m1"; break;
|
||||
|
||||
case "they must be removed before you can continue":
|
||||
$s = "They must be removed before you can continue"; break;
|
||||
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
94
admin/lang/fr_admin.inc.php
Executable file
94
admin/lang/fr_admin.inc.php
Executable file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Les $m1 derniers logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Nombre total d'enregistrements"; break;
|
||||
case "user accounts": $s = "Comptes utilisateurs"; break;
|
||||
case "new group name": $s = "Nouveau nom de groupe"; break;
|
||||
case "create group": $s = "Créer un groupe"; break;
|
||||
case "kill": $s = "Tuer"; break;
|
||||
case "idle": $s = "inactivité"; break;
|
||||
case "login time": $s = "Heure d'entrée"; break;
|
||||
case "anonymous user": $s = "Utilisateur anonyme"; break;
|
||||
case "account active": $s = "Compte actif"; break;
|
||||
case "re-enter password": $s = "Re-saisissez le mot de passe"; break;
|
||||
case "group name": $s = "Nom de groupe"; break;
|
||||
case "display": $s = "Afficher"; break;
|
||||
case "base url": $s = "URL de base"; break;
|
||||
case "news file": $s = "Fichier de News"; break;
|
||||
case "minutes between reloads": $s = "Minutes entre chaque recharge"; break;
|
||||
case "listings displayed": $s = "Affichage en listing"; break;
|
||||
case "news type": $s = "Type de News"; break;
|
||||
case "user groups": $s = "Groupes d'utilisateurs"; break;
|
||||
case "headline sites": $s = "Sites d'Headline"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "Voir les sessions"; break;
|
||||
case "view access log": $s = "Voir les log d'accès"; break;
|
||||
case "active": $s = "Actif"; break;
|
||||
case "disabled": $s = "Désactivé"; break;
|
||||
case "last time read": $s = "Heure de dernière lecture"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Voulez-vous vraiment supprimer ce groupe ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Voulez-vous vraiment tuer cette session ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Tous les enregistrements et le compte vont être perdus !"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Voulez-vous vraiment supprimer ce compte ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Voulez-vous vraiment supprimer ce site de news ?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Pourcentage d'utilisateurs qui se sont délogués"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "liste des utilisateurs connectés en ce moment"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nouveau mot de passe [ Laissez vide pour ne rien changer ]"; break;
|
||||
|
||||
case "the two passwords are not the same":
|
||||
$s = "Les deux mots de passe ne sont pas identiques"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "Le login et le mot de passe ne peuvent pas être identiques"; break;
|
||||
|
||||
case "you must enter a password": $s = "Vous devez entrer un mot de passe"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Ce login est déjà utlisé"; break;
|
||||
|
||||
case "you must enter a display": $s = "Vous devez entrer un affichage"; break;
|
||||
case "you must enter a base url": $s = "Vous devez entrer une URL de base"; break;
|
||||
case "you must enter a news url": $s = "Vous devez entrer une URL de news"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Vous devez entrer un le nombre de minutes entre chaque recharge"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Vous devez entrer le nombre d'entités affiché dans chaque listing"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Vous devez entrer un type de fichier"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Ce site a déjà été entré"; break;
|
||||
|
||||
default: $s = "* ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
100
admin/lang/it_admin.inc.php
Executable file
100
admin/lang/it_admin.inc.php
Executable file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Ultimi $m1 login"; break;
|
||||
case "loginid": $s = "Identificativo Login"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Totale registrazioni"; break;
|
||||
case "user accounts": $s = "Account Utenti"; break;
|
||||
case "new group name": $s = "Nuovo nome gruppo"; break;
|
||||
case "create group": $s = "Crea Gruppo"; break;
|
||||
case "kill": $s = "Termina"; break;
|
||||
case "idle": $s = "inattivo"; break;
|
||||
case "login time": $s = "Ora del Login"; break;
|
||||
case "anonymous user": $s = "Utente anonimo"; break;
|
||||
case "account active": $s = "Account inattivo"; break;
|
||||
case "re-enter password": $s = "Reinserisci la password"; break;
|
||||
case "group name": $s = "Nome Gruppo"; break;
|
||||
case "display": $s = "Mostra"; break;
|
||||
case "base url": $s = "URL di base"; break;
|
||||
case "news file": $s = "File delle news"; break;
|
||||
case "minutes between reloads": $s = "Minuti fra i caricamenti"; break;
|
||||
case "listings displayed": $s = "Listings elencati"; break;
|
||||
case "news type": $s = "Tipo di news"; break;
|
||||
case "user groups": $s = "gruppi di utenti"; break;
|
||||
case "headline sites": $s = "Siti con titoli"; break;
|
||||
case "site": $s = "Sito"; break;
|
||||
case "view sessions": $s = "Visualizza sessioni"; break;
|
||||
case "view access log": $s = "Visualizza Log di accesso"; break;
|
||||
case "active": $s = "Attivo"; break;
|
||||
case "disabled": $s = "Disabilitato"; break;
|
||||
case "last time read": $s = "Letto ultima volta"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Sei sicuro di voler cancellare questo gruppo ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "sei sicuro di voler eliminare questa sessione ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Tutte le registrazioni e gli account andranno persi!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Sei sicuro di voler cancellare questo account ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Sei sicuro di voler cancellare questo sito di notizie ?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Percentuale di utenti che hanno terminato la connessione correttamente"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "lista degli utenti attivi adesso"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nuova password [ Lascia vuoto se non vuoi cambiarla ]"; break;
|
||||
|
||||
case "The two passwords are not the same":
|
||||
$s = "Tle due password non sono uguali"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "Il nome utente e la passvord non possono essere uguali"; break;
|
||||
|
||||
case "You must enter a password":
|
||||
$s = "Devi inserire una password"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Questo nome utente è già in uso"; break;
|
||||
|
||||
case "you must enter a display":
|
||||
$s = "Devi inserire un display"; break;
|
||||
|
||||
case "you must enter a base url":
|
||||
$s = "Devi inserire un URL di base"; break;
|
||||
|
||||
case "you must enter a news url":
|
||||
$s = "Devi inserire un url con notizie"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Devi inserire il numero di minuti fra i caricamenti"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Devi inserire il numero di display elencati"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Devi selezionare un tipo di file"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Quel sito è già stato inserito"; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
102
admin/lang/kr_admin.inc.php
Executable file
102
admin/lang/kr_admin.inc.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Last $m1 logins"; break;
|
||||
case "loginid": $s = "접속ID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Total records"; break;
|
||||
case "user accounts": $s = "사용자 계정"; break;
|
||||
case "new group name": $s = "새 그룹 이름"; break;
|
||||
case "create group": $s = "새 그룹 만들기"; break;
|
||||
case "kill": $s = "종료"; break;
|
||||
case "idle": $s = "idle"; break;
|
||||
case "login time": $s = "접속 시간"; break;
|
||||
case "anonymous user": $s = "무명 사용자"; break;
|
||||
case "manager": $s = "관리자"; break;
|
||||
case "account active": $s = "계정 활정화"; break;
|
||||
case "re-enter password": $s = "비밀번호 재입력"; break;
|
||||
case "group name": $s = "그룹이름"; break;
|
||||
case "display": $s = "Display"; break;
|
||||
case "base url": $s = "기본 URL"; break;
|
||||
case "news file": $s = "새로운 파일"; break;
|
||||
case "minutes between reloads": $s = "재로드 시간(분단위)"; break;
|
||||
case "listings displayed": $s = "Listings Displayed"; break;
|
||||
case "news type": $s = "뉴스 타입"; break;
|
||||
case "user groups": $s = "사용자 그룹"; break;
|
||||
case "headline sites": $s = "헤드라인 사이트"; break;
|
||||
case "network news": $s = "네트워크 뉴스"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "세션 보기"; break;
|
||||
case "view access log": $s = "접속 로그 보기"; break;
|
||||
case "active": $s = "활성화"; break;
|
||||
case "disabled": $s = "비활성화"; break;
|
||||
case "last time read": $s = "마지막 읽은 시각"; break;
|
||||
case "manager": $s = "관리자"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "이 그룹을 정말 삭제하시겠습니까 ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "이 세션을 정말 종료시키시겠습니까 ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "이 계정의 자료와 정보가 삭제됩니다."; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "이 계정을 정말 삭제하시겠습니까 ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "이 뉴스사이트를 정말 삭제하시겠습니까?"; break;
|
||||
|
||||
case "* make sure that you remove users from this group before you delete it.":
|
||||
$s = "* 이 그룹에서 사용자를 정말 삭제하시겠습니까?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "퍼센트의 사용자가 로그아웃 하였습니다."; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "현재 사용자 목록"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "새 패스워드[ 바꾸지 않으려면 빈칸으로 남겨두세요 ]"; break;
|
||||
|
||||
case "the two passwords are not the same":
|
||||
$s = "비밀번호가 같지 않습니다."; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "계정과 패스워드는 같지 않아야 합니다."; break;
|
||||
|
||||
case "you must enter a password": $s = "패스워드를 입력해야 합니다."; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "이 사용자 계정은 이미 사용중입니다."; break;
|
||||
|
||||
case "you must enter a display": $s = "출력을 입력해야 합니다."; break;
|
||||
case "you must enter a base url": $s = "기본 URL을 입력해야 합니다."; break;
|
||||
case "you must enter a news url": $s = "뉴스 URL을 입력해야 합니다."; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "재로드될 시간 간격을 입력해야 합니다."; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "한번에 출혁할 개수를 입력해야 합니다."; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "파일 타입을 선택해야 합니다."; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "이 사이트는 이미 입력되어 있습니다."; break;
|
||||
|
||||
case "select users for inclusion":
|
||||
$s = "포함할 사용자를 선택하세요."; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
102
admin/lang/nl_admin.inc.php
Executable file
102
admin/lang/nl_admin.inc.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Laatste $m1 logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP-adres"; break;
|
||||
case "total records": $s = "Totaal aantal records"; break;
|
||||
case "user accounts": $s = "Gebruiker accounts"; break;
|
||||
case "new group name": $s = "Nieuwe groepsname"; break;
|
||||
case "create group": $s = "Maak Groep"; break;
|
||||
case "kill": $s = "Verwijder"; break;
|
||||
case "idle": $s = "niet actief"; break;
|
||||
case "login time": $s = "Login tijd"; break;
|
||||
case "anonymous user": $s = "Anonieme gebruiker"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
case "account active": $s = "Account actief"; break;
|
||||
case "re-enter password": $s = "Voer wachtwoord opnieuw in"; break;
|
||||
case "group name": $s = "Groepsnaam"; break;
|
||||
case "display": $s = "Weergave"; break;
|
||||
case "base url": $s = "Basis-URL"; break;
|
||||
case "news file": $s = "Nieuws-bestand"; break;
|
||||
case "minutes between reloads": $s = "Minuten tussen herladen"; break;
|
||||
case "listings displayed": $s = "Weergevegen lijsten"; break;
|
||||
case "news type": $s = "Nieuwssoort"; break;
|
||||
case "user groups": $s = "Gebruikersgroepen"; break;
|
||||
case "headline sites": $s = "Headline Sites"; break;
|
||||
case "network news": $s = "Netwerk nieuws"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "Bekijk sessies"; break;
|
||||
case "view access log": $s = "Bekijk bezoek-logboek"; break;
|
||||
case "active": $s = "Actief"; break;
|
||||
case "disabled": $s = "Uitgeschakeld"; break;
|
||||
case "last time read": $s = "Voor het laatst gelezen op"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Weet u zeker dat u deze groep wilt verwijderen ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Weet u zeker dat u deze sessie wilt beëindigen?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Alle records en account informatie zal verloren gaan!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Weet u zeker dat u deze account wilt verwijderen ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Weet u zeker dat u deze niews-site wilt verwijderen ?"; break;
|
||||
|
||||
case "* make sure that you remove users from this group before you delete it.":
|
||||
$s = "* Vergewis u ervan dat u alle gebruikers uit deze groep verwijderd voor u de groep verwijderd."; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Percentage gebruikers dat uitlogt"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "lijst van huidige gebruikers"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nieuw wachtwoord [ Laat leeg om niet te wijzigen ]"; break;
|
||||
|
||||
case "the two passwords are not the same":
|
||||
$s = "De twee wachtwoorden komen niet overeen"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "De login en het wachtwoord mogen niet hetzelfde zijn"; break;
|
||||
|
||||
case "you must enter a password": $s = "U moet een wachtwoord invoeren"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Die gevraagde loginid is reeds vergeven"; break;
|
||||
|
||||
case "you must enter a display": $s = "U moet een weergave opgeven"; break;
|
||||
case "you must enter a base url": $s = "U moet een basis-url opgeven"; break;
|
||||
case "you must enter a news url": $s = "U moet een nieuws-url opgeven"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "U moet het aantal minuten tussen herladen opgeven"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "U moet het aantal weer te geven lijsten opgeven"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "U moet een bestandstype selecteren"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Die site is al ingevoerd"; break;
|
||||
|
||||
case "select users for inclusion":
|
||||
$s = "Selecteer gebruikers"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
94
admin/lang/no_admin.inc.php
Executable file
94
admin/lang/no_admin.inc.php
Executable file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Siste $m1 logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Total historie"; break;
|
||||
case "user accounts": $s = "Bruker accounts"; break;
|
||||
case "new group name": $s = "Nytt gruppe navn"; break;
|
||||
case "create group": $s = "Lag Gruppe"; break;
|
||||
case "kill": $s = "Avslutt"; break;
|
||||
case "idle": $s = "idle"; break;
|
||||
case "login time": $s = "Login Tid"; break;
|
||||
case "anonymous user": $s = "Anonym bruker"; break;
|
||||
case "account active": $s = "Account aktiv"; break;
|
||||
case "re-enter password": $s = "Skriv inn passord igjen"; break;
|
||||
case "group name": $s = "Gruppe Navn"; break;
|
||||
case "display": $s = "Vis"; break;
|
||||
case "base url": $s = "Basis URL"; break;
|
||||
case "news file": $s = "Nyhets Fil"; break;
|
||||
case "minutes between reloads": $s = "Minutter mellom Reloads"; break;
|
||||
case "listings displayed": $s = "Lister vist"; break;
|
||||
case "news type": $s = "Nyhets Type"; break;
|
||||
case "user groups": $s = "Bruker Grupper"; break;
|
||||
case "headline sites": $s = "Headline Siter"; break;
|
||||
case "site": $s = "Site"; break;
|
||||
case "view sessions": $s = "Vis sessions"; break;
|
||||
case "view access log": $s = "Vis Access Log"; break;
|
||||
case "active": $s = "Aktiv"; break;
|
||||
case "disabled": $s = "Deaktivert"; break;
|
||||
case "last time read": $s = "Lest siste gang"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Er du sikker på du vil slette denne gruppen?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Er du sikker på at du vil avslutte denne session?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "All historie og brukerinformasjon vil gå tapt!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Er du sikker på at du vil slette denne account?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Er du sikker på at du vil slette denne nyhets siten?"; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Prosent av brukere som logget ut"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "liste over brukere"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nytt passord [ Ingenting hvis ingen forandring ]"; break;
|
||||
|
||||
case "The two passwords are not the same":
|
||||
$s = "Passordene er ikke de sammme"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "Loging og passord kan ikke være det samme"; break;
|
||||
|
||||
case "You must enter a password": $s = "Du må skrive inn et passord"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Den loginID er opptatt"; break;
|
||||
|
||||
case "you must enter a display": $s = "Du må skrive inn et display"; break;
|
||||
case "you must enter a base url": $s = "Du må skrive inn en base url"; break;
|
||||
case "you must enter a news url": $s = "Du må skrive inn en nyhets url"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Du må skrive inn antallet minutter mellom reload"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Du må skrive inn antallet visninger"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Du må velge en filtype"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Den siten har allerede blitt brukt"; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
101
admin/lang/sp_admin.inc.php
Executable file
101
admin/lang/sp_admin.inc.php
Executable file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
function lang_admin($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "last x logins": $s = "Ultimos $m1 logins"; break;
|
||||
case "loginid": $s = "LoginID"; break;
|
||||
case "ip": $s = "IP"; break;
|
||||
case "total records": $s = "Total de registros"; break;
|
||||
case "user accounts": $s = "Cuentas de usuario"; break;
|
||||
case "new group name": $s = "Nuevo nombre de grupo"; break;
|
||||
case "create group": $s = "Crear Groupo"; break;
|
||||
case "kill": $s = "Matar"; break;
|
||||
case "idle": $s = "idle"; break;
|
||||
case "login time": $s = "Hora de LogOn"; break;
|
||||
case "anonymous user": $s = "Usuario anonimo"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
case "account active": $s = "Cuenta activa"; break;
|
||||
case "re-enter password": $s = "Re-ingresar contraseña"; break;
|
||||
case "group name": $s = "Nombre Groupo"; break;
|
||||
case "display": $s = "Mostrar"; break;
|
||||
case "base url": $s = "URL Base"; break;
|
||||
case "news file": $s = "Archivo Noticias"; break;
|
||||
case "minutes between reloads": $s = "Minutos entre recargas"; break;
|
||||
case "listings displayed": $s = "Listings Mostrados"; break;
|
||||
case "news type": $s = "Tipo de Noticias"; break;
|
||||
case "user groups": $s = "Grupos de usuarios"; break;
|
||||
case "headline sites": $s = "Headline Sitios"; break;
|
||||
case "site": $s = "Sitios"; break;
|
||||
case "view sessions": $s = "Ver sesiones"; break;
|
||||
case "view access log": $s = "Ver log de acceso"; break;
|
||||
case "active": $s = "Activo"; break;
|
||||
case "disabled": $s = "Deshabilitado"; break;
|
||||
case "last time read": $s = "Ultima lectura"; break;
|
||||
case "manager": $s = "Manager"; break;
|
||||
|
||||
case "are you sure you want to delete this group ?":
|
||||
$s = "Esta seguro de querer borrar este grupo ?"; break;
|
||||
|
||||
case "are you sure you want to kill this session ?":
|
||||
$s = "Esta seguro de querer matar esta sesion ?"; break;
|
||||
|
||||
case "all records and account information will be lost!":
|
||||
$s = "Se perderan todos los registros e informacion de cuentas!"; break;
|
||||
|
||||
case "are you sure you want to delete this account ?":
|
||||
$s = "Esta seguro de querer borrar esta cuenta ?"; break;
|
||||
|
||||
case "are you sure you want to delete this news site ?":
|
||||
$s = "Esta seguro de querer borrar este sitio de noticias ?"; break;
|
||||
|
||||
case "* make sure that you remove users from this group before you delete it.":
|
||||
$s = "* Asegurese de remover todos los usuarios de este grupo antes de borrarlo."; break;
|
||||
|
||||
case "percent of users that logged out":
|
||||
$s = "Porcentaje de usuarios que se desloguearon"; break;
|
||||
|
||||
case "list of current users":
|
||||
$s = "Lista de usuarios presentes"; break;
|
||||
|
||||
case "new password [ leave blank for no change ]":
|
||||
$s = "Nueva contraseña [ Deje en blanco para NO cambiar ]"; break;
|
||||
|
||||
case "The two passwords are not the same":
|
||||
$s = "Las dos contraseñas no son iguales"; break;
|
||||
|
||||
case "the login and password can not be the same":
|
||||
$s = "El login y la contraseña NO pueden ser iguales"; break;
|
||||
|
||||
case "You must enter a password": $s = "Debe entrar una contraseña"; break;
|
||||
|
||||
case "that loginid has already been taken":
|
||||
$s = "Ese login ID ya esta siendo utilizado"; break;
|
||||
|
||||
case "you must enter a display": $s = "Debe entrar un display"; break;
|
||||
case "you must enter a base url": $s = "Debe entrar una dirección url base"; break;
|
||||
case "you must enter a news url": $s = "Debe entrar una dirección url de noticias"; break;
|
||||
|
||||
case "you must enter the number of minutes between reload":
|
||||
$s = "Debe entrar el numero de minutos entre recargas"; break;
|
||||
|
||||
case "you must enter the number of listings display":
|
||||
$s = "Debe entrar el numero de elementos listados a mostrar"; break;
|
||||
|
||||
case "you must select a file type":
|
||||
$s = "Debe seleccionar un tipo de archivo"; break;
|
||||
|
||||
case "that site has already been entered":
|
||||
$s = "Este sitio ya fue entrado"; break;
|
||||
|
||||
case "select users for inclusion":
|
||||
$s = "Seleccionar usuarios para inclución"; break;
|
||||
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
187
admin/newaccount.php
Executable file
187
admin/newaccount.php
Executable file
@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if ($submit) {
|
||||
if (! $n_loginid)
|
||||
$error = "<br>" . lang_admin("You must enter a loginid");
|
||||
|
||||
if (! $n_passwd)
|
||||
$error .= "<br>" . lang_admin("You must enter a password");
|
||||
|
||||
if ($n_passwd == $n_loginid)
|
||||
$error = "<br>" . lang_admin("The login and password can not be the same");
|
||||
|
||||
if ($n_passwd != $n_passwd_2)
|
||||
$error .= "<br>" . lang_admin("The two passwords are not the same");
|
||||
|
||||
$phpgw->db->query("select loginid from accounts where loginid='$n_loginid'");
|
||||
$phpgw->db->next_record();
|
||||
if ($phpgw->db->f("loginid"))
|
||||
$error .= "<br>" . lang_admin("That loginid has already been taken");
|
||||
|
||||
if (! $error) {
|
||||
$phpgw->db->lock(array("accounts","preferences"));
|
||||
|
||||
$phpgw->preferences->add_with_value($n_loginid,"maxmatchs","15");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"theme","default");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"tz_offset","0");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"dateformat","m/d/Y");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"timeformat","12");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"lang","en");
|
||||
|
||||
// Even if they don't have access to the calendar, we will add these.
|
||||
// Its better then the calendar being all messed up, they will be deleted
|
||||
// the next time the update there preferences.
|
||||
$phpgw->preferences->add_with_value($n_loginid,"weekstarts","Monday");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"workdaystarts","9");
|
||||
$phpgw->preferences->add_with_value($n_loginid,"workdayends","17");
|
||||
|
||||
while ($permission = each($new_permissions)) {
|
||||
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
|
||||
$phpgw->permissions->add($permission[0]);
|
||||
}
|
||||
}
|
||||
$phpgw->permissions->add("hr");
|
||||
|
||||
if ($n_anonymous && ! $n_admin)
|
||||
$phpgwpermissions->add("anonymous");
|
||||
|
||||
$sql = "insert into accounts (loginid,passwd,firstname,lastname,"
|
||||
. "permissions,groups,status) values ('$n_loginid'"
|
||||
. ",'" . md5($n_passwd) . "','" . addslashes($n_firstname) . "','"
|
||||
. addslashes($n_lastname) . "','" . $phpgw->permissions->add_rebuild()
|
||||
. "','" . $phpgw->groups->array_to_string("none",$n_groups) . "','A')";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
$phpgw->db->unlock();
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep
|
||||
. "users" . $sep;
|
||||
|
||||
if (!mkdir($basedir . $n_loginid, 0707)) {
|
||||
$cd = 36;
|
||||
} else {
|
||||
$cd = 28;
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("accounts.php","cd=$cd"));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$phpgw->common->header();
|
||||
$phpgw->common->navbar();
|
||||
?>
|
||||
<form method="POST" action="newaccount.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<center>" . lang_common("Error") . ":$error</center>";
|
||||
}
|
||||
?>
|
||||
<center>
|
||||
<table border=0 width=65%>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("LoginID"); ?></td>
|
||||
<td><input name="n_loginid" value="<?php echo $n_loginid; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("Password"); ?></td>
|
||||
<td><input type="password" name="n_passwd" value="<?php echo $n_passwd; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Re-Enter Password"); ?></td>
|
||||
<td><input type="password" name="n_passwd_2" value="<?php echo $n_passwd_2; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("First Name"); ?></td>
|
||||
<td><input name="n_firstname" value="<?php echo $n_firstname; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("Last Name"); ?></td>
|
||||
<td><input name="n_lastname" value="<?php echo $n_lastname; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_common("Groups"); ?></td>
|
||||
<td><select name="n_groups[]" multiple><?php
|
||||
$phpgw->db->query("select * from groups");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("group_id") . "\"";
|
||||
if ($n_groups[$phpgw->db->f("group_id")]) {
|
||||
echo " selected";
|
||||
}
|
||||
echo ">" . $phpgw->db->f("group_name") . "</option>";
|
||||
}
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
while ($permission = each($phpgw_info["apps"])) {
|
||||
if ($permission[1]["enabled"]) {
|
||||
$perm_display[$i][0] = $permission[0];
|
||||
$perm_display[$i][1] = $permission[1]["title"];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
||||
if (! $perm_display[$i][1]) break;
|
||||
|
||||
echo '<tr><td>' . lang_common($perm_display[$i][1]) . '</td>'
|
||||
. '<td><input type="checkbox" name="new_permissions['
|
||||
. $perm_display[$i][0] . ']" value="True"';
|
||||
if ($new_permissions[$perm_display[$i][0]]) {
|
||||
echo " checked";
|
||||
}
|
||||
echo "></td>";
|
||||
|
||||
$i++;
|
||||
|
||||
if (! $perm_display[$i][1]) break;
|
||||
|
||||
echo '<td>' . lang_common($perm_display[$i][1]) . '</td>'
|
||||
. '<td><input type="checkbox" name="new_permissions['
|
||||
. $perm_display[$i][0] . ']" value="True"';
|
||||
if ($new_permissions[$perm_display[$i][0]]) {
|
||||
echo " checked";
|
||||
}
|
||||
echo "></td></tr>";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Just until we can get thing the $phpgw_info["apps"] then figured out
|
||||
echo "<tr><td>" . lang_admin("Anonymous user") . "</td> <td><input type=\""
|
||||
. "checkbox\" name=\"new_permissions[anonymous]\" value=\"Y\"></td>";
|
||||
|
||||
echo "<td>" . lang_admin("Manager") . "</td> <td><input type=\""
|
||||
. "checkbox\" name=\"new_permissions[manager]\" value=\"Y\"></td></tr>";
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="submit" name="submit" value="<?php echo lang_common("submit"); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
117
admin/newheadline.php
Executable file
117
admin/newheadline.php
Executable file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if (! $submit) {
|
||||
?>
|
||||
<form method="POST" action="newheadline.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<center>
|
||||
<table border=0 width=65%>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Display"); ?></td>
|
||||
<td><input name="n_display"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Base URL"); ?></td>
|
||||
<td><input name="n_base_url"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("News File"); ?></td>
|
||||
<td><input name="n_newsfile"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Minutes between Reloads"); ?></td>
|
||||
<td><input name="n_cachetime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("Listings Displayed"); ?></td>
|
||||
<td><input name="n_listings"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo lang_admin("News Type"); ?></td>
|
||||
<td>
|
||||
<?
|
||||
$news_type = array('rdf','fm','lt','sf','rdf-chan');
|
||||
for($i=0;$i<count($news_type);$i++) {
|
||||
echo "<input type=\"radio\" name=\"n_newstype\" value=\""
|
||||
. $news_type[$i] . "\"> $news_type[$i]<br>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="submit" name="submit" value="<?php echo lang_common("submit"); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
} else {
|
||||
if (! $n_display)
|
||||
$error = "<br>" . lang_admin("You must enter a display");
|
||||
|
||||
if (! $n_base_url)
|
||||
$error = "<br>" . lang_admin("You must enter a base url");
|
||||
|
||||
if (! $n_newsfile)
|
||||
$error = "<br>" . lang_admin("You must enter a news url");
|
||||
|
||||
if (! $n_cachetime)
|
||||
$error = "<br>" . lang_admin("You must enter the number of minutes between reload");
|
||||
|
||||
if (! $n_listings)
|
||||
$error = "<br>" . lang_admin("You must enter the number of listings display");
|
||||
|
||||
if (! $n_newstype)
|
||||
$error = "<br>" . lang_admin("You must select a file type");
|
||||
|
||||
if ($error)
|
||||
exit;
|
||||
|
||||
$phpgw->db->query("select display from news_site where base_url='"
|
||||
. addslashes(strtolower($n_base_url)) . "' and newsfile='"
|
||||
. addslashes(strtolower($n_newsfile)) . "'");
|
||||
$phpgw->db->next_record();
|
||||
if ($phpgw->db->f("display")) {
|
||||
navigation_bar();
|
||||
echo "<center>" . lang_admin("That site has already been entered") . "</center>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$phpgw->db->lock("news_site");
|
||||
|
||||
$sql = "insert into news_site (display,base_url,newsfile,"
|
||||
. "lastread,newstype,cachetime,listings) "
|
||||
. "values ('" . addslashes($n_display) . "','"
|
||||
. addslashes(strtolower($n_base_url)) . "','"
|
||||
. addslashes(strtolower($n_newsfile)) . "',0,'"
|
||||
. $n_newstype . "',$n_cachetime,$n_listings)";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link($directorys["webserver_url"]
|
||||
. "/admin/headlines.php", "cd=28"));
|
||||
}
|
||||
?>
|
151
admin/nntp.php
Executable file
151
admin/nntp.php
Executable file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare module (NNTP) *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Mark Peters <mpeters@satx.rr.com> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit && $nntplist) {
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
|
||||
$phpgw->include_lang("nntp");
|
||||
|
||||
function get_tg()
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$phpgw->db->query("SELECT count(con) FROM newsgroups");
|
||||
$phpgw->db->next_record();
|
||||
return $phpgw->db->f(0);
|
||||
}
|
||||
|
||||
if(!$submit && !$nntplist) {
|
||||
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
|
||||
$t->set_file(array( "nntp_header" => "nntp.tpl",
|
||||
"nntp_list" => "nntp.tpl",
|
||||
"nntp_footer" => "nntp.tpl" ));
|
||||
|
||||
$t->set_block("nntp_header","nntp_list","nntp_footer","output");
|
||||
|
||||
if (! $tg)
|
||||
{
|
||||
$tg = get_tg();
|
||||
}
|
||||
|
||||
if ($tg == 0)
|
||||
{
|
||||
set_time_limit(0);
|
||||
include($phpgw_info["server"]["include_root"]."/nntp/nntp.inc.php");
|
||||
$nntp = new NNTP;
|
||||
$nntp->load_table();
|
||||
$tg = get_tg();
|
||||
}
|
||||
|
||||
if (! $start) $start = 0;
|
||||
|
||||
$urlname = $phpgw_info["server"]["webserver_url"]."/admin/nntp.php";
|
||||
|
||||
$common_hidden_vars = $phpgw->session->hidden_var() . "\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"".$start."\">\n"
|
||||
. "<input type=\"hidden\" name=\"stop\" value=\""
|
||||
. ($start + $phpgw_info["user"]["preferences"]["maxmatchs"])."\">\n"
|
||||
. "<input type=\"hidden\" name=\"tg\" value=\"".$tg."\">\n";
|
||||
|
||||
$t->set_var("nml",$phpgw->nextmatchs->left($urlname,$start,$tg,
|
||||
"&tg=$tg&sort=$sort&order=$order"));
|
||||
$t->set_var("nmr",$phpgw->nextmatchs->right($urlname,$start,$tg,
|
||||
"&tg=$tg&sort=$sort&order=$order"));
|
||||
$t->set_var("title",lang_nntp("Newsgroups"));
|
||||
$t->set_var("action_url",$phpgw->link($urlname));
|
||||
$t->set_var("common_hidden_vars",$common_hidden_vars);
|
||||
$t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$t->set_var("th_font",$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("sort_con",$phpgw->nextmatchs->show_sort_order($sort,"1",$order,$urlname," # ","&tg=$tg"));
|
||||
$t->set_var("sort_group",$phpgw->nextmatchs->show_sort_order($sort,"2",$order,$urlname,"Group","&tg=$tg"));
|
||||
$t->set_var("sort_active",$phpgw->nextmatchs->show_sort_order($sort,"3",$order,$urlname," Active ","&tg=$tg"));
|
||||
|
||||
$t->parse("out","nntp_header");
|
||||
|
||||
if ($phpgw_info["user"]["preferences"]["maxmatchs"] <= $tg - $start)
|
||||
$totaltodisplay = $phpgw_info["user"]["preferences"]["maxmatchs"];
|
||||
else
|
||||
$totaltodisplay = ($tg - $start);
|
||||
|
||||
$orderby = "";
|
||||
if ($order)
|
||||
{
|
||||
switch ($order)
|
||||
{
|
||||
case 1:
|
||||
$orderby = " ORDER BY CON $sort";
|
||||
break;
|
||||
case 2:
|
||||
$orderby = " ORDER BY NAME $sort";
|
||||
break;
|
||||
case 3:
|
||||
$orderby = " ORDER BY ACTIVE $sort";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$phpgw->db->query("SELECT con, name, active FROM newsgroups$orderby LIMIT "
|
||||
.$phpgw->nextmatchs->sql_limit($start,$totaltodisplay));
|
||||
|
||||
for ($i=0;$i<$totaltodisplay;$i++)
|
||||
{
|
||||
$phpgw->db->next_record();
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var("tr_color",$tr_color);
|
||||
$con = $phpgw->db->f("con");
|
||||
$t->set_var("con",$con);
|
||||
|
||||
$name = $phpgw->db->f("name");
|
||||
if (! $name) $name = " ";
|
||||
$group_name = "<a href=\"" . $phpgw->link(
|
||||
$phpgw_info["server"]["webserver_url"]
|
||||
."/admin/editnntp.php","con=$con")
|
||||
. "\">$name</a>";
|
||||
$t->set_var("group",$group_name);
|
||||
|
||||
$active = $phpgw->db->f("active");
|
||||
if ($active == "Y") $checked = " checked"; else $checked = "";
|
||||
$active_var = "<input type=\"checkbox\" name=\"nntplist[]\" value=\"$con\"$checked>";
|
||||
$t->set_var("active",$active_var);
|
||||
|
||||
if ($i+1 <> $totaltodisplay)
|
||||
$t->parse("output","nntp_list",True);
|
||||
}
|
||||
$t->set_var("lang_update",lang_nntp("update"));
|
||||
$t->set_var("checkmark",$phpgw_info["server"]["webserver_url"]."/email/images/check.gif");
|
||||
|
||||
$t->pparse("out","nntp_footer");
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
} else {
|
||||
$phpgw->db->lock("newsgroups");
|
||||
|
||||
$phpgw->db->query("UPDATE newsgroups SET active='N' WHERE con>=$start AND con<=$stop");
|
||||
|
||||
for ($i=0;$i<count($nntplist);$i++)
|
||||
{
|
||||
$phpgw->db->query("UPDATE newsgroups SET active='Y' WHERE con=".$nntplist[$i]);
|
||||
}
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link($urlname,"start=$start&tg=$tg"));
|
||||
}
|
||||
?>
|
101
admin/viewaccount.php
Executable file
101
admin/viewaccount.php
Executable file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: accounts.php?sessionid=" . $phpgw->session->id);
|
||||
|
||||
$phpgw->db->query("select * from accounts where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$db_perms = $phpgw->permissions->read_other($phpgw->db->f("loginid"));
|
||||
|
||||
?>
|
||||
<center>
|
||||
<p><table border=0 width=50%>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
|
||||
<td width="40%"><?php echo lang_admin("LoginID"); ?></td>
|
||||
<td width="60%"><?php echo $phpgw->db->f("loginid"); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
|
||||
<td width="40%"><?php echo lang_common("First Name"); ?></td>
|
||||
<td width="60%"><?php echo $phpgw->db->f("firstname"); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
|
||||
<td width="40%"><?php echo lang_common("Last Name"); ?></td>
|
||||
<td width="60%"><?php echo $phpgw->db->f("lastname"); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
|
||||
<td width="40%"><?php echo lang_admin("permissions"); ?></td>
|
||||
<?php
|
||||
|
||||
$i = 0;
|
||||
while ($permission = each($db_perms)) {
|
||||
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
|
||||
$perm_display[$i] = lang_common($phpgw_info["apps"][$permission[0]]["title"]);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
echo "<td>" . implode(", ", $perm_display) . "</td></tr>";
|
||||
|
||||
echo "<tr bgcolor=\"" . $phpgw_info["theme"]["row_on"] . "\"><td>"
|
||||
. lang_admin("account active") . "</td> <td>";
|
||||
if ($phpgw->db->f("status") == "A")
|
||||
echo lang_common("yes");
|
||||
else
|
||||
echo "<b>" . lang_common("no") . "</b>";
|
||||
|
||||
?></td></tr>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
|
||||
<td>Groups: </td>
|
||||
<td><?php
|
||||
$user_groups = $phpgw->groups->read_names($phpgw->db->f("loginid"));
|
||||
|
||||
for ($i=0;$i<count($user_groups); $i++) {
|
||||
echo $user_groups[$i][1];
|
||||
if (count($user_groups) !=0 && $i != count($user_groups)-1)
|
||||
echo ", ";
|
||||
}
|
||||
?> </td>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
|
||||
<td>Last login</td><td> <?php
|
||||
|
||||
if (! $phpgw->db->f("lastlogin"))
|
||||
echo "Never";
|
||||
else
|
||||
echo $phpgw->preferences->show_date($phpgw->db->f("lastlogin"));
|
||||
|
||||
?></td></tr>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
|
||||
<td>Last login from</td>
|
||||
<td><?php echo $phpgw->db->f("lastloginfrom"); ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
51
admin/viewheadline.php
Executable file
51
admin/viewheadline.php
Executable file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - administration *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: ".$phpgw->link("headlines.php"));
|
||||
|
||||
$phpgw->db->query("select * from news_site where con=$con");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
?>
|
||||
<center>
|
||||
<table border=0 width=65%>
|
||||
<tr><td><?php echo lang_admin("Display"); ?></td> <td><?php echo $phpgw->db->f("display"); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("Base Url"); ?></td> <td><?php echo $phpgw->db->f("base_url"); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("News File"); ?></td> <td><?php echo $phpgw->db->f("newsfile"); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("Last Time Read"); ?></td> <td><?php echo $phpgw->preferences->show_date($phpgw->db->f("lastread")); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("minutes between reloads"); ?></td> <td><?php echo $phpgw->db->f("cachetime"); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("Listings Displayed"); ?></td> <td><?php echo $phpgw->db->f("listings"); ?></td></tr>
|
||||
<tr><td><?php echo lang_admin("News Type"); ?></td> <td><?php echo $phpgw->db->f("newstype"); ?></td></tr>
|
||||
<?php
|
||||
$phpgw->db->query("select title,link from news_headlines where site=$con");
|
||||
|
||||
if ($phpgw->db->num_rows() <> 0) {
|
||||
echo "<tr><td><br><br><hr></td><td><br><br><hr></td></tr>";
|
||||
while($phpgw->db->next_record()) {
|
||||
?>
|
||||
<tr><td><a href="<?php echo $phpgw->db->f("link") ?>" target="_new"><?php echo $phpgw->db->f("title") ?></a></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
183
calendar/day.php
Normal file
183
calendar/day.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($friendly)
|
||||
$phpgw_flags["noheader"] = True;
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
|
||||
$view = "day";
|
||||
|
||||
if (strlen($date) > 0) {
|
||||
$thisyear = substr($date,0,4);
|
||||
$thismonth = substr($date,4,2);
|
||||
$thisday = substr($date,6,2);
|
||||
} else {
|
||||
if ($month == 0) {
|
||||
$thismonth = date("m");
|
||||
} else {
|
||||
$thismonth = $month;
|
||||
}
|
||||
|
||||
if ($year == 0) {
|
||||
$thisyear = date("Y");
|
||||
} else {
|
||||
$thisyear = $year;
|
||||
}
|
||||
|
||||
if ($day == 0) {
|
||||
$thisday = date("d");
|
||||
} else {
|
||||
$thisday = $day;
|
||||
}
|
||||
}
|
||||
|
||||
$now = mktime (2, 0, 0, $thismonth, $thisday, $thisyear);
|
||||
|
||||
$next = mktime(2, 0, 0, $thismonth, $thisday + 1, $thisyear);
|
||||
$nextyear = date("Y", $next);
|
||||
$nextmonth = date("m", $next);
|
||||
$nextday = date("d", $next);
|
||||
$month_ago = date("Ymd", mktime(2, 0, 0,$thismonth - 1,$thisday,$thisyear));
|
||||
|
||||
$prev = mktime(2, 0, 0, $thismonth, $day - 1, $thisyear);
|
||||
$prevyear = date("Y", $prev);
|
||||
$prevmonth = date("m", $prev);
|
||||
$prevday = date("d", $prev);
|
||||
$month_ahead = date("Ymd", mktime(2,0,0,$thismonth + 1,$thisday,$thisyear));
|
||||
|
||||
/* Pre-Load the repeated events for quckier access */
|
||||
$repeated_events = read_repeated_events();
|
||||
|
||||
?>
|
||||
<TABLE BORDER=0 WIDTH=100%>
|
||||
<TR><TD VALIGN="top" WIDTH=70%"><TR><TD>
|
||||
<TABLE BORDER=0 WIDTH=100%>
|
||||
<TR>
|
||||
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B>
|
||||
|
||||
<?php echo "$month_names[$thismonth], $thisday $thisyear"; ?>
|
||||
|
||||
</B></FONT>
|
||||
<FONT SIZE="+1" COLOR="<?php echo $H2COLOR;?>">
|
||||
<br>
|
||||
<?php
|
||||
if (strlen($phpgw->session->firstname) || strlen($phpgw->session->lastname)) {
|
||||
if (strlen($phpgw->session->firstname))
|
||||
echo $phpgw->session->firstname . " ";
|
||||
if (strlen($phpgw->session->lastname))
|
||||
echo $phpgw->session->lastname . " ";
|
||||
} else
|
||||
echo $phpgw->session->loginid;
|
||||
?>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD BGCOLOR="<?php echo $TABLEBG?>">
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="2" BORDER="0">
|
||||
<?php print_day_at_a_glance($now, $friendly); ?>
|
||||
</td>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
</TD></TR></TABLE>
|
||||
</TD>
|
||||
<TD VALIGN="top">
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
?>
|
||||
<DIV ALIGN="right">
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR><TD BGCOLOR="<?php echo $TABLEBG?>">
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="2" BORDER="0">
|
||||
<TR><TH COLSPAN="7" BGCOLOR="<?php echo $THBG?>"><FONT SIZE="+4" COLOR="<?php echo $THFG?>"><?php echo $thisday?></FONT></TH></TR>
|
||||
<TR>
|
||||
<TD ALIGN="left" BGCOLOR="<?php echo $THBG?>"><A HREF="<?php echo $phpgw->link("day.php","date=$month_ago"); ?>" CLASS="monthlink"><</A></TD>
|
||||
<TH COLSPAN="5" BGCOLOR="<?php echo $THBG?>"><FONT COLOR="<?php echo $THFG?>"><?php echo $month_names[$thismonth] . " $thisyear"; ?></FONT></TH>
|
||||
<TD ALIGN="right" BGCOLOR="<?php echo $THBG?>"><A HREF="<?php echo $phpgw->link("day.php","date=$month_ahead") ?>" CLASS="monthlink">></A></TD>
|
||||
</TR>
|
||||
<?php
|
||||
echo "<TR>";
|
||||
if ($WEEK_START == 0)
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\"><FONT SIZE=\"-2\">" .
|
||||
|
||||
substr($weekday_names[0], 0, 2) . "</TD>";
|
||||
for ($i = 1; $i < 7; $i++) {
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\"><FONT SIZE=\"-2\">" .
|
||||
substr($weekday_names[$i], 0, 2) . "</TD>";
|
||||
}
|
||||
if ($WEEK_START == 1)
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\"><FONT SIZE=\"-2\">" .
|
||||
substr($weekday_names[0], 0, 2) . "</TD>";
|
||||
echo "</TR>\n";
|
||||
|
||||
// generate values for first day and last day of month
|
||||
$monthstart = mktime(2, 0, 0, $thismonth, 1, $thisyear);
|
||||
$monthend = mktime(2, 0, 0, $thismonth + 1, 0, $thisyear);
|
||||
|
||||
if ($WEEK_START == "1")
|
||||
$wkstart = get_monday_before($thisyear, $thismonth, 1) + 7200;
|
||||
else
|
||||
$wkstart = get_sunday_before($thisyear, $thismonth, 1) + 7200;
|
||||
|
||||
$wkend = $wkstart + (3600 * 24 * 7);
|
||||
|
||||
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += (24 * 3600 * 7)) {
|
||||
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += (24 * 3600 * 7)) {
|
||||
echo "<TR ALIGN=\"center\">\n";
|
||||
for ($j = 0; $j < 7; $j++) {
|
||||
$date = $i + ($j * 24 * 3600);
|
||||
if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) {
|
||||
if (date("Ymd", $date) == date("Ymd", $now))
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\">";
|
||||
else
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\">";
|
||||
echo "<FONT SIZE=\"-2\">";
|
||||
echo "<A HREF=\"".$phpgw->link("day.php","date=".date("Ymd",$date));
|
||||
echo "\" CLASS=\"monthlink\">" .
|
||||
date("d", $date) . "</A></FONT></TD>\n";
|
||||
} else {
|
||||
print "<TD BGCOLOR=\"$TODAYCELLBG\"> </TD>\n";
|
||||
}
|
||||
}
|
||||
echo "</TR>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</TABLE>
|
||||
</TD></TR></TABLE>
|
||||
</DIV>
|
||||
<?php } ?>
|
||||
</TD></TR></TABLE>
|
||||
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
echo "<p><A HREF=\"".$phpgw->link("day.php");
|
||||
if ($thisyear)
|
||||
echo "&year=$thisyear&month=$thismonth&day=$thisday";
|
||||
|
||||
?>&friendly=1" TARGET="cal_printer_friendly" onMouseOver="window.status = '<?php echo lang_calendar("Generate printer-friendly version") . "'\">[" . lang_calendar("Printer Friendly"); ?>]</A>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
}
|
||||
?>
|
35
calendar/delete.php
Executable file
35
calendar/delete.php
Executable file
@ -0,0 +1,35 @@
|
||||
<?phpphp_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
|
||||
if ($id > 0) {
|
||||
$phpgw->db->query("SELECT cal_date FROM webcal_entry WHERE cal_id = $id");
|
||||
// date format is 19991231
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$thisyear = (int)($phpgw->db->f(0) / 10000);
|
||||
$thismonth = ($phpgw->db->f(0) / 100) % 100;
|
||||
|
||||
$phpgw->db->query("DELETE FROM webcal_entry WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_user WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_repeats WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_groups WHERE cal_id = $id");
|
||||
}
|
||||
|
||||
Header("Location: index.php?sessionid=" . $phpgw->session->id . "&"
|
||||
. ($thisyear > 0 ? "year=$thisyear&month=$thismonth" : "") );
|
416
calendar/edit_entry.php
Executable file
416
calendar/edit_entry.php
Executable file
@ -0,0 +1,416 @@
|
||||
<?phpphp_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
if ($id > 0) {
|
||||
$can_edit = false;
|
||||
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login="
|
||||
. "'" . $phpgw->session->loginid . "' AND cal_id = $id");
|
||||
$phpgw->db->next_record();
|
||||
if ($phpgw->db->f("cal_id") > 0)
|
||||
$can_edit = true;
|
||||
|
||||
$phpgw->db->query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, "
|
||||
. "cal_mod_time, cal_duration, cal_priority, cal_type, "
|
||||
. "cal_access, cal_name, cal_description FROM webcal_entry "
|
||||
. "WHERE cal_id=$id");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
$year = (int)($phpgw->db->f(1) / 10000);
|
||||
$month = ($phpgw->db->f(1) / 100) % 100;
|
||||
$day = $phpgw->db->f(1) % 100;
|
||||
$time = $phpgw->db->f(2);
|
||||
if ($time > 0) {
|
||||
$hour = $time / 10000;
|
||||
$minute = ($time / 100) % 100;
|
||||
}
|
||||
$duration = $phpgw->db->f(5);
|
||||
$priority = $phpgw->db->f(6);
|
||||
$type = $phpgw->db->f(7);
|
||||
$access = $phpgw->db->f(8);
|
||||
$name = $phpgw->db->f(9);
|
||||
$description = $phpgw->db->f(10);
|
||||
|
||||
$phpgw->db->query("SELECT cal_login FROM webcal_entry_user WHERE cal_id=$id");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$participants[$phpgw->db->f("cal_login")] = 1;
|
||||
}
|
||||
$phpgw->db->query("select * from webcal_entry_repeats where cal_id='$id"
|
||||
. "'");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
$rpt_type = $phpgw->db->f("cal_type");
|
||||
if ($phpgw->db->f("cal_end"))
|
||||
$rpt_end = date_to_epoch($phpgw->db->f("cal_end"));
|
||||
else
|
||||
$rpt_end = 0;
|
||||
|
||||
$rpt_freq = $phpgw->db->f("cal_frequency");
|
||||
$rpt_days = $phpgw->db->f("cal_days");
|
||||
|
||||
$rpt_sun = (substr($rpt_days,0,1)=='y');
|
||||
$rpt_mon = (substr($rpt_days,1,1)=='y');
|
||||
$rpt_tue = (substr($rpt_days,2,1)=='y');
|
||||
$rpt_wed = (substr($rpt_days,3,1)=='y');
|
||||
$rpt_thu = (substr($rpt_days,4,1)=='y');
|
||||
$rpt_fri = (substr($rpt_days,5,1)=='y');
|
||||
$rpt_sat = (substr($rpt_days,6,1)=='y');
|
||||
|
||||
} else {
|
||||
$can_edit = true;
|
||||
}
|
||||
|
||||
if ($year)
|
||||
$thisyear = $year;
|
||||
if ($month)
|
||||
$thismonth = $month;
|
||||
if (! $rpt_type)
|
||||
$rpt_type = "none";
|
||||
?>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
// do a little form verifying
|
||||
function validate_and_submit() {
|
||||
if (document.addform.name.value == "") {
|
||||
alert("<?php echo lang_calendar("You have not entered a\\nBrief Description"); ?>.");
|
||||
return false;
|
||||
}
|
||||
h = parseInt(document.addform.hour.value);
|
||||
m = parseInt(document.addform.minute.value);
|
||||
if (h > 23 || m > 59) {
|
||||
alert ("<?php echo lang_calendar("You have not entered a\\nvalid time of day."); ?>");
|
||||
return false;
|
||||
}
|
||||
// would be nice to also check date to not allow Feb 31, etc...
|
||||
document.addform.submit();
|
||||
return true;
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="<?php echo $BGCOLOR; ?>">
|
||||
|
||||
<H2><FONT COLOR="<?php echo $H2COLOR;?>"><?php
|
||||
if ($id)
|
||||
echo lang_calendar("Calendar - Edit");
|
||||
else
|
||||
echo lang_calendar("Calendar - Add");
|
||||
|
||||
?></FONT></H2>
|
||||
|
||||
<?php
|
||||
if ($can_edit) {
|
||||
?>
|
||||
<FORM ACTION="edit_entry_handler.php" METHOD="GET" name="addform">
|
||||
<? echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<?php if ($id) echo "<INPUT TYPE=\"hidden\" NAME=\"id\" VALUE=\"$id\">\n"; ?>
|
||||
|
||||
<TABLE BORDER=0>
|
||||
<TR>
|
||||
<TD><B><?php echo lang_calendar("Brief Description"); ?>:</B></TD>
|
||||
<TD>
|
||||
<INPUT NAME="name" SIZE=25 VALUE="<?php echo htmlentities($name); ?>">
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="top"><B><?php echo lang_calendar("Full Description"); ?>:</B></TD>
|
||||
<TD>
|
||||
<TEXTAREA NAME="description" ROWS=5 COLS=40 WRAP="virtual"><?php
|
||||
echo htmlentities($description); ?></TEXTAREA>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang_common("Date"); ?>:</B></TD>
|
||||
<TD>
|
||||
<?php
|
||||
$day_html = "<SELECT NAME=\"day\">";
|
||||
if ($day == 0)
|
||||
$day = date("d");
|
||||
for ($i = 1; $i <= 31; $i++)
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $day ? " SELECTED" : "") . ">$i"
|
||||
. "</option>\n";
|
||||
$day_html .= "</select>";
|
||||
|
||||
$month_html = "<SELECT NAME=\"month\">";
|
||||
if ($month == 0)
|
||||
$month = date("m");
|
||||
if ($year == 0)
|
||||
$year = date("Y");
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$m = lang_common(date("F", mktime(0,0,0,$i,1,$year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $month ? " SELECTED" : "") . ">$m"
|
||||
. "</option>\n";
|
||||
}
|
||||
$month_html .= "</select>";
|
||||
|
||||
$year_html = "<SELECT NAME=\"year\">";
|
||||
for ($i = -1; $i < 5; $i++) {
|
||||
$y = date("Y") + $i;
|
||||
$year_html .= "<OPTION VALUE=\"$y\"" . ($y == $year ? " SELECTED" : "") . ">$y"
|
||||
. "</option>\n";
|
||||
}
|
||||
$year_html .= "</select>";
|
||||
|
||||
echo $phpgw->preferences->dateformatorder($year_html,$month_html,$day_html);
|
||||
?>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang_common("Time"); ?>:</B></TD>
|
||||
<?php
|
||||
$h12 = $hour;
|
||||
$amsel = "CHECKED"; $pmsel = "";
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "12") {
|
||||
if ($h12 < 12) {
|
||||
$amsel = "CHECKED"; $pmsel = "";
|
||||
} else {
|
||||
$amsel = ""; $pmsel = "CHECKED";
|
||||
}
|
||||
|
||||
$h12 %= 12;
|
||||
if ($h12 == 0 && $hour) $h12 = 12;
|
||||
if ($h12 == 0 && ! $hour) $h12 = "";
|
||||
}
|
||||
?>
|
||||
<TD>
|
||||
<INPUT NAME="hour" SIZE=2 VALUE="<?php
|
||||
echo $h12;?>" MAXLENGTH=2>:<INPUT NAME="minute" SIZE=2 VALUE="<?php
|
||||
if ($hour > 0) printf ("%02d", $minute); ?>" MAXLENGTH=2>
|
||||
<?php
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "12") {
|
||||
echo "<INPUT TYPE=radio NAME=ampm VALUE=\"am\" $amsel>am\n";
|
||||
echo "<INPUT TYPE=radio NAME=ampm VALUE=\"pm\" $pmsel>pm\n";
|
||||
}
|
||||
?>
|
||||
</TD></TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang_calendar("Duration"); ?>:</B></TD>
|
||||
<TD><INPUT NAME="duration" SIZE=3 VALUE="<?php
|
||||
echo $duration;?>"> <?php echo lang_calendar("minutes"); ?></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang_common("Priority"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="priority">
|
||||
<OPTION VALUE="1"<?php if ($priority == 1) echo " SELECTED";?>><?php echo lang_common("Low"); ?> </option>
|
||||
<OPTION VALUE="2"<?php if ($priority == 2 || $priority == 0 ) echo " SELECTED";?>><?php echo lang_common("Medium"); ?></option>
|
||||
<OPTION VALUE="3"<?php if ($priority == 3) echo " SELECTED";?>><?php echo lang_common("High"); ?></option>
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang_common("Access"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="access">
|
||||
<OPTION VALUE="private"<?php
|
||||
if ($access == "private" || ! $id) echo " SELECTED";?>><?php echo lang_common("Private"); ?></option>
|
||||
|
||||
<OPTION VALUE="group"<?php
|
||||
if ($access == "public" || strlen($access)) echo " SELECTED";?>><?php echo lang_common("Group Public"); ?></option>
|
||||
<OPTION VALUE="public"<?php
|
||||
if ($access == "public") echo " SELECTED"; ?>><?php echo lang_common("Global Public"); ?></option>
|
||||
|
||||
</SELECT>
|
||||
</TD>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<TD><B><?php echo lang_common("group access"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="n_groups[]" multiple size="5">
|
||||
<?php
|
||||
if ($id > 0) {
|
||||
$phpgw->db->query("select groups from webcal_entry_groups where cal_id='$id'");
|
||||
$phpgw->db->next_record();
|
||||
$db_groups = $phpgw->db->f("groups");
|
||||
}
|
||||
|
||||
$user_groups = $phpgw->groups->read_names();
|
||||
for ($i=0;$i<count($user_groups);$i++) {
|
||||
echo "<option value=\"" . $user_groups[$i][0] . "\"";
|
||||
if (ereg(",".$user_groups[$i][0].",",$db_groups))
|
||||
echo " selected";
|
||||
echo ">" . $user_groups[$i][1] . "</option>\n";
|
||||
}
|
||||
|
||||
?></SELECT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<?php
|
||||
// This will cause problems if there are more then 13 permissions.
|
||||
// The permissions class needs to be updated to handle this.
|
||||
$phpgw->db->query("select loginid, lastname, firstname from accounts where "
|
||||
. "status !='L' and loginid != '" . $phpgw->session->loginid . "' and "
|
||||
. "permissions like '%:calendar:%' order by lastname,firstname,loginid");
|
||||
|
||||
if ($phpgw->db->num_rows() > 50)
|
||||
$size = 15;
|
||||
else if ($phpgw->db->num_rows() > 5)
|
||||
$size = 5;
|
||||
else
|
||||
$size = $phpgw->db->num_rows();
|
||||
|
||||
echo "<TR><TD VALIGN=\"top\"><B>" . lang_calendar("Participants") . ":</B></TD>"
|
||||
. "<TD>\n<SELECT NAME=\"participants[]\" multiple size=\"$size\">\n";
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("loginid") . "\"";
|
||||
if (($participants[$phpgw->db->f("loginid")]
|
||||
|| $phpgw->db->f("loginid") == $loginid))
|
||||
echo " selected";
|
||||
|
||||
if (! $phpgw->db->f("lastname"))
|
||||
echo ">" . $phpgw->db->f("loginid");
|
||||
else
|
||||
echo ">" . $phpgw->db->f("lastname") . ", " . $phpgw->db->f("firstname");
|
||||
|
||||
echo "</option>\n";
|
||||
}
|
||||
|
||||
echo "<input type=\"hidden\" name=\"participants[]\" value=\""
|
||||
. $phpgw->session->loginid ."\">"
|
||||
. "</select></td></tr>\n";
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><b><?php echo lang_calendar("Repeat type"); ?>:</b></td>
|
||||
<td><select name="rpt_type">
|
||||
<?php
|
||||
echo "<option value=\"none\"" . (strcmp($rpt_type,'none')==0?"selected":"") . ">"
|
||||
. lang_calendar("None") . "</option>";
|
||||
|
||||
echo "<option value=\"daily\"" . (strcmp($rpt_type,'daily')==0?"selected":"") . ">"
|
||||
. lang_calendar("Daily") . "</option>";
|
||||
|
||||
echo "<option value=\"weekly\"" . (strcmp($rpt_type,'weekly')==0?"selected":"") . ">"
|
||||
. lang_calendar("Weekly") . "</option>";
|
||||
|
||||
echo "<option value=\"monthlyByDay\"".(strcmp($rpt_type,'monthlyByDay')==0?"selected":"")
|
||||
. ">" . lang_calendar("Monthly (by day)") . "</option>";
|
||||
|
||||
echo "<option value=\"monthlyByDate\"".(strcmp($rpt_type,'monthlyByDate')==0?"checked":"")
|
||||
. "> " . lang_calendar("Monthly (by date)") . "</option>";
|
||||
|
||||
echo "<option value=\"yearly\"" . (strcmp($rpt_type,'yearly')==0?"checked":"") . ">"
|
||||
. lang_calendar("Yearly") . "</option>";
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<tr>
|
||||
<td><b><?php echo lang_calendar("Repeat End date"); ?>:</b></td>
|
||||
<td><input type=checkbox name=rpt_end_use value=y <?php
|
||||
echo ($rpt_end?"checked":""); ?>> <?php echo lang_calendar("Use End date"); ?>
|
||||
|
||||
<?php
|
||||
if ($rpt_end) {
|
||||
$rpt_day = date("d",$rpt_end);
|
||||
$rpt_month = date("m",$rpt_end);
|
||||
$rpt_year = date("Y",$rpt_end);
|
||||
} else {
|
||||
$rpt_day = $day+1;
|
||||
$rpt_month = $month;
|
||||
$rpt_year = $year;
|
||||
}
|
||||
|
||||
$day_html = "<SELECT NAME=\"rpt_day\">";
|
||||
for ($i = 1; $i <= 31; $i++) {
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $rpt_day ? " SELECTED" : "")
|
||||
. ">$i</option>\n";
|
||||
}
|
||||
$day_html .= "</select>";
|
||||
|
||||
$month_html = "<select name=\"rpt_month\">";
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$m = lang_common(date("F", mktime(0,0,0,$i,1,$rpt_year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $rpt_month ? " SELECTED" : "")
|
||||
. ">$m</option>\n";
|
||||
}
|
||||
$month_html .= "</select>";
|
||||
|
||||
$year_html = "<select name=\"rpt_year\">";
|
||||
for ($i = -1; $i < 5; $i++) {
|
||||
$y = date("Y") + $i;
|
||||
$year_html .= "<OPTION VALUE=\"$y\"" . ($y == $rpt_year ? " SELECTED" : "")
|
||||
. ">$y</option>\n";
|
||||
}
|
||||
$year_html .= "</select>";
|
||||
|
||||
echo $phpgw->preferences->dateformatorder($year_html,$month_html,$day_html);
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><?php echo lang_calendar("Repeat day"); ?>: </b><?php echo lang_calendar("(for Weekly)"); ?></td>
|
||||
<td><?php
|
||||
echo "<input type=checkbox name=rpt_sun value=y "
|
||||
. ($rpt_sun?"checked":"") . "> " . lang_common("Sunday");
|
||||
echo "<input type=checkbox name=rpt_mon value=y "
|
||||
. ($rpt_mon?"checked":"") . "> " . lang_common("Monday");
|
||||
echo "<input type=checkbox name=rpt_tue value=y "
|
||||
. ($rpt_tue?"checked":"") . "> " . lang_common("Tuesday");
|
||||
echo "<input type=checkbox name=rpt_wed value=y "
|
||||
. ($rpt_wed?"checked":"") . "> " . lang_common("Wednesday");
|
||||
echo "<input type=checkbox name=rpt_thu value=y "
|
||||
. ($rpt_thu?"checked":"") . "> " . lang_common("Thursday");
|
||||
echo "<input type=checkbox name=rpt_fri value=y "
|
||||
. ($rpt_fri?"checked":"") . "> " . lang_common("Friday");
|
||||
echo "<input type=checkbox name=rpt_sat value=y "
|
||||
. ($rpt_sat?"checked":"") . "> " . lang_common("Saturday");
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b><?php echo lang_calendar("Frequency"); ?>: </b></td>
|
||||
<td>
|
||||
<input name="rpt_freq" size="4" maxlength="4" value="<?php
|
||||
echo $rpt_freq; ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</TABLE>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
document.writeln ( '<INPUT TYPE="button" VALUE="<?php echo lang_common("Submit"); ?>" ONCLICK="validate_and_submit()">' );
|
||||
/* document.writeln ( '<INPUT TYPE="button" VALUE="<?php echo lang_common("Help"); ?>" ONCLICK="window.open ( \'help_edit_entry.php\', \'cal_help\', \'dependent,menubar,height=365,width=650,innerHeight=365,outerWidth=420,resizable=1\');">' ); */
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<INPUT TYPE="submit" VALUE="<?php echo lang_common("Submit"); ?>">
|
||||
</NOSCRIPT>
|
||||
|
||||
<INPUT TYPE="hidden" NAME="participant_list" VALUE="">
|
||||
|
||||
</FORM>
|
||||
|
||||
<?php
|
||||
if ($id > 0) {
|
||||
echo "<A HREF=\"delete.php?sessionid=" . $phpgw->session->id
|
||||
. "&id=$id\" onClick=\"return confirm('"
|
||||
. lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">"
|
||||
. lang_common("Delete") . "</A><BR>";
|
||||
}
|
||||
} // ***** This might be out of place. I was getting tons of parse errors
|
||||
// from if ($can_edit) { This needs to be rewritten, because if you do
|
||||
// not own the entry. You should not get into this portion of the program.
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
243
calendar/edit_entry_handler.php
Executable file
243
calendar/edit_entry_handler.php
Executable file
@ -0,0 +1,243 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["noheader"]="True";
|
||||
$phpgw_flags["currentapp"]="calendar";
|
||||
include("../header.inc.php");
|
||||
// Input time format "2359"
|
||||
function add_duration($time, $duration)
|
||||
{
|
||||
$hour = (int)($time / 10000);
|
||||
$min = $time % 100;
|
||||
$minutes = $hour * 60 + $min + $duration;
|
||||
$h = $minutes / 60;
|
||||
$m = $minutes % 60;
|
||||
$ret = sprintf ("%d%02d",$h,$m);
|
||||
//echo "add_duration ( $time, $duration ) = $ret <BR>";
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// check to see if two events overlap
|
||||
function times_overlap($time1, $duration1, $time2, $duration2)
|
||||
{
|
||||
//echo "times_overlap ( $time1, $duration1, $time2, $duration2 )<BR>";
|
||||
$hour1 = (int) ($time1 / 100);
|
||||
$min1 = $time1 % 100;
|
||||
$hour2 = (int) ($time2 / 100);
|
||||
$min2 = $time2 % 100;
|
||||
// convert to minutes since midnight
|
||||
$tmins1start = $hour1 * 60 + $min1;
|
||||
$tmins1end = $tmins1start + $duration1;
|
||||
$tmins2start = $hour2 * 60 + $min2;
|
||||
$tmins2end = $tmins2start + $duration2;
|
||||
//echo "tmins1start=$tmins1start, tmins1end=$tmins1end, tmins2start="
|
||||
// . "$tmins2start, tmins2end=$tmins2end<BR>";
|
||||
|
||||
if ($tmins1start >= $tmins2start && $tmins1start <= $tmins2end)
|
||||
return true;
|
||||
if ($tmins1end >= $tmins2start && $tmins1end <= $tmins2end)
|
||||
return true;
|
||||
if ($tmins2start >= $tmins1start && $tmins2start <= $tmins1end)
|
||||
return true;
|
||||
if ($tmins2end >= $tmins1start && $tmins2end <= $tmins1end)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$phpgw->db->lock(array('webcal_entry','webcal_entry_user','webcal_entry_groups',
|
||||
'webcal_entry_repeats'));
|
||||
|
||||
// first check for any schedule conflicts
|
||||
if (strlen($hour) > 0) {
|
||||
$date = mktime(0,0,0,$month,$day,$year);
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "12") {
|
||||
$hour %= 12;
|
||||
if ($ampm == "pm")
|
||||
$hour += 12;
|
||||
}
|
||||
|
||||
$sql = "SELECT webcal_entry_user.cal_login, webcal_entry.cal_time," .
|
||||
"webcal_entry.cal_duration, webcal_entry.cal_name, " .
|
||||
"webcal_entry.cal_id, webcal_entry.cal_access " .
|
||||
"FROM webcal_entry, webcal_entry_user " .
|
||||
"WHERE webcal_entry.cal_id = webcal_entry_user.cal_id " .
|
||||
"AND webcal_entry.cal_date = " . date("Ymd", $date) . " AND ( ";
|
||||
|
||||
for ($i = 0; $i < count($participants); $i++) {
|
||||
if ($i) $sql .= " OR ";
|
||||
$sql .= " webcal_entry_user.cal_login = '" . $participants[$i] . "'";
|
||||
}
|
||||
$sql .= " )";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
$time1 = sprintf("%d:%02d", $hour, $minute);
|
||||
$duration1 = sprintf("%d", $duration);
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
// see if either event overlaps one another
|
||||
if ($phpgw->db->f(4) != $id) {
|
||||
$time2 = $phpgw->db->f(1);
|
||||
$duration2 = $phpgw->db->f(2);
|
||||
if (times_overlap($time1, $duration1, $time2, $duration2)) {
|
||||
$overlap .= "<LI>";
|
||||
if ($phpgw->db->f(5) == 'R' && $phpgw->db->f(0) != $login)
|
||||
$overlap .= "(PRIVATE)";
|
||||
else {
|
||||
$overlap .= "<A HREF=\"".$phpgw->link("view.php",
|
||||
"id=".$phpgw->db->f(4))."\">"
|
||||
. $phpgw->db->f(3) . "</A>";
|
||||
}
|
||||
$overlap .= " (" . display_time($time2);
|
||||
if ($duration2 > 0)
|
||||
$overlap .= "-" . display_time(add_duration($time2,$duration2))
|
||||
. ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($overlap)
|
||||
$error = lang_calendar("The following conflicts with the suggested time:<ul>x</ul>",
|
||||
$overlap);
|
||||
|
||||
if (! $error) {
|
||||
// now add the entries
|
||||
|
||||
if ($id != 0) {
|
||||
$phpgw->db->query("DELETE FROM webcal_entry WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_user WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_repeats WHERE cal_id = $id");
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_groups WHERE cal_id = $id");
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " .
|
||||
"cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
|
||||
"cal_access, cal_type, cal_name, cal_description ) " .
|
||||
"VALUES ('" . $phpgw->session->loginid . "', ";
|
||||
|
||||
$date = mktime(0,0,0,$month,$day,$year);
|
||||
$sql .= date("Ymd", $date) . ", ";
|
||||
if (strlen($hour) > 0) {
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "12") {
|
||||
$hour %= 12;
|
||||
if ($ampm == "pm")
|
||||
$hour += 12;
|
||||
}
|
||||
$sql .= sprintf("%02d%02d00, ",$hour,$minute);
|
||||
} else
|
||||
$sql .= "'-1', ";
|
||||
|
||||
$sql .= date("Ymd") . ", " . date("Gis") . ", ";
|
||||
$sql .= sprintf("%d, ",$duration);
|
||||
$sql .= sprintf("%d, ",$priority);
|
||||
$sql .= "'$access', ";
|
||||
|
||||
if ($rpt_type != 'none')
|
||||
$sql .= "'M', ";
|
||||
else
|
||||
$sql .= "'E', ";
|
||||
|
||||
if (strlen($name) == 0)
|
||||
$name = "Unnamed Event";
|
||||
|
||||
$sql .= "'" . addslashes($name) . "', ";
|
||||
if (! $description)
|
||||
$sql .= "'" . addslashes($name) . "')";
|
||||
else
|
||||
$sql .= "'" . addslashes($description) . "' )";
|
||||
|
||||
$error = "";
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
$phpgw->db->query("SELECT MAX(cal_id) FROM webcal_entry");
|
||||
$phpgw->db->next_record();
|
||||
$id = $phpgw->db->f(0);
|
||||
|
||||
|
||||
for ($i = 0; $i < count($participants); $i++) {
|
||||
// Rewrite
|
||||
$sql = "INSERT INTO webcal_entry_user (cal_id,cal_login,cal_status ) "
|
||||
. "VALUES ($id, '" . $participants[$i] . "', 'A')";
|
||||
$phpgw->db->query($sql);
|
||||
}
|
||||
|
||||
if (count($participants) == 0)
|
||||
$phpgw->db->query("insert into webcal_entry_user (cal_id,cal_login,cal_status"
|
||||
. ") values ($id,'" . $phpgw->session->loginid . "','A' )");
|
||||
}
|
||||
|
||||
if (strlen($rpt_type) || ! strcmp($rpt_type,'none') == 0) {
|
||||
// clearly, we want to delete the old repeats, before inserting new...
|
||||
$phpgw->db->query("delete from webcal_entry_repeats where cal_id='$id'");
|
||||
$freq = ($rpt_freq?$rpt_freq:1);
|
||||
|
||||
if ($rpt_end_use) {
|
||||
$end = "'" . date("Ymd",mktime(0,0,0,$rpt_month,$rpt_day,$rpt_year))
|
||||
. "'";
|
||||
} else
|
||||
$end = 'NULL';
|
||||
|
||||
if ($rpt_type == 'weekly') {
|
||||
$days = ($rpt_sun?'y':'n')
|
||||
. ($rpt_mon?'y':'n')
|
||||
. ($rpt_tue?'y':'n')
|
||||
. ($rpt_wed?'y':'n')
|
||||
. ($rpt_thu?'y':'n')
|
||||
. ($rpt_fri?'y':'n')
|
||||
. ($rpt_sat?'y':'n');
|
||||
} else {
|
||||
$days = "nnnnnnn";
|
||||
}
|
||||
|
||||
$phpgw->db->query("insert into webcal_entry_repeats (cal_id,cal_type,"
|
||||
. "cal_end,cal_days,cal_frequency) values($id,'$rpt_type',"
|
||||
. "$end,'$days',$freq)");
|
||||
}
|
||||
$phpgw->db->query("insert into webcal_entry_groups values ('$id','"
|
||||
. $phpgw->groups->array_to_string($access,$n_groups) . "') ");
|
||||
|
||||
|
||||
Header("Location: ".$phpgw->link("index.php","year=$year&month=$month&cd=14"));
|
||||
|
||||
?>
|
||||
|
||||
$phpgw->common->header();
|
||||
<BODY BGCOLOR="<?php echo $BGCOLOR; ?>">
|
||||
|
||||
<?php if (strlen($overlap)) { ?>
|
||||
<H2><FONT COLOR="<?php echo $H2COLOR;?>">Scheduling Conflict</H2></FONT>
|
||||
<?php
|
||||
$time = sprintf("%d:%02d",$hour,$minute);
|
||||
echo lang_calendar("Your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:", display_time($time),display_time(add_duration($time,$duration))); ?>
|
||||
|
||||
?>
|
||||
|
||||
<UL>
|
||||
<?php echo $overlap; ?>
|
||||
</UL>
|
||||
|
||||
<?php } else { ?>
|
||||
<H2><FONT COLOR="<?php echo $H2COLOR;?>">Error</H2></FONT>
|
||||
<BLOCKQUOTE>
|
||||
<?php echo $error; ?>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
$phpgw->db->unlock();
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
133
calendar/inc/footer.inc.php
Normal file
133
calendar/inc/footer.inc.php
Normal file
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
if ($friendly) {
|
||||
include($phpgw_info["server"]["core_include_root"]."/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<BR CLEAR="all">
|
||||
<HR CLEAR="all">
|
||||
<FONT SIZE="-1">
|
||||
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
||||
<FORM ACTION="index.php" METHOD="GET" NAME="SelectMonth">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<TR><TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
||||
<B><?php echo lang_calendar("Month"); ?>:</B>
|
||||
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,1,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$y--;
|
||||
for ($i = 0; $i < 25; $i++) {
|
||||
$m++;
|
||||
if ($m > 12) {
|
||||
$m = 1;
|
||||
$y++;
|
||||
}
|
||||
$d = mktime(0,0,0,$m,1,$y);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $d) . "\"";
|
||||
if (date("Ymd", $d) == $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang_common(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang_calendar("Go!"); ?>"></NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</FORM>
|
||||
|
||||
<FORM ACTION="week.php" METHOD="GET" NAME="SelectWeek">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<TD VALIGN="top" align="center" WIDTH=33%><FONT SIZE="-1">
|
||||
<B><?php echo lang_calendar("Week"); ?>:</B>
|
||||
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
if ($thisday) {
|
||||
$d = $thisday;
|
||||
} else {
|
||||
$d = date ("d");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,$d,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$wday = date("w", $d_time);
|
||||
$sun = mktime(0,0,0,$m,$d - $wday, $y);
|
||||
for ($i = -7; $i <= 7; $i++) {
|
||||
$tsun = $sun + (3600 * 24 * 7 * $i);
|
||||
$tsat = $tsun + (3600 * 24 * 6);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $tsun) . "\"";
|
||||
if (date("Ymd", $tsun) <= $thisdate &&
|
||||
date("Ymd", $tsat) >= $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang_common(date("F",$tsun)) . strftime(" %d", $tsun) . "-"
|
||||
. lang_common(date("F",$tsat)) . strftime(" %d", $tsat);
|
||||
echo "</option>\n";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang_calendar("Go!"); ?>"></NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</FORM>
|
||||
|
||||
<FONT SIZE="-1">
|
||||
|
||||
<FORM ACTION="year.php" METHOD="GET" NAME="SelectYear">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
|
||||
<TD VALIGN="top" align="right" WIDTH=33%><FONT SIZE="-1">
|
||||
<B><?php echo lang_calendar("Year"); ?>:</B>
|
||||
|
||||
<SELECT NAME="year" ONCHANGE="document.SelectYear.submit()">
|
||||
<?php
|
||||
if ($thisyear) {
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$y = date("Y");
|
||||
}
|
||||
for ($i = ($y - 3); $i < ($y + 3); $i++) {
|
||||
echo "<OPTION VALUE=\"" . $i . "\"";
|
||||
if ($i == $y)
|
||||
echo " SELECTED";
|
||||
echo ">" . $i . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang_calendar("Go!"); ?>"></NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</FORM>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
647
calendar/inc/functions.inc.php
Executable file
647
calendar/inc/functions.inc.php
Executable file
@ -0,0 +1,647 @@
|
||||
<?php
|
||||
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
// only temp
|
||||
$BGCOLOR = "#C0C0C0"; // document background color
|
||||
$H2COLOR = "#000000"; // color of page titles
|
||||
$CELLBG = $phpgw_info["theme"]["cal_dayview"]; // color of table cells in month view
|
||||
$TABLEBG = "#000000"; // lines separating table cells
|
||||
$THBG = "#FFFFFF"; // background color of table column headers
|
||||
$THFG = "#000000"; // text color of table column headers
|
||||
$POPUP_FG = "#000000"; // text color in popup of event description
|
||||
$POPUP_BG = "#FFFFFF"; // background color in popup of event description
|
||||
$TODAYCELLBG = "#E0E0E0";// color of table cells of current day in month view
|
||||
|
||||
|
||||
$month_names = array("01" => lang_common("January"), "07" => lang_common("July"),
|
||||
"02" => lang_common("February"),"08" => lang_common("August"),
|
||||
"03" => lang_common("March"), "09" => lang_common("September"),
|
||||
"04" => lang_common("April"), "10" => lang_common("October"),
|
||||
"05" => lang_common("May"), "11" => lang_common("November"),
|
||||
"06" => lang_common("June"), "12" => lang_common("December")
|
||||
);
|
||||
|
||||
$weekday_names = array( "0" => lang_common("Sunday"), "1" => lang_common("Monday"),
|
||||
"2" => lang_common("Tuesday"), "3" => lang_common("Wednesday"),
|
||||
"4" => lang_common("Thursday"),"5" => lang_common("Friday"),
|
||||
"6" => lang_common("Saturday")
|
||||
);
|
||||
|
||||
function display_small_month($thismonth,$thisyear,$showyear, $link = "")
|
||||
{
|
||||
global $phpgw, $phpgw_info, $friendly;
|
||||
|
||||
if (! $link)
|
||||
$link = "edit_entry.php";
|
||||
|
||||
echo "<TABLE BORDER=0 bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
|
||||
$sun = get_sunday_before($thisyear, $thismonth, 1);
|
||||
|
||||
$monthstart = mktime(2,0,0,$thismonth,1,$thisyear);
|
||||
$monthend = mktime(2,0,0,$thismonth + 1,0,$thisyear);
|
||||
|
||||
echo "<TR><TD COLSPAN=7 ALIGN=\"center\"><FONT SIZE=\"2\">";
|
||||
|
||||
if (! $friendly)
|
||||
echo "<A HREF=\"".$phpgw->link(
|
||||
$phpgw_info["server"]["app_root"]."/",
|
||||
"year=$thisyear&month=$thismonth")
|
||||
. "\">";
|
||||
|
||||
if ($showyear)
|
||||
echo lang_common(date("F",$monthstart)) . " $thisyear" . "</a></font></td></tr>";
|
||||
else
|
||||
echo lang_common(date("F",$monthstart)) . "</A></FONT></TD></TR>";
|
||||
|
||||
echo "<tr>"
|
||||
. "<td>" . lang_calendar("Su") . "</td>"
|
||||
. "<td>" . lang_calendar("Mo") . "</td>"
|
||||
. "<td>" . lang_calendar("Tu") . "</td>"
|
||||
. "<td>" . lang_calendar("We") . "</td>"
|
||||
. "<td>" . lang_calendar("Th") . "</td>"
|
||||
. "<td>" . lang_calendar("Fr") . "</td>"
|
||||
. "<td>" . lang_calendar("Sa") . "</td>"
|
||||
. "</tr>";
|
||||
|
||||
for ($i = $sun; date("Ymd",$i) <= date ("Ymd",$monthend);
|
||||
$i += (24 * 3600 * 7) ) {
|
||||
echo "<TR>";
|
||||
|
||||
for ($j = 0; $j < 7; $j++) {
|
||||
$date = $i + ($j * 24 * 3600);
|
||||
if ( date("Ymd",$date) >= date ("Ymd",$monthstart) &&
|
||||
date("Ymd",$date) <= date ("Ymd",$monthend) ) {
|
||||
echo "<TD align=right>";
|
||||
if (! $friendly)
|
||||
echo "<a href=\"".$phpgw->link($link,
|
||||
"year=".date("Y",$date)
|
||||
."&month=".date("m",$date)
|
||||
."&day=".date("d",$date)) . "\">";
|
||||
echo "<FONT SIZE=\"2\">" . date ( "j", $date ) . "</a></FONT>"
|
||||
. "</TD>";
|
||||
} else
|
||||
echo "<TD></TD>";
|
||||
} // end for $j
|
||||
echo "</TR>";
|
||||
} // end for $i
|
||||
echo "</TABLE>";
|
||||
} // end function
|
||||
|
||||
// LC: links back to an entry view for $id using $pic
|
||||
function link_to_entry($id, $pic, $description)
|
||||
{
|
||||
global $phpgw, $phpgw_info, $friendly;
|
||||
if (! $friendly)
|
||||
echo "<A HREF=\"".$phpgw->link($phpgw_info["server"]["app_root"]
|
||||
."/view.php","id=$id")."\"><img src=\""
|
||||
. $phpgw_info["server"]["app_images"]."/$pic\" "
|
||||
. "border=\"0\" alt=\"".htmlentities($description)."\"></a>";
|
||||
}
|
||||
|
||||
// Get all the repeating events for the specified data and return them
|
||||
// in an array (which is sorted by time of day).
|
||||
// This NEEDS to be combined with make_repeating_entires(),
|
||||
// this just needs an array returned. Thats tommorows job.
|
||||
|
||||
function get_repeating_entries($date)
|
||||
{
|
||||
global $repeated_events, $phpgw;
|
||||
$n = 0;
|
||||
|
||||
$thisyear = substr($date, 0, 4);
|
||||
$thismonth = substr($date, 4, 2);
|
||||
for ($i=0; $i < count($repeated_events); $i++) {
|
||||
$start = date_to_epoch($repeated_events[$i][cal_date]);
|
||||
$end = date_to_epoch($repeated_events[$i][cal_end]);
|
||||
$freq = $repeated_events[$i][cal_frequency];
|
||||
|
||||
// only repeat after the beginning, and if there is an end
|
||||
// before the end
|
||||
if ($repeated_events[$i][cal_end] && date("Ymd",$date) > date("Ymd",$end))
|
||||
continue;
|
||||
|
||||
if (date("Ymd",$date) < date("Ymd",$start))
|
||||
continue;
|
||||
$id = $repeated_events[$i][cal_id];
|
||||
|
||||
if ($repeated_events[$i][cal_type] == 'daily') {
|
||||
if ((floor(($date - $start)/86400)%$freq))
|
||||
continue;
|
||||
$ret[$n++] = $repeated_events[$i];
|
||||
} else if ($repeated_events[$i][cal_type] == 'weekly') {
|
||||
$dow = date("w", $date);
|
||||
$isDay = substr($repeated_events[$i][cal_days], $dow, 1);
|
||||
if (floor(($date - $start)/604800)%$freq)
|
||||
continue;
|
||||
if (strcmp($isDay,"y") == 0) {
|
||||
$ret[$n++] = $repeated_events[$i];
|
||||
}
|
||||
|
||||
} else if ($repeated_events[$i][cal_type] == 'monthlyByDay') {
|
||||
$dowS = date("w", $start);
|
||||
$dayS = floor(date("d", $start)/7);
|
||||
$mthS = date("m", $start);
|
||||
$yrS = date("Y", $start);
|
||||
|
||||
$dow = date("w", $date);
|
||||
$day = floor(date("d", $date)/7);
|
||||
$mth = date("m", $date);
|
||||
$yr = date("Y", $date);
|
||||
|
||||
if ((($yr - $yrS)*12 + $mth - $mthS) % $freq)
|
||||
continue;
|
||||
|
||||
if (($dowS == $dow) && ($day == $dayS)) {
|
||||
$ret[$n++] = $repeated_events[$i];
|
||||
}
|
||||
|
||||
} else if ($repeated_events[$i][cal_type] == 'monthlyByDate') {
|
||||
$mthS = date("m", $start);
|
||||
$yrS = date("Y", $start);
|
||||
|
||||
$mth = date("m", $date);
|
||||
$yr = date("Y", $date);
|
||||
|
||||
if ((($yr - $yrS)*12 + $mth - $mthS) % $freq)
|
||||
continue;
|
||||
|
||||
if (date("d", $date) == date("d", $start)) {
|
||||
$ret[$n++] = $repeated_events[$i];
|
||||
}
|
||||
}
|
||||
|
||||
else if ($repeated_events[$i][cal_type] == 'yearly') {
|
||||
$yrS = date("Y", $start);
|
||||
$yr = date("Y", $date);
|
||||
|
||||
if (($yr - $yrS)%$freq)
|
||||
continue;
|
||||
|
||||
if (date("dm", $date) == date("dm", $start)) {
|
||||
$ret[$n++] = $repeated_events[$i];
|
||||
}
|
||||
} else {
|
||||
// unknown repeat type
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// LC: does the repeating entry thang
|
||||
// There is no need to pass $user, needs to be removed.
|
||||
function make_repeating_entries($date,$hide_icons)
|
||||
{
|
||||
global $repeated_events; // Pass it through?
|
||||
|
||||
$thisyear = substr($date, 0, 4);
|
||||
$thismonth = substr($date, 4, 2);
|
||||
|
||||
for ($i=0; $i < count($repeated_events); $i++ ) {
|
||||
$start = date_to_epoch($repeated_events[$i][cal_date]);
|
||||
$end = date_to_epoch($repeated_events[$i][cal_end]);
|
||||
|
||||
$freq = $repeated_events[$i][cal_frequency];
|
||||
// only repeat after the beginning, and if there is an end
|
||||
// before the end
|
||||
if ($repeated_events[$i][cal_end] && date("Ymd",$date) > date("Ymd",$end) )
|
||||
continue;
|
||||
|
||||
if (date("Ymd",$date) < date("Ymd",$start))
|
||||
continue;
|
||||
|
||||
$id = $repeated_events[$i][cal_id];
|
||||
|
||||
if ($repeated_events[$i][cal_type] == 'daily') {
|
||||
if ( (floor(($date - $start)/86400)%$freq) )
|
||||
continue;
|
||||
link_to_entry( $id, "rpt.gif", $repeated_events[$i][cal_description]);
|
||||
echo $repeated_events[$i][cal_name] . "<br>";
|
||||
} else if ($repeated_events[$i][cal_type] == 'weekly') {
|
||||
$dow = date("w", $date);
|
||||
$isDay = substr($repeated_events[$i][cal_days], $dow, 1);
|
||||
|
||||
/*if ( (floor($diff/86400)%$freq) ) // Whats this for ?
|
||||
** continue;
|
||||
*/
|
||||
|
||||
if (floor(($date - $start)/604800)%$freq)
|
||||
continue;
|
||||
if (strcmp($isDay,"y") == 0) {
|
||||
link_to_entry($id, "rpt.gif", $repeated_events[$i][cal_description]);
|
||||
echo $repeated_events[$i][cal_name] . "<br>";
|
||||
}
|
||||
} else if ($repeated_events[$i][cal_type] == 'monthlyByDay') {
|
||||
$dowS = date("w", $start);
|
||||
$dayS = floor(date("d", $start)/7);
|
||||
$mthS = date("m", $start);
|
||||
$yrS = date("Y", $start);
|
||||
$dow = date("w", $date);
|
||||
$day = floor(date("d", $date)/7);
|
||||
$mth = date("m", $date);
|
||||
$yr = date("Y", $date);
|
||||
if ((($yr - $yrS)*12 + $mth - $mthS) % $freq)
|
||||
continue;
|
||||
|
||||
if (($dowS == $dow) && ($day == $dayS)) {
|
||||
link_to_entry($id, "rpt.gif", $repeated_events[$i][cal_description]);
|
||||
echo $repeated_events[$i][cal_name] . "<br>";
|
||||
}
|
||||
} else if ($repeated_events[$i][cal_type] == 'monthlyByDate') {
|
||||
$mthS = date("m", $start);
|
||||
$yrS = date("Y", $start);
|
||||
$mth = date("m", $date);
|
||||
$yr = date("Y", $date);
|
||||
if ((($yr - $yrS)*12 + $mth - $mthS) % $freq)
|
||||
continue;
|
||||
if (date("d", $date) == date("d", $start)) {
|
||||
link_to_entry($id, "rpt.gif", $repeated_events[$i][cal_description]);
|
||||
echo $repeated_events[$i][cal_name] . "<br>";
|
||||
}
|
||||
} else if ($repeated_events[$i][cal_type] == 'yearly') {
|
||||
$yrS = date("Y", $start);
|
||||
$yr = date("Y", $date);
|
||||
if (($yr - $yrS)%$freq)
|
||||
continue;
|
||||
if (date("dm", $date) == date("dm", $start)) {
|
||||
link_to_entry($id, "rpt.gif", $repeated_events[$i][cal_description]);
|
||||
echo $repeated_events[$i][cal_name] . "<br>";
|
||||
}
|
||||
} else {
|
||||
// unknown rpt type - because of all our else ifs
|
||||
}
|
||||
} // end for loop
|
||||
} // end function
|
||||
|
||||
|
||||
// The orginal patch read this 30+ times in a loop, only read it once.
|
||||
function read_repeated_events()
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$sql = "SELECT webcal_entry.cal_name, webcal_entry.cal_date, "
|
||||
. "webcal_entry_repeats.*, webcal_entry.cal_description, "
|
||||
. "webcal_entry.cal_time,webcal_entry.cal_priority, "
|
||||
. "webcal_entry.cal_duration "
|
||||
. "FROM webcal_entry, webcal_entry_repeats, webcal_entry_user "
|
||||
. "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id "
|
||||
. "AND webcal_entry.cal_id = webcal_entry_user.cal_id "
|
||||
. "AND webcal_entry_user.cal_login = '" . $phpgw->session->loginid . "' "
|
||||
. "AND webcal_entry.cal_type='M'";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
$i = 0;
|
||||
while ($phpgw->db->next_record()) {
|
||||
$repeated_events[$i] = array("cal_name" => $phpgw->db->f("cal_name"),
|
||||
"cal_date" => $phpgw->db->f("cal_date"),
|
||||
"cal_id" => $phpgw->db->f("cal_id"),
|
||||
"cal_type" => $phpgw->db->f("cal_type"),
|
||||
"cal_end" => $phpgw->db->f("cal_end"),
|
||||
"cal_frequency" => $phpgw->db->f("cal_frequency"),
|
||||
"cal_days" => $phpgw->db->f("cal_days"),
|
||||
"cal_description" => $phpgw->db->f("cal_description"),
|
||||
"cal_time" => $phpgw->db->f("cal_time"),
|
||||
"cal_priority" => $phpgw->db->f("cal_priority"),
|
||||
"cal_duration" => $phpgw->db->f("cal_duration")
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
return $repeated_events;
|
||||
}
|
||||
|
||||
|
||||
function get_sunday_before($year,$month,$day)
|
||||
{
|
||||
$weekday = date("w", mktime(0,0,0,$month,$day,$year) );
|
||||
$newdate = mktime(0,0,0,$month,$day - $weekday,$year);
|
||||
return $newdate;
|
||||
}
|
||||
|
||||
|
||||
function sql_search_calendar()
|
||||
{
|
||||
global $phpgw;
|
||||
$s .= $phpgw->groups->cal_sql_search();
|
||||
$s .= " OR webcal_entry.cal_access='public'";
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
function print_date_entries($date,$hide_icons,$sessionid)
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
if (! $hide_icons) {
|
||||
echo "<A HREF=\"".$phpgw->link("edit_entry.php",
|
||||
"year=".date("Y",$date)
|
||||
."&month=".date("m",$date)
|
||||
."&day=".date("d",$date))
|
||||
. "\">"
|
||||
. "<IMG SRC=\"".$phpgw_info["server"]["app_images"]."/new.gif\" WIDTH=10 HEIGHT=10 ALT=\""
|
||||
. lang_calendar("New Entry") . "\" BORDER=0 ALIGN=right></A>";
|
||||
}
|
||||
echo "[ " . "<a href=\"".$phpgw->link("day.php",
|
||||
"month=".date("m",$date)
|
||||
."&day=".date("d",$date)
|
||||
."&year=".date("Y",$date))
|
||||
. "\">" . date("d", $date)
|
||||
. "</a> ]<BR>\n";
|
||||
echo "<FONT SIZE=\"2\">";
|
||||
|
||||
// This is only a temporey fix
|
||||
if ($phpgw_info["server"]["db_type"] == "mysql") {
|
||||
$sql = "SELECT DISTINCT webcal_entry.cal_id, webcal_entry.cal_name, "
|
||||
. "webcal_entry.cal_priority, webcal_entry.cal_time, "
|
||||
. "webcal_entry_user.cal_status, webcal_entry.cal_create_by, "
|
||||
. "webcal_entry.cal_access,webcal_entry.cal_description "
|
||||
. "FROM webcal_entry LEFT JOIN webcal_entry_user "
|
||||
. "ON webcal_entry.cal_id=webcal_entry_user.cal_id "
|
||||
. "LEFT JOIN webcal_entry_groups "
|
||||
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||
. "AND webcal_entry.cal_type != 'M' "
|
||||
. "AND (webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
|
||||
. sql_search_calendar() . ") "
|
||||
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
||||
} else {
|
||||
$sql = "SELECT DISTINCT webcal_entry.cal_id, webcal_entry.cal_name, "
|
||||
. "webcal_entry.cal_priority, webcal_entry.cal_time, "
|
||||
. "webcal_entry_user.cal_status, webcal_entry.cal_create_by, "
|
||||
. "webcal_entry.cal_access,webcal_entry.cal_description "
|
||||
. "FROM webcal_entry, webcal_entry_user, webcal_entry_groups "
|
||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||
. "AND webcal_entry.cal_type != 'M' AND "
|
||||
. "(webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
|
||||
. " AND webcal_entry.cal_id=webcal_entry_user.cal_id OR "
|
||||
. "(webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||
. sql_search_calendar() . ")) ORDER "
|
||||
. "BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
||||
}
|
||||
|
||||
make_repeating_entries($date, $hide_icons);
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
echo "<NOBR>";
|
||||
while ($phpgw->db->next_record()) {
|
||||
if (! $hide_icons) {
|
||||
echo "<A HREF=\"".$phpgw->link("view.php","id=".$phpgw->db->f(0))
|
||||
. "\" onMouseOver=\"window.status='"
|
||||
. lang_calendar("View this entry") . "'; return true;\"><IMG SRC=\"".$phpgw_info["server"]["app_images"]."/"
|
||||
. "circle.gif\" WIDTH=5 HEIGHT=7 ALT=\"" . $phpgw->db->f("cal_description")
|
||||
. "\" BORDER=0></A>";
|
||||
}
|
||||
if ($phpgw->db->f(2) == 3)
|
||||
echo "<font color=\"CC0000\">"; // ***** put into theme
|
||||
if ($phpgw->db->f(3) > 0) {
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "24")
|
||||
printf ("%02d:%02d",$phpgw->db->f(3) / 10000, ($phpgw->db->f(3) / 100) % 100);
|
||||
else {
|
||||
$h = ((int)($phpgw->db->f(3) / 10000)) % 12;
|
||||
if ($h == 0)
|
||||
$h = 12;
|
||||
echo $h;
|
||||
$m = ($phpgw->db->f(3) / 100) % 100;
|
||||
if ($m > 0)
|
||||
printf(":%02d",$m);
|
||||
echo ((int)($phpgw->db->f(3) / 10000)) < 12 ? "am" : "pm";
|
||||
}
|
||||
echo ">";
|
||||
}
|
||||
echo "</NOBR>";
|
||||
echo htmlentities($phpgw->db->f(1));
|
||||
|
||||
if ($phpgw->db->f(2) == 3)
|
||||
echo "</font>";
|
||||
if ($phpgw->db->f(4) == "W")
|
||||
echo "</FONT>";
|
||||
echo "<BR>";
|
||||
} // end ?
|
||||
print "</FONT>";
|
||||
} // end function
|
||||
|
||||
// display a time in either 12 or 24 hour format
|
||||
// Input time is an interger like 235900
|
||||
function display_time($time)
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
$hour = (int)($time / 10000);
|
||||
$min = ($time / 100) % 100;
|
||||
if ($phpgw_info["user"]["preferences"]["timeformat"] == "12") {
|
||||
$ampm = $hour >= 12 ? "pm" : "am";
|
||||
$hour %= 12;
|
||||
if ($hour == 0)
|
||||
$hour = 12;
|
||||
$ret = sprintf("%d:%02d%s",$hour,$min,$ampm);
|
||||
} else
|
||||
$ret = sprintf("%d:%02d",$hour,$min);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// convert a date from an int format "19991231" into "31 Dec 1999"
|
||||
function date_to_str($indate)
|
||||
{
|
||||
if (strlen($indate) > 0) {
|
||||
$y = (int)($indate / 10000);
|
||||
$m = ($indate / 100) % 100;
|
||||
$d = $indate % 100;
|
||||
$d = mktime(0,0,0,$m,$d,$y);
|
||||
return strftime("%A, %B %d, %Y", $d);
|
||||
} else
|
||||
return strftime("%A, %B %d, %Y");
|
||||
}
|
||||
|
||||
// This should be a common function. (todo list)
|
||||
function date_to_epoch($d)
|
||||
{
|
||||
return mktime(0,0,0,substr($d,4,2),substr($d,6,2),substr($d,0,4));
|
||||
}
|
||||
|
||||
function html_for_event_day_at_a_glance ($id, $date, $time,
|
||||
$name, $description, $status, $pri, $access, $duration, $hide_icons)
|
||||
{
|
||||
global $first_hour, $last_hour, $hour_arr, $rowspan_arr, $rowspan,
|
||||
$eventinfo, $phpgw, $phpgw_info;
|
||||
|
||||
if ($time >= 0) {
|
||||
$ind = (int)($time / 10000);
|
||||
if ($ind < $first_hour)
|
||||
$first_hour = $ind;
|
||||
if ($ind > $last_hour)
|
||||
$last_hour = $ind;
|
||||
} else
|
||||
$ind = 99;
|
||||
|
||||
$class = "entry";
|
||||
if (! $hide_icons) {
|
||||
$hour_arr[$ind] .= "<A HREF=\"".$phpgw->link("view.php","id=$id");
|
||||
$hour_arr[$ind] .= "\" onMouseOver=\"window.status='" . lang_calendar("View this entry")
|
||||
. "'; return true;\">";
|
||||
}
|
||||
|
||||
if ($time >= 0) {
|
||||
$hour_arr[$ind] .= "[" . display_time($time);
|
||||
if ($duration > 0) {
|
||||
// calc end time
|
||||
$h = (int)($time / 10000);
|
||||
$m = ($time / 100) % 100;
|
||||
$m += $duration;
|
||||
$d = $duration;
|
||||
while ( $m >= 60 ) {
|
||||
$h++;
|
||||
$m -= 60;
|
||||
}
|
||||
$end_time = sprintf("%02d%02d00", $h, $m);
|
||||
$hour_arr[$ind] .= "-" . display_time($end_time);
|
||||
if ($m == 0)
|
||||
$rowspan = $h - $ind;
|
||||
else
|
||||
$rowspan = $h - $ind + 1;
|
||||
if ($rowspan > $rowspan_arr[$ind] && $rowspan > 1)
|
||||
$rowspan_arr[$ind] = $rowspan;
|
||||
}
|
||||
$hour_arr[$ind] .= "] ";
|
||||
}
|
||||
$hour_arr[$ind] .= "<img src=".$phpgw_info["server"]["app_images"]."/circle.gif border=0 alt=\"" . htmlentities($description) . "\"></a>";
|
||||
if ($pri == 3)
|
||||
$hour_arr[$ind] .= "<font color=\"CC0000\">";
|
||||
$hour_arr[$ind] .= htmlspecialchars($name);
|
||||
|
||||
if ($pri == 3)
|
||||
$hour_arr[$ind] .= "</font>";
|
||||
$hour_arr[$ind] .= "</A><BR>";
|
||||
}
|
||||
|
||||
|
||||
function print_day_at_a_glance($date, $hide_icons)
|
||||
{
|
||||
global $hour_arr, $rowspan_arr, $rowspan, $phpgw, $phpgw_info,
|
||||
$CELLBG, $TODAYCELLBG, $THFG, $THBG;
|
||||
|
||||
// get all the repeating events for this date and store in array $rep
|
||||
$rep = get_repeating_entries($date, $user);
|
||||
$cur_rep = 0;
|
||||
$sql = "SELECT DISTINCT webcal_entry.cal_id, webcal_entry.cal_name, "
|
||||
. "webcal_entry.cal_priority, webcal_entry.cal_time, "
|
||||
. "webcal_entry_user.cal_status, webcal_entry.cal_create_by, "
|
||||
. "webcal_entry.cal_access,webcal_entry.cal_description "
|
||||
. "FROM webcal_entry "
|
||||
. "LEFT JOIN webcal_entry_user "
|
||||
. "ON webcal_entry.cal_id=webcal_entry_user.cal_id "
|
||||
. "LEFT JOIN webcal_entry_groups "
|
||||
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||
. "AND webcal_entry.cal_type != 'M' "
|
||||
. "AND (webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
|
||||
. sql_search_calendar() . ") "
|
||||
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
$hour_arr = Array();
|
||||
$first_hour = ($phpgw_info["user"]["preferences"]["workdaystarts"] + 1);
|
||||
$last_hour = ($phpgw_info["user"]["preferences"]["workdayends"] + 1);
|
||||
|
||||
$rowspan_arr = Array();
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
// print out any repeating events that are before this one...
|
||||
while ($cur_rep < count($rep) && $rep[$cur_rep]["cal_time"] < $phpgw->db->f(3)) {
|
||||
html_for_event_day_at_a_glance($rep[$cur_rep]["cal_id"],
|
||||
$date, $rep[$cur_rep]["cal_time"],
|
||||
$rep[$cur_rep]["cal_name"], $rep[$cur_rep]["cal_description"],
|
||||
$rep[$cur_rep]["cal_status"], $rep[$cur_rep]["cal_priority"],
|
||||
$rep[$cur_rep]["cal_access"], $rep[$cur_rep]["cal_duration"],
|
||||
$hide_icons );
|
||||
$cur_rep++;
|
||||
}
|
||||
|
||||
html_for_event_day_at_a_glance($phpgw->db->f("cal_id"),$date,$phpgw->db->f("cal_time"),
|
||||
$phpgw->db->f("cal_name"),$phpgw->db->f("cal_description"),
|
||||
$phpgw->db->f("cal_status"),$phpgw->db->f("cal_priority"),
|
||||
$phpgw->db->f("cal_access"),$phpgw->db->f("cal_duration"),
|
||||
$hide_icons);
|
||||
}
|
||||
|
||||
// print out any remaining repeating events
|
||||
while ($cur_rep < count($rep)) {
|
||||
html_for_event_day_at_a_glance ( $rep[$cur_rep]["cal_id"],
|
||||
$date, $rep[$cur_rep]["cal_time"],
|
||||
$rep[$cur_rep]["cal_name"], $rep[$cur_rep]["cal_description"],
|
||||
$rep[$cur_rep]["cal_status"], $rep[$cur_rep]["cal_priority"],
|
||||
$rep[$cur_rep]["cal_access"], $rep[$cur_rep]["cal_duration"],
|
||||
$hide_icons );
|
||||
$cur_rep++;
|
||||
}
|
||||
|
||||
// squish events that use the same cell into the same cell.
|
||||
// For example, an event from 8:00-9:15 and another from 9:30-9:45 both
|
||||
// want to show up in the 8:00-9:59 cell.
|
||||
$rowspan = 0;
|
||||
$last_row = -1;
|
||||
for ($i = 0; $i < 24; $i++) {
|
||||
if ($rowspan > 1) {
|
||||
if (strlen($hour_arr[$i])) {
|
||||
$hour_arr[$last_row] .= $hour_arr[$i];
|
||||
$hour_arr[$i] = "";
|
||||
$rowspan_arr[$i] = 0;
|
||||
}
|
||||
$rowspan--;
|
||||
} else if ($rowspan_arr[$i] > 1) {
|
||||
$rowspan = $rowspan_arr[$i];
|
||||
$last_row = $i;
|
||||
}
|
||||
}
|
||||
if (strlen($hour_arr[99])) {
|
||||
echo "<TR><TD BGCOLOR=\"$TODAYCELLBG\"> </TD><TD BGCOLOR=\"$TODAYCELLBG\">"
|
||||
. "$hour_arr[99]</TD></TR>\n";
|
||||
}
|
||||
$rowspan = 0;
|
||||
for ($i = $first_hour; $i <= $last_hour; $i++) {
|
||||
$time = display_time($i * 10000);
|
||||
// echo "<TR><TH WIDTH=\"14%\" BGCOLOR=\"$THBG\">" . "<FONT COLOR=\"$THFG\">"
|
||||
// . $time . "</FONT></TH>\n";
|
||||
echo "<TR><TH WIDTH=\"14%\" BGCOLOR=\"$THBG\"><FONT COLOR=\"$THFG\">";
|
||||
|
||||
// tooley: the hour - 36400 is a HACK for improper storage of hour allows
|
||||
// in user preference land.
|
||||
echo "<A HREF=\"".$phpgw->link("edit_entry.php",
|
||||
"year=" . date("Y",$date)
|
||||
. "&month=" . date("m",$date)
|
||||
. "&day=" . date("d",$date)
|
||||
. "&hour=" . substr($time,0,2)
|
||||
. "&minute=" . substr($time,2,2))
|
||||
. "\">$time</A></FONT></TH>";
|
||||
|
||||
if ($rowspan > 1) {
|
||||
// this might mean there's an overlap, or it could mean one event
|
||||
// ends at 11:15 and another starts at 11:30.
|
||||
if (strlen($hour_arr[$i]))
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\">$hour_arr[$i]</TD>";
|
||||
$rowspan--;
|
||||
} else {
|
||||
if (! strlen($hour_arr[$i]))
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\"> </TD></TR>\n";
|
||||
else {
|
||||
$rowspan = $rowspan_arr[$i];
|
||||
if ($rowspan > 1)
|
||||
echo "<TD VALIGN=\"top\" BGCOLOR=\"$TODAYCELLBG\" ROWSPAN=\"$rowspan\">"
|
||||
. "$hour_arr[$i]</TD></TR>\n";
|
||||
else
|
||||
echo "<TD BGCOLOR=\"$TODAYCELLBG\">$hour_arr[$i]</TD></TR>\n";
|
||||
}
|
||||
}
|
||||
} // end for
|
||||
} // end function
|
||||
?>
|
34
calendar/inc/header.inc.php
Normal file
34
calendar/inc/header.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="2%">
|
||||
|
||||
</td>
|
||||
<td width="2%">
|
||||
<a href="<?php echo $phpgw->link("day.php","year=".$phpgw->preferences->show_date_other("Y",time())."&month=".$phpgw->preferences->show_date_other("m", time())."&day=".$phpgw->preferences->show_date_other("d",time())); ?>">
|
||||
<img src="<?php echo $phpgw_info["server"]["app_images"]; ?>/today.gif" alt="<?php echo lang_calendar("Today"); ?>" border="0">
|
||||
</a>
|
||||
</td>
|
||||
<td width="2%" align="left">
|
||||
<a href="<?php echo $phpgw->link("week.php","date=".$phpgw->preferences->show_date_other("Ymd",time())); ?>">
|
||||
<img src="<?php echo $phpgw_info["server"]["app_images"]; ?>/week.gif" alt="<?php echo lang_calendar("This week"); ?>" border="0">
|
||||
</a>
|
||||
</td>
|
||||
<td width="2%" align="left">
|
||||
<a href="<?php echo $phpgw->link("index.php","date=".$phpgw->preferences->show_date_other("Ymd",time())); ?>">
|
||||
<img src="<?php echo $phpgw_info["server"]["app_images"]; ?>/month.gif" alt="<?php echo lang_calendar("This month"); ?>" border="0">
|
||||
</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<form action="<?php echo $phpgw_info["server"]["app_root"]; ?>/search.php">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
<input type="hidden" name="from" value="<?php echo $PHP_SELF; ?>">
|
||||
<input type="hidden" name="date" value="<?php echo $date; ?>">
|
||||
<input type="hidden" name="month" value="<?php echo $thismonth; ?>">
|
||||
<input type="hidden" name="day" value="<?php echo $thisday; ?>">
|
||||
<input type="hidden" name="year" value="<?php echo $thisyear; ?>">
|
||||
<input name="keywords">
|
||||
<input type="submit" name="submit" value="<?php echo lang_common("Search"); ?>">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
45
calendar/inc/styles.inc.php
Normal file
45
calendar/inc/styles.inc.php
Normal file
@ -0,0 +1,45 @@
|
||||
<!-- Note: We don't set the font size here because most browsers (IE4/5 for
|
||||
Win & all Netscape 4) don't correctly support it. Instead, the
|
||||
HTML font tag is used.
|
||||
-->
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.tablecell {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.tableheader {
|
||||
width: 80px;
|
||||
color: #FFFFFF;
|
||||
background-color: #000000;
|
||||
}
|
||||
.dayofmonth {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
background-color: #E7E7E7;
|
||||
}
|
||||
.weeknumber {
|
||||
color: #B04040;
|
||||
text-decoration: none;
|
||||
}
|
||||
.monthlink {
|
||||
color: #B04040;
|
||||
text-decoration: none;
|
||||
}
|
||||
.entry {
|
||||
color: #006000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.unapprovedentry {
|
||||
color: #800000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navlinks {
|
||||
color: #000000;
|
||||
}
|
||||
.aboutinfo {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
-->
|
||||
</STYLE>
|
175
calendar/index.php
Executable file
175
calendar/index.php
Executable file
@ -0,0 +1,175 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if (! $friendly) {
|
||||
$phpgw_flags["noheader"] = True;
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
if (strlen($date) > 0) {
|
||||
$thisyear = substr($date, 0, 4);
|
||||
$thismonth = substr($date, 4, 2);
|
||||
$thisday = substr($date, 6, 2);
|
||||
} else {
|
||||
if ($day == 0)
|
||||
$thisday = date("d");
|
||||
else
|
||||
$thisday = $day;
|
||||
if ($month == 0)
|
||||
$thismonth = date("m");
|
||||
else
|
||||
$thismonth = $month;
|
||||
if ($year == 0)
|
||||
$thisyear = date("Y");
|
||||
else
|
||||
$thisyear = $year;
|
||||
}
|
||||
|
||||
$next = mktime(2,0,0,$thismonth + 1,1,$thisyear);
|
||||
$nextyear = date("Y", $next);
|
||||
$nextmonth = date("m", $next);
|
||||
$nextdate = date("Ymd");
|
||||
|
||||
$prev = mktime(2,0,0,$thismonth - 1,1,$thisyear);
|
||||
$prevyear = date("Y",$prev);
|
||||
$prevmonth = date("m",$prev);
|
||||
$prevdate = date("Ymd");
|
||||
|
||||
if (! $friendly) {
|
||||
$phpgw->common->header();
|
||||
} else
|
||||
echo "<body bgcolor=\"".$phpgw_info["theme"][bg_color]."\">";
|
||||
$view = "month";
|
||||
?>
|
||||
|
||||
<HEAD>
|
||||
<STYLE TYPE="text/css">
|
||||
<?php echo "$CCS_DEFS";?>
|
||||
|
||||
.tablecell {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<TABLE BORDER=0 WIDTH=100%>
|
||||
<TR>
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
echo "<TD ALIGN=\"left\">";
|
||||
display_small_month($prevmonth,$prevyear,True);
|
||||
}
|
||||
?>
|
||||
|
||||
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B>
|
||||
<?php
|
||||
$m = mktime(2,0,0,$thismonth,1,$thisyear);
|
||||
print lang_common(strftime("%B",$m)) . " " . $thisyear;
|
||||
?>
|
||||
</B></FONT>
|
||||
<FONT COLOR="<?php echo $H2COLOR;?>" SIZE="+1">
|
||||
<br>
|
||||
<?php
|
||||
if ($phpgw->session->firstname)
|
||||
echo $phpgw->session->firstname . " ";
|
||||
if ($phpgw->session->lastname)
|
||||
echo $phpgw->session->lastname;
|
||||
?>
|
||||
</FONT></TD>
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
echo '<TD ALIGN="right">';
|
||||
display_small_month($nextmonth,$nextyear,True);
|
||||
}
|
||||
?>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE WIDTH=100% BORDER=0 bordercolor=FFFFFF cellspacing=2 cellpadding=2>
|
||||
|
||||
<TR>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Sun"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Mon"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Tue"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Wed"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Thu"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Fri"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang_calendar("Sat"); ?></FONT></TH>
|
||||
</TR>
|
||||
|
||||
<?php
|
||||
/* Pre-Load the repeated events for quckier access */
|
||||
$repeated_events = read_repeated_events();
|
||||
|
||||
// We add 2 hours on to the time so that the switch to DST doesn't
|
||||
// throw us off. So, all our dates are 2AM for that day.
|
||||
// $sun = get_sunday_before($thisyear,$thismonth,1) + 7200;
|
||||
$sun = get_sunday_before($thisyear,$thismonth,1) + 7200;
|
||||
// generate values for first day and last day of month
|
||||
$monthstart = mktime(2,0,0,$thismonth,1,$thisyear);
|
||||
$monthend = mktime(2,0,0,$thismonth + 1,0,$thisyear);
|
||||
|
||||
// debugging
|
||||
//echo "<P>sun = " . date("D, m-d-Y", $sun) . "<BR>";
|
||||
//echo "<P>monthstart = " . date("D, m-d-Y", $monthstart) . "<BR>";
|
||||
//echo "<P>monthend = " . date("D, m-d-Y", $monthend) . "<BR>";
|
||||
|
||||
$today = mktime(2,0,0,date("m"),date("d"),date("Y"));
|
||||
|
||||
for ($i = $sun; date("Ymd",$i) <= date("Ymd",$monthend); $i += (24 * 3600 * 7) ) {
|
||||
$CELLBG = $phpgw->nextmatchs->alternate_row_color($CELLBG);
|
||||
|
||||
echo "<TR>\n";
|
||||
for ($j = 0; $j < 7; $j++) {
|
||||
$date = $i + ($j * 24 * 3600);
|
||||
if (date("Ymd",$date) >= date("Ymd",$monthstart) &&
|
||||
date("Ymd",$date) <= date("Ymd",$monthend) ) {
|
||||
echo "<TD VALIGN=\"top\" WIDTH=75 HEIGHT=75 ID=\"tablecell\"";
|
||||
if (date("Ymd",$date) == date("Ymd",$today)) {
|
||||
echo " BGCOLOR=\"".$phpgw_info["theme"]["cal_today"]."\">";
|
||||
} else {
|
||||
echo " BGCOLOR=\"$CELLBG\">";
|
||||
}
|
||||
print_date_entries($date,$friendly,$phpgw->session->id);
|
||||
echo "</TD>\n";
|
||||
} else {
|
||||
echo "<TD></TD>\n";
|
||||
}
|
||||
}
|
||||
print "</TR>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
<P>
|
||||
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
$param = "";
|
||||
if ($thisyear)
|
||||
$param .= "year=$thisyear&month=$thismonth&";
|
||||
|
||||
$param .= "friendly=1\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||
. "status = '" . lang_calendar("Generate printer-friendly version"). "'";
|
||||
echo "<a href=\"".$phpgw->link($PHP_SELF,$param)."\">";
|
||||
echo "[". lang_calendar("Printer Friendly") . "]</A>";
|
||||
}
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
84
calendar/lang/br_calendar.inc.php
Normal file
84
calendar/lang/br_calendar.inc.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Hoje"; break;
|
||||
case "this week": $s = "Esta Semana"; break;
|
||||
case "this month": $s = "Este mes"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Gera versoes imprimiveis?!?"; break;
|
||||
|
||||
case "printer friendly": $s = "imprimivel"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Voce nao digitou uma \\nBreve Descricao"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Voce nao digitou \\num horario valido."; break;
|
||||
|
||||
case "Are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Tem certeza\\nque quer apagar\\nesta entrada ?"; break;
|
||||
|
||||
case "participants": $s = "Participante"; break;
|
||||
case "calendar - edit": $s = "Calendario - Editar"; break;
|
||||
case "calendar - add": $s = "Calendario - Adicionar"; break;
|
||||
case "brief description": $s = "Curta Descricao"; break;
|
||||
case "full description": $s = "Descricao Completa"; break;
|
||||
case "duration": $s = "Duracao"; break;
|
||||
case "minutes": $s = "minutos"; break;
|
||||
case "repeat type": $s = "Tipo de repeticao"; break;
|
||||
case "none": $s = "Nenhuma"; break;
|
||||
case "daily": $s = "Diaria"; break;
|
||||
case "weekly": $s = "semanal"; break;
|
||||
case "monthly (by day)": $s = "mensal (por dia)"; break;
|
||||
case "monthly (by date)": $s = "mensal (pela data)"; break;
|
||||
case "yearly": $s = "Anual"; break;
|
||||
case "repeat end date": $s = "Data final da repeticao"; break;
|
||||
case "use end date": $s = "Usar data final"; break;
|
||||
case "repeat day": $s = "Repeticao Diaria"; break;
|
||||
case "(for weekly)": $s = "(por semana)"; break;
|
||||
case "frequency": $s = "Frequencia"; break;
|
||||
case "sun": $s = "Dom"; break;
|
||||
case "mon": $s = "Seg"; break;
|
||||
case "tue": $s = "Ter"; break;
|
||||
case "wed": $s = "Qua"; break;
|
||||
case "thu": $s = "Qui"; break;
|
||||
case "fri": $s = "Sex"; break;
|
||||
case "sat": $s = "Sab"; break;
|
||||
case "search results": $s = "Resultados da pesquisa"; break;
|
||||
case "no matches found.": $s = "Nenhuma ocorrencia encontrada."; break;
|
||||
case "1 match found": $s = "Encontrada 1 ocorrencia"; break;
|
||||
case "x matches found": $s = "$m1 ocorrencias encontradas"; break;
|
||||
case "description": $s = "Descricao"; break;
|
||||
case "repetition": $s = "Repeticao"; break;
|
||||
case "days repeated": $s = "Dias Repetidos"; break;
|
||||
case "go!": $s = "Vai!"; break;
|
||||
case "year": $s = "Ano"; break;
|
||||
case "month": $s = "Mes"; break;
|
||||
case "week": $s = "Semana"; break;
|
||||
case "new entry": $s = "Nova Entrada"; break;
|
||||
case "view this entry": $s = "Visualiza esta entrada"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "os seguintes conflitos com o horario sugerido:<ul>$m1</ul>"; break;
|
||||
|
||||
case "Your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "Horiario Sugerido: <B> $m1 - $m2 </B> esta em conflito com as seguintes entradas no calendario:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "voce deve digitar uma ou mais palavras chave"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Tem certeza\\nvoce quer\\napagar esta entrada ?\\n\\nIsto apagara a entrada\\npara todos usuarios."; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
?>
|
98
calendar/lang/de_calendar.inc.php
Executable file
98
calendar/lang/de_calendar.inc.php
Executable file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Heute"; break;
|
||||
case "this week": $s = "Diese Woche"; break;
|
||||
case "this month": $s = "Dieser Monat"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Drucker-freundliche Version erzeugen"; break;
|
||||
|
||||
case "printer friendly": $s = "Drucker-freundlich"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Sie haben keine a\\nKurzbeschreibung eingegeben"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Sie haben keine a\\ngültige Tageszeit eingegeben."; break;
|
||||
|
||||
case "Are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Sind Sie sicher,\\ndaß Sie diesen\\nEintrag löschen wollen ?"; break;
|
||||
|
||||
case "participants": $s = "Teilnehmer"; break;
|
||||
case "calendar - edit": $s = "Kalender - Edit"; break;
|
||||
case "calendar - add": $s = "Kalender - Add"; break;
|
||||
case "brief description":$s = "Kurzbeschreibung";break;
|
||||
case "full description": $s = "vollständige Beschreibung"; break;
|
||||
case "duration": $s = "Dauer"; break;
|
||||
case "minutes": $s = "Minuten"; break;
|
||||
case "repeat type": $s = "Wiederholungstyp"; break;
|
||||
case "none": $s = "Keiner"; break;
|
||||
case "daily": $s = "Täglich"; break;
|
||||
case "weekly": $s = "Wöchentlich"; break;
|
||||
case "monthly (by day)": $s = "Monatlich (nach Wochentag)"; break;
|
||||
case "monthly (by date)":$s = "Monatlich (nach Datum)"; break;
|
||||
case "yearly": $s = "Jährlich"; break;
|
||||
case "repeat end date": $s = "Enddatum"; break;
|
||||
case "use end date": $s = "Enddatum benutzen"; break;
|
||||
case "repeat day": $s = "Wiederholungstag"; break;
|
||||
case "(for weekly)": $s = "(für wöchentlich)"; break;
|
||||
case "frequency": $s = "Häufigkeit"; break;
|
||||
case "sun": $s = "So"; break;
|
||||
case "mon": $s = "Mo"; break;
|
||||
case "tue": $s = "Di"; break;
|
||||
case "wed": $s = "Mi"; break;
|
||||
case "thu": $s = "Do"; break;
|
||||
case "fri": $s = "Fr"; break;
|
||||
case "sat": $s = "Sa"; break;
|
||||
case "su": $s = "Su"; break;
|
||||
case "mo": $s = "Mo"; break;
|
||||
case "tu": $s = "Di"; break;
|
||||
case "we": $s = "Mi"; break;
|
||||
case "th": $s = "Do"; break;
|
||||
case "fr": $s = "Fr"; break;
|
||||
case "sa": $s = "Sa"; break;
|
||||
case "search results": $s = "Suchergebnisse"; break;
|
||||
case "no matches found.":$s = "Keine Treffer gefunden."; break;
|
||||
case "1 match found": $s = "1 Treffer gefunden"; break;
|
||||
case "x matches found": $s = "$m1 Treffer gefunden"; break;
|
||||
case "description": $s = "Beschreibung"; break;
|
||||
case "repetition": $s = "Repetition"; break;
|
||||
case "days repeated": $s = "wiederholte Tage"; break;
|
||||
case "go!": $s = "Go!"; break;
|
||||
case "year": $s = "Jahr"; break;
|
||||
case "month": $s = "Monat"; break;
|
||||
case "week": $s = "Woche"; break;
|
||||
case "new entry": $s = "Neuer Eintrag"; break;
|
||||
case "view this entry": $s = "Diesen Eintrag anzeigen"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "Es gibt folgende Überschneidungen mit dem angegebenen Termin:<ul>$m1</ul>"; break;
|
||||
|
||||
case "your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:";
|
||||
$s = "Der angegebene Zeitraum von <B> $m1 - $m2 </B> steht in Konflikt mit bestehenden Terminen:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "Sie müssen einen oder mehrere Suchbegriffe angeben"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Sind Sie sicher, daß Sie diesen Eintrag löschen wollen ?\\n\\nDies löscht diesen Eintrag für alle Benutzer..";
|
||||
break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
|
||||
default: $s = "* ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
95
calendar/lang/en_calendar.inc.php
Executable file
95
calendar/lang/en_calendar.inc.php
Executable file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Today"; break;
|
||||
case "this week": $s = "This week"; break;
|
||||
case "this month": $s = "This month"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Generate printer-friendly version"; break;
|
||||
|
||||
case "printer friendly": $s = "Printer Friendly"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "You have not entered a\\nBrief Description"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "You have not entered a\\nvalid time of day."; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Are you sure\\nyou want to\\ndelete this entry ?"; break;
|
||||
|
||||
case "participants": $s = "Participants"; break;
|
||||
case "calendar - edit": $s = "Calendar - Edit"; break;
|
||||
case "calendar - add": $s = "Calendar - Add"; break;
|
||||
case "brief description":$s = "Brief Description";break;
|
||||
case "full description": $s = "Full Description";break;
|
||||
case "duration": $s = "Duration"; break;
|
||||
case "minutes": $s = "minutes"; break;
|
||||
case "repeat type": $s = "Repeat type"; break;
|
||||
case "none": $s = "None"; break;
|
||||
case "daily": $s = "Daily"; break;
|
||||
case "weekly": $s = "weekly"; break;
|
||||
case "monthly (by day)": $s = "Monthly (by day)";break;
|
||||
case "monthly (by date)":$s = "Monthly (by date)";break;
|
||||
case "yearly": $s = "Yearly"; break;
|
||||
case "repeat end date": $s = "Repeat End date"; break;
|
||||
case "use end date": $s = "Use End date"; break;
|
||||
case "repeat day": $s = "Repeat day"; break;
|
||||
case "(for weekly)": $s = "(for Weekly)"; break;
|
||||
case "frequency": $s = "Frequency"; break;
|
||||
case "sun": $s = "Sun"; break;
|
||||
case "mon": $s = "Mon"; break;
|
||||
case "tue": $s = "Tue"; break;
|
||||
case "wed": $s = "Wed"; break;
|
||||
case "thu": $s = "Thu"; break;
|
||||
case "fri": $s = "Fri"; break;
|
||||
case "sat": $s = "Sat"; break;
|
||||
case "su": $s = "Su"; break;
|
||||
case "mo": $s = "M"; break;
|
||||
case "tu": $s = "T"; break;
|
||||
case "we": $s = "W"; break;
|
||||
case "th": $s = "T"; break;
|
||||
case "fr": $s = "F"; break;
|
||||
case "sa": $s = "Sa"; break;
|
||||
case "search results": $s = "Search Results"; break;
|
||||
case "no matches found.":$s = "No matches found.";break;
|
||||
case "1 match found": $s = "1 match found"; break;
|
||||
case "x matches found": $s = "$m1 matches found";break;
|
||||
case "description": $s = "Description"; break;
|
||||
case "repetition": $s = "Repetition"; break;
|
||||
case "days repeated": $s = "days repeated"; break;
|
||||
case "go!": $s = "Go!"; break;
|
||||
case "year": $s = "Year"; break;
|
||||
case "month": $s = "Month"; break;
|
||||
case "week": $s = "Week"; break;
|
||||
case "new entry": $s = "New Entry"; break;
|
||||
case "view this entry": $s = "View this entry"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "The following conflicts with the suggested time:<ul>$m1</ul>"; break;
|
||||
|
||||
case "your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "Your suggested time of <B> $m1 - $m2 </B> conflicts with the following existing calendar entries:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "You must enter one or more search keywords"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.": $s = "Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users."; break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
90
calendar/lang/fr_calendar.inc.php
Executable file
90
calendar/lang/fr_calendar.inc.php
Executable file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Aujourd'hui"; break;
|
||||
case "this week": $s = "Cette semaine"; break;
|
||||
case "this month": $s = "Ce mois"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Générer une version imprimable"; break;
|
||||
|
||||
case "printer friendly": $s = "Version imprimable"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Vous n'avez pas saisi\\de Description Résumé"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Vous n'avez pas saisi\\nune heure valide."; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "êtes vous certain\\nde vouloir\\nsupprimer cette entré ?"; break;
|
||||
|
||||
case "participants": $s = "Participants"; break;
|
||||
case "calendar - edit": $s = "Calendrier - Edition"; break;
|
||||
case "calendar - add": $s = "Calendrier - Ajout"; break;
|
||||
case "brief description":$s = "Description Résumé";break;
|
||||
case "full description": $s = "Description Complète";break;
|
||||
case "duration": $s = "Durée"; break;
|
||||
case "minutes": $s = "minutes"; break;
|
||||
case "repeat type": $s = "Type de répétition"; break;
|
||||
case "none": $s = "Aucun"; break;
|
||||
case "daily": $s = "Quotidien"; break;
|
||||
case "weekly": $s = "Hebdomadaire"; break;
|
||||
case "monthly (by day)": $s = "Mensuel (par jour)";break;
|
||||
case "monthly (by date)":$s = "Mensuel (par date)";break;
|
||||
case "yearly": $s = "Annuel"; break;
|
||||
case "repeat end date": $s = "Date de fin de répétition"; break;
|
||||
case "use end date": $s = "Utiliser la date de fin"; break;
|
||||
case "repeat day": $s = "Jour de répétition"; break;
|
||||
case "(for weekly)": $s = "(pour hebdomadaire)"; break;
|
||||
case "frequency": $s = "Fréquence"; break;
|
||||
case "sun": $s = "Dim"; break;
|
||||
case "mon": $s = "Lun"; break;
|
||||
case "tue": $s = "Mar"; break;
|
||||
case "wed": $s = "Mer"; break;
|
||||
case "thu": $s = "Jeu"; break;
|
||||
case "fri": $s = "Ven"; break;
|
||||
case "sat": $s = "Sam"; break;
|
||||
case "search results": $s = "Résultats de la recherche"; break;
|
||||
case "no matches found.":$s = "Aucune correspondance trouvée.";break;
|
||||
case "1 match found": $s = "1 résultat trouvé"; break;
|
||||
case "x matches found": $s = "$m1 résultats trouvé";break;
|
||||
case "description": $s = "Description"; break;
|
||||
case "repetition": $s = "Répétition"; break;
|
||||
case "days repeated": $s = "jours répétés"; break;
|
||||
case "go!": $s = "Go!"; break;
|
||||
case "year": $s = "Année"; break;
|
||||
case "month": $s = "Mois"; break;
|
||||
case "week": $s = "Semaine"; break;
|
||||
case "new entry": $s = "Nouvelle entrée"; break;
|
||||
case "view this entry": $s = "Voir cette entrée"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "Les entrées suivantes entrent en conflit avec l'heure proposée :<ul>$m1</ul>"; break;
|
||||
|
||||
case "your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "La plage horaire <B> $m1 - $m2 </B> que vous proposez entre en conflit avec les entrées suivantes du calendrier :"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "Vous devez entrer au moins un mot clef pour la recherche"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Étes vous certain\\nde vouloir\\nsupprimer cette entrée ?\\n\\nCeci détruira\\ncette entrée pour tous les utilisateurs."; break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
|
||||
default: $s = "* ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
84
calendar/lang/it_calendar.inc.php
Executable file
84
calendar/lang/it_calendar.inc.php
Executable file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Oggi"; break;
|
||||
case "this week": $s = "Questa settimana"; break;
|
||||
case "this month": $s = "Questo mese"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Genera versione per Stampante"; break;
|
||||
|
||||
case "printer friendly": $s = "Per Stampa"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Non hai inserito una a\\nBreve Descrizione"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Hai inserito un a\\norario non valido."; break;
|
||||
|
||||
case "Are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "sei sicuro\\ndi voler cancellare\\nquesta nota ?"; break;
|
||||
|
||||
case "participants": $s = "Partecipanti"; break;
|
||||
case "calendar - edit": $s = "Calendario - Modifica"; break;
|
||||
case "calendar - add": $s = "Calendario - Aggiungi"; break;
|
||||
case "brief description": $s = "Breve Descrizione"; break;
|
||||
case "full description": $s = "Descrizione Completa"; break;
|
||||
case "duration": $s = "Durata"; break;
|
||||
case "minutes": $s = "minuti"; break;
|
||||
case "repeat type": $s = "Tipo di ripetizione"; break;
|
||||
case "none": $s = "Nessuna"; break;
|
||||
case "daily": $s = "giornaliera"; break;
|
||||
case "weekly": $s = "settimanale"; break;
|
||||
case "monthly (by day)": $s = "mensile (per giorno)"; break;
|
||||
case "monthly (by date)": $s = "mensile (per data)"; break;
|
||||
case "yearly": $s = "Annuale"; break;
|
||||
case "repeat end date": $s = "Data fine ripetizioni"; break;
|
||||
case "use end date": $s = "Usa data finale"; break;
|
||||
case "repeat day": $s = "Giorno ripetizione"; break;
|
||||
case "(for weekly)": $s = "(per settimanale)"; break;
|
||||
case "frequency": $s = "Frequeza"; break;
|
||||
case "sun": $s = "Dom"; break;
|
||||
case "mon": $s = "Lun"; break;
|
||||
case "tue": $s = "Mar"; break;
|
||||
case "wed": $s = "Mer"; break;
|
||||
case "thu": $s = "Giov"; break;
|
||||
case "fri": $s = "Ven"; break;
|
||||
case "sat": $s = "Sab"; break;
|
||||
case "search results": $s = "Risultati ricerca"; break;
|
||||
case "no matches found.": $s = "Nessuna occorrenza trovata."; break;
|
||||
case "1 match found": $s = "Trovata 1 occorrenza"; break;
|
||||
case "x matches found": $s = "$m1 occorrenze trovate"; break;
|
||||
case "description": $s = "Descrizione"; break;
|
||||
case "repetition": $s = "Ripetizione"; break;
|
||||
case "days repeated": $s = "giorni ripetizione"; break;
|
||||
case "go!": $s = "Vai!"; break;
|
||||
case "year": $s = "Anno"; break;
|
||||
case "month": $s = "Mese"; break;
|
||||
case "week": $s = "Settimana"; break;
|
||||
case "new entry": $s = "Nuovo appuntamento"; break;
|
||||
case "view this entry": $s = "Visualizza questo appuntamento"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "Il seguente è in conflitto con l'orario suggerito:<ul>$m1</ul>"; break;
|
||||
|
||||
case "Your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "L'orario da te suggerito: <B> $m1 - $m2 </B> è in conflitto con i seguenti appuntamenti in calendario:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "Devi specificare una o più parole chiave per la ricerca"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Sei sicuro\\ndi voler\\ncancellare questo appuntamento ?\\n\\nQuesta azione lo cancellerà per\\ntutti gli utenti."; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
?>
|
88
calendar/lang/kr_calendar.inc.php
Executable file
88
calendar/lang/kr_calendar.inc.php
Executable file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "오늘"; break;
|
||||
case "this week": $s = "이번주"; break;
|
||||
case "this month": $s = "이번달"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "프린트하기"; break;
|
||||
|
||||
case "printer friendly": $s = "프린트하기"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "간단한 설명을 입력하세요."; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "시간을 정확하게 입력하세요."; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "이 항목을 정말로 삭제 하시겠습니까 ?"; break;
|
||||
|
||||
case "participants": $s = "참여자"; break;
|
||||
case "calendar - edit": $s = "달력 - 편집"; break;
|
||||
case "calendar - add": $s = "달력 - 추가"; break;
|
||||
case "brief description":$s = "간단한 설명";break;
|
||||
case "full description": $s = "자세한 설명";break;
|
||||
case "duration": $s = "기간"; break;
|
||||
case "minutes": $s = "분"; break;
|
||||
case "repeat type": $s = "반복방법"; break;
|
||||
case "none": $s = "없음"; break;
|
||||
case "daily": $s = "매일"; break;
|
||||
case "weekly": $s = "매주"; break;
|
||||
case "monthly (by day)": $s = "매월 (by day) ";break;
|
||||
case "monthly (by date)":$s = "매월 (by date)";break;
|
||||
case "yearly": $s = "매년"; break;
|
||||
case "repeat end date": $s = "반복 종료날짜"; break;
|
||||
case "use end date": $s = "마지막 날짜 사용"; break;
|
||||
case "repeat day": $s = "반복 요일"; break;
|
||||
case "(for weekly)": $s = ""; break;
|
||||
case "frequency": $s = "빈도"; break;
|
||||
case "sun": $s = "일요일"; break;
|
||||
case "mon": $s = "월요일"; break;
|
||||
case "tue": $s = "화요일"; break;
|
||||
case "wed": $s = "수요일"; break;
|
||||
case "thu": $s = "목요일"; break;
|
||||
case "fri": $s = "금요일"; break;
|
||||
case "sat": $s = "토요일"; break;
|
||||
case "search results": $s = "검색결과"; break;
|
||||
case "no matches found.":$s = "검색조건에 맞는 항목이 없습니다.";break;
|
||||
case "1 match found": $s = "1개항목 찾음"; break;
|
||||
case "x matches found": $s = "$m1개 항목 찾음";break;
|
||||
case "description": $s = "설명"; break;
|
||||
case "repetition": $s = "반복"; break;
|
||||
case "days repeated": $s = "동안 반복되었음"; break;
|
||||
case "go!": $s = "실행!"; break;
|
||||
case "year": $s = "년"; break;
|
||||
case "month": $s = "월"; break;
|
||||
case "week": $s = "주"; break;
|
||||
case "new entry": $s = "새로운 항목"; break;
|
||||
case "view this entry": $s = "항목 보기"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "다음 항목이 제안된 시간과 충돌합니다. :<ul>$m1</ul>"; break;
|
||||
|
||||
case "your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "<B> $m1 - $m2 </B>이 항목이 달력에 있는 내용과 같습니다."; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "하나 이상의 검색키워드를 입력하셔야 합니다."; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.": $s = "이 항목을 정말로 삭제하시겠습니까?"; break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
89
calendar/lang/nl_calendar.inc.php
Executable file
89
calendar/lang/nl_calendar.inc.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Vandaag"; break;
|
||||
case "this week": $s = "Deze week"; break;
|
||||
case "this month": $s = "Deze maand"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Genereer een printer-vriendelijke versie"; break;
|
||||
|
||||
case "printer friendly": $s = "Printer-vriendelijk"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "U hebt geen korte \\nomschrijving ingevoerd"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "U hebt geen geldig \\ntijdstip ingevoerd."; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Weet u zeker dat u \\ndeze afspraak wilt verwideren?"; break;
|
||||
|
||||
case "participants": $s = "Deelnemers"; break;
|
||||
case "calendar - edit": $s = "Kalendar - Bewerken"; break;
|
||||
case "calendar - add": $s = "Kalendar - Toevoegen"; break;
|
||||
case "brief description":$s = "Korte omschrijving";break;
|
||||
case "full description": $s = "Volledige omschrijving";break;
|
||||
case "duration": $s = "Duur"; break;
|
||||
case "minutes": $s = "minuten"; break;
|
||||
case "repeat type": $s = "Terugkeer-patroon"; break;
|
||||
case "none": $s = "Geen"; break;
|
||||
case "daily": $s = "Dagelijks"; break;
|
||||
case "weekly": $s = "Wekelijks"; break;
|
||||
case "monthly (by day)": $s = "Maandelijks (op dag)";break;
|
||||
case "monthly (by date)":$s = "Maandelijks (op datum)";break;
|
||||
case "yearly": $s = "Jaarlijks"; break;
|
||||
case "repeat end date": $s = "Einddatum terugkeerpatroon"; break;
|
||||
case "use end date": $s = "Gebruik einddatum"; break;
|
||||
case "repeat day": $s = "Herhaal dag"; break;
|
||||
case "(for weekly)": $s = "(voor wekelijks)"; break;
|
||||
case "frequency": $s = "Frequentie"; break;
|
||||
case "sun": $s = "Zo"; break;
|
||||
case "mon": $s = "Ma"; break;
|
||||
case "tue": $s = "Di"; break;
|
||||
case "wed": $s = "Wo"; break;
|
||||
case "thu": $s = "Do"; break;
|
||||
case "fri": $s = "Vr"; break;
|
||||
case "sat": $s = "Za"; break;
|
||||
case "search results": $s = "Zoek resultaten"; break;
|
||||
case "no matches found.":$s = "Geen item gevonden.";break;
|
||||
case "1 match found": $s = "1 item gevonden"; break;
|
||||
case "x matches found": $s = "$m1 items gevonden";break;
|
||||
case "description": $s = "Omschrijving"; break;
|
||||
case "repetition": $s = "Terugkeerpatroon"; break;
|
||||
case "days repeated": $s = "dagen herhaald"; break;
|
||||
case "go!": $s = "Doen!"; break;
|
||||
case "year": $s = "Jaar"; break;
|
||||
case "month": $s = "Maand"; break;
|
||||
case "week": $s = "Week"; break;
|
||||
case "new entry": $s = "Nieuwe afspraak"; break;
|
||||
case "view this entry": $s = "Bekijk deze afspraak"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "Het volgende levert een conflict op met de aangegeven tijd:<ul>$m1</ul>"; break;
|
||||
|
||||
case "your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "De door u opgegeven tijd <B> $m1 - $m2 </B> levert een confilct op met de volgende afspraken:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "U moet een of meer trefwoorden opgeven om op te zoeken"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Weet u zeker dat \\nu deze afspraak \\nwilt verwijderen?\\n \\nDit zal deze \\nafspraak voor alle \\ngebruikers verwijderen."; break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
82
calendar/lang/no_calendar.inc.php
Executable file
82
calendar/lang/no_calendar.inc.php
Executable file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "I dag"; break;
|
||||
case "this week": $s = "Denne uken"; break;
|
||||
case "this month": $s = "Denne måneden"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Generer printer-vennlig versjon"; break;
|
||||
|
||||
case "printer friendly": $s = "Printer Vennlig"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Du har ikke skrevet inn en\\nkort beskrivelse"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Du har ikke skrevet inn en\\ngyldig tid."; break;
|
||||
|
||||
case "Are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Er du sikker på at\\ndu vil\\nslette denne?"; break;
|
||||
|
||||
case "participants": $s = "Deltakere"; break;
|
||||
case "calendar - edit": $s = "Kalender - Edit"; break;
|
||||
case "calendar - add": $s = "Kalender - Tilføy"; break;
|
||||
case "brief description":$s = "Kort beskrivelse";break;
|
||||
case "full description": $s = "Full beskrivelse";break;
|
||||
case "duration": $s = "Varighet"; break;
|
||||
case "minutes": $s = "minutter"; break;
|
||||
case "repeat type": $s = "Gjenta type"; break;
|
||||
case "none": $s = "Ingen"; break;
|
||||
case "daily": $s = "Daglig"; break;
|
||||
case "weekly": $s = "Ukentlig"; break;
|
||||
case "monthly (by day)": $s = "Månedlig (etter dag)";break;
|
||||
case "monthly (by date)":$s = "Månedlig (etter dato)";break;
|
||||
case "yearly": $s = "Årlig"; break;
|
||||
case "repeat end date": $s = "Gjennta sluttdato"; break;
|
||||
case "use end date": $s = "Bruk sluttdato"; break;
|
||||
case "repeat day": $s = "Gjenta dag"; break;
|
||||
case "(for weekly)": $s = "(for Ukentlig)"; break;
|
||||
case "frequency": $s = "Hvor ofte"; break;
|
||||
case "sun": $s = "Søn"; break;
|
||||
case "mon": $s = "Man"; break;
|
||||
case "tue": $s = "Tir"; break;
|
||||
case "wed": $s = "Ons"; break;
|
||||
case "thu": $s = "Tor"; break;
|
||||
case "fri": $s = "Fre"; break;
|
||||
case "sat": $s = "Lør"; break;
|
||||
case "search results": $s = "Søk resultater"; break;
|
||||
case "no matches found.":$s = "Ingen match funnet.";break;
|
||||
case "1 match found": $s = "1 match funnet"; break;
|
||||
case "x matches found": $s = "$m1 match funnet";break;
|
||||
case "description": $s = "Beskrivelse"; break;
|
||||
case "repetition": $s = "Gjenntakelse"; break;
|
||||
case "days repeated": $s = "dager gjentatt"; break;
|
||||
case "go!": $s = "Go!"; break;
|
||||
case "year": $s = "År"; break;
|
||||
case "month": $s = "Måned"; break;
|
||||
case "week": $s = "Uke"; break;
|
||||
case "new entry": $s = "Ny Entry"; break;
|
||||
case "view this entry": $s = "Vis denne entry"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "De følgende konflikter ved den foreslåtte tidene:<ul>$m1</ul>"; break;
|
||||
|
||||
case "Your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "Din foreslåtte tid av <B> $m1 - $m2 </B> er i konflikt med de følgende kalender entries:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "Du må skrive inn ett eller flere søkeord"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.": $s = "Er du sikker på at\\ndu vil\\nslette denne entry ?\\n\\nDette vil slette\\ndenne entry for alle brukere."; break;
|
||||
|
||||
default: $s = "* $message";
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
89
calendar/lang/sp_calendar.inc.php
Executable file
89
calendar/lang/sp_calendar.inc.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
function lang_calendar($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
|
||||
switch($message)
|
||||
{
|
||||
case "today": $s = "Hoy"; break;
|
||||
case "this week": $s = "Esta semana"; break;
|
||||
case "this month": $s = "Este mes"; break;
|
||||
|
||||
case "generate printer-friendly version":
|
||||
$s = "Generar versión para impresion"; break;
|
||||
|
||||
case "printer friendly": $s = "Versión impresión"; break;
|
||||
|
||||
case "you have not entered a\\nbrief description":
|
||||
$s = "Ud. no ha ingresado una\\nBrief descripción"; break;
|
||||
|
||||
case "you have not entered a\\nvalid time of day.":
|
||||
$s = "Ud. no ha ingresado una\\nvalid hora valida."; break;
|
||||
|
||||
case "Are you sure\\nyou want to\\ndelete this entry ?":
|
||||
$s = "Esta seguro\\nde querer\\nborrar esta entrada ?"; break;
|
||||
|
||||
case "participants": $s = "Participantes"; break;
|
||||
case "calendar - edit": $s = "Calendario - Edicion"; break;
|
||||
case "calendar - add": $s = "Calendario - Agregar"; break;
|
||||
case "brief description":$s = "Descripción breve";break;
|
||||
case "full description": $s = "Descripción completa";break;
|
||||
case "duration": $s = "Duración"; break;
|
||||
case "minutes": $s = "minutos"; break;
|
||||
case "repeat type": $s = "Tipo repetición"; break;
|
||||
case "none": $s = "Ninguno"; break;
|
||||
case "daily": $s = "Diario"; break;
|
||||
case "weekly": $s = "Semanal"; break;
|
||||
case "monthly (by day)": $s = "Mensual (por día)";break;
|
||||
case "monthly (by date)":$s = "Mensual (por fecha)";break;
|
||||
case "yearly": $s = "Anual"; break;
|
||||
case "repeat end date": $s = "Repetir fecha final"; break;
|
||||
case "use end date": $s = "Usar fecha final"; break;
|
||||
case "repeat day": $s = "Repetir día"; break;
|
||||
case "(for weekly)": $s = "(por semanal)"; break;
|
||||
case "frequency": $s = "Frequencia"; break;
|
||||
case "sun": $s = "Dom"; break;
|
||||
case "mon": $s = "Lun"; break;
|
||||
case "tue": $s = "Mar"; break;
|
||||
case "wed": $s = "Mie"; break;
|
||||
case "thu": $s = "Jue"; break;
|
||||
case "fri": $s = "Vie"; break;
|
||||
case "sat": $s = "Sab"; break;
|
||||
case "search results": $s = "Resultados de la busqueda"; break;
|
||||
case "no matches found.":$s = "No se encontraron coincidencias.";break;
|
||||
case "1 match found": $s = "1 coincidencia encontrada"; break;
|
||||
case "x matches found": $s = "$m1 coincidencias encontradas";break;
|
||||
case "description": $s = "Descripción"; break;
|
||||
case "repetition": $s = "Repetición"; break;
|
||||
case "days repeated": $s = "días repetidos"; break;
|
||||
case "go!": $s = "Ir!"; break;
|
||||
case "year": $s = "Año"; break;
|
||||
case "month": $s = "Mes"; break;
|
||||
case "week": $s = "Semana"; break;
|
||||
case "new entry": $s = "Nueva Entrada"; break;
|
||||
case "view this entry": $s = "Ver esta entrada"; break;
|
||||
|
||||
case "the following conflicts with the suggested time:<ul>x</ul>":
|
||||
$s = "Los siguientes conflictos con las horas sugeridas:<ul>$m1</ul>"; break;
|
||||
|
||||
case "Your suggested time of <B> x - x </B> conflicts with the following existing calendar entries:":
|
||||
$s = "Sus horas sugeridas de <B> $m1 - $m2 </B> estan en conflicto con las siguientes entradas en el calendario:"; break;
|
||||
|
||||
case "you must enter one or more search keywords":
|
||||
$s = "Ud. debe entrar una o mas claves de busqueda"; break;
|
||||
|
||||
case "are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users.":
|
||||
$s = "Esta seguro\\nde querer\\nborrar esta entrarda ?\\n\\nEsto borrara\\nla entrada para todos los usuarios."; break;
|
||||
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
case "": $s = ""; break;
|
||||
default: $s = "<b>*</b> ". $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
?>
|
97
calendar/search.php
Executable file
97
calendar/search.php
Executable file
@ -0,0 +1,97 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
if (! $keywords) {
|
||||
// If we reach this it becuase they didn't search for anything,
|
||||
// attempt to send them back to where they where.
|
||||
Header("Location: $from?sessionid=" . $phpgw->session->id . "&date=$date"
|
||||
. "month=$month&day=$day&year=$year");
|
||||
} else { // else keywords
|
||||
$phpgw->common->header();
|
||||
|
||||
$error = "";
|
||||
|
||||
if (strlen($keywords) == 0)
|
||||
$error = lang_calendar("You must enter one or more search keywords.");
|
||||
|
||||
$matches = 0;
|
||||
|
||||
?>
|
||||
|
||||
<H2><FONT COLOR="<?php echo $H2COLOR . "\">" . lang_calendar("Search Results"); ?></FONT></H2>
|
||||
|
||||
<?php
|
||||
// There is currently a problem searching in with repeated events.
|
||||
// It spits back out the date it was entered. I would like to to say that
|
||||
// it is a repeated event.
|
||||
if (strlen($error)) {
|
||||
echo "<B>" . lang_common("Error") . ":</B> $error";
|
||||
} else {
|
||||
$ids = array();
|
||||
$words = split(" ", $keywords);
|
||||
for ($i = 0; $i < count($words); $i++) {
|
||||
$sql = "SELECT DISTINCT webcal_entry.cal_id, webcal_entry.cal_name, "
|
||||
. "webcal_entry.cal_date,webcal_entry_repeats.cal_type "
|
||||
. "FROM webcal_entry, webcal_entry_user, webcal_entry_repeats, "
|
||||
. "webcal_entry_groups WHERE (UPPER(webcal_entry.cal_name) LIKE UPPER('%"
|
||||
. $words[$i] . "%') OR UPPER(webcal_entry.cal_description) "
|
||||
. "LIKE UPPER('%" . $words[$i] . "%')) AND (webcal_entry_user.cal_login = '"
|
||||
. $phpgw->session->loginid. "' OR (webcal_entry.cal_access='public' "
|
||||
. sql_search_calendar() . ")) ORDER BY cal_date";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
while ($phpgw->db->next_record()) {
|
||||
$matches++;
|
||||
$ids[strval( $phpgw->db->f(0) )]++;
|
||||
$info[strval( $phpgw->db->f(0) )] = $phpgw->db->f(1) . " ("
|
||||
. date_to_str($phpgw->db->f(2)) . ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($matches > 0)
|
||||
$matches = count($ids);
|
||||
|
||||
if ($matches == 1)
|
||||
echo "<B>1 match found.</B><P>";
|
||||
else if ($matches > 0)
|
||||
echo "<B>" . lang_calendar("x matches found",$matches) . ".</B><P>";
|
||||
else
|
||||
$error = lang_calendar("no matches found.");
|
||||
|
||||
// now sort by number of hits
|
||||
if (! strlen($error)) {
|
||||
arsort ($ids);
|
||||
for (reset($ids); $key = key($ids); next($ids)) {
|
||||
echo "<LI><A HREF=\"view.php?sessionid=" . $phpgw->session->id
|
||||
. "&id=$key\">" . $info[$key] . "</A>\n";
|
||||
|
||||
}
|
||||
} else {
|
||||
echo $error;
|
||||
}
|
||||
|
||||
} // End else keywords
|
||||
?>
|
||||
|
||||
<P>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
216
calendar/view.php
Executable file
216
calendar/view.php
Executable file
@ -0,0 +1,216 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
// This will take the loginid and convert it into firstname and lastname.
|
||||
// This function will be moved out of here someday and be used through out
|
||||
// the program.
|
||||
function convert_login_name($db,$l)
|
||||
{
|
||||
$db->query("select firstname,lastname from accounts where loginid='$l'");
|
||||
$db->next_record();
|
||||
return array($db->f("firstname"),$db->f("lastname"));
|
||||
}
|
||||
|
||||
function grab_group($db,$id)
|
||||
{
|
||||
$db->query("select groups from webcal_entry_groups where cal_id='$id'");
|
||||
$db->next_record();
|
||||
|
||||
return $db->f("groups");
|
||||
}
|
||||
|
||||
if ($year) $thisyear = $year;
|
||||
if ($month) $thismonth = $month;
|
||||
|
||||
$pri[1] = lang_common("Low");
|
||||
$pri[2] = lang_common("Medium");
|
||||
$pri[3] = lang_common("High");
|
||||
|
||||
$unapproved = FALSE;
|
||||
|
||||
if ($id < 1) {
|
||||
echo lang_calendar("Invalid entry id.");
|
||||
exit;
|
||||
}
|
||||
|
||||
// first see who has access to view this entry
|
||||
$is_my_event = false;
|
||||
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login='"
|
||||
. "$loginid' AND cal_id = $id");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
if ($phpgw->db->f(0) == $id)
|
||||
$is_my_event = true;
|
||||
|
||||
$phpgw->db->query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, "
|
||||
. "cal_mod_time,cal_duration,cal_priority,cal_type,cal_access, "
|
||||
. "cal_name,cal_description FROM webcal_entry WHERE cal_id=$id");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$create_by = $phpgw->db->f(0);
|
||||
$name = $phpgw->db->f(9);
|
||||
$description = $phpgw->db->f(10);
|
||||
|
||||
$description = htmlspecialchars($description);
|
||||
$description = nl2br($description);
|
||||
|
||||
?>
|
||||
<h2>
|
||||
<font color="<?php echo $H2COLOR; ?>">
|
||||
<?php echo htmlspecialchars($name); ?>
|
||||
</font>
|
||||
</h2>
|
||||
|
||||
<TABLE BORDER=0>
|
||||
<?php
|
||||
// Some browser add a \n when its entered in the database. Not a big deal
|
||||
// this will be printed even though its not needed.
|
||||
if ($description) {
|
||||
echo "<tr><td VALIGN=\"top\"><b>" . lang_calendar("Description") . ":</B></TD><td>"
|
||||
. "$description</TD></TR>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_common("Date"); ?>:</B></TD>
|
||||
<td><?php echo date_to_str($phpgw->db->f(1)); ?></TD>
|
||||
</TR>
|
||||
|
||||
<?php
|
||||
// save date so the trailer links are for the same time period
|
||||
$list = split("-",$phpgw->db->f(1));
|
||||
$thisyear = (int)($phpgw->db->f(1) / 10000);
|
||||
$thismonth = ($phpgw->db->f(1) / 100) % 100;
|
||||
$thisday = $phpgw->db->f(1) % 100;
|
||||
|
||||
if ($phpgw->db->f(2) > 0) {
|
||||
?>
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_common("Time"); ?>:</B></TD>
|
||||
<td><?php echo display_time($phpgw->db->f(2)); ?></TD>
|
||||
</TR>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($phpgw->db->f(5) > 0) {
|
||||
echo "<tr><TD VALIGN=\"top\"><b>" . lang_calendar("Duration") . ":</B></TD><td>"
|
||||
. $phpgw->db->f(5) . " " . lang_calendar("minutes") . "</TD></TR>";
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_common("Priority"); ?>:</B></TD>
|
||||
<td><?php echo $pri[$phpgw->db->f(6)]; ?></TD>
|
||||
</TR>
|
||||
|
||||
<?php
|
||||
echo "<tr><TD VALIGN=\"top\"><b>" . lang_common("Created by") . ":</B></TD>\n";
|
||||
|
||||
// Isn't there a function somewhere to do this ??
|
||||
list($fn,$ln) = convert_login_name($phpgw->db,$phpgw->db->f(0));
|
||||
if ($fn && $ln)
|
||||
echo "<td>$fn $ln</td></tr>\n";
|
||||
else
|
||||
echo "<td>" . $phpgw->db->f(0) . "</TD></TR>\n";
|
||||
?>
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_common("Updated"); ?>:</B></TD>
|
||||
<td><?php echo date_to_str($phpgw->db->f(3)) . " " . display_time($phpgw->db->f(4));
|
||||
?></TD>
|
||||
</TR>
|
||||
|
||||
<?php
|
||||
$cal_groups = $phpgw->groups->convert_string_to_names(grab_group($phpgw->db,$id));
|
||||
if ($cal_groups)
|
||||
echo "<tr><td><b>" . lang_common("Groups") . ":</b></td><td>$cal_groups</td></tr>";
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_calendar("Participants"); ?>:</B></TD>
|
||||
<td><?php
|
||||
|
||||
$phpgw->db->query("SELECT webcal_entry_user.cal_login, accounts.lastname, "
|
||||
. "accounts.firstname, webcal_entry_user.cal_status "
|
||||
. "FROM webcal_entry_user, accounts WHERE webcal_entry_user."
|
||||
. "cal_id='$id' AND webcal_entry_user.cal_login = accounts."
|
||||
. "loginid");
|
||||
|
||||
$first = 1;
|
||||
while ($phpgw->db->next_record()) {
|
||||
if ($first)
|
||||
$first = 0;
|
||||
else
|
||||
echo "<BR>";
|
||||
if (strlen($phpgw->db->f(1)) > 0)
|
||||
echo $phpgw->db->f(1) . ", " . $phpgw->db->f(2);
|
||||
else
|
||||
echo $phpgw->db->f(0);
|
||||
}
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr>
|
||||
<TD VALIGN="top"><b><?php echo lang_calendar("Repetition"); ?>:</B></TD>
|
||||
<td>
|
||||
<?php
|
||||
$phpgw->db->query("SELECT * from webcal_entry_repeats WHERE cal_id=$id");
|
||||
$phpgw->db->next_record();
|
||||
if (substr($phpgw->db->f(5),0,1) == 'y')
|
||||
$t_repeat_days = lang_common("Sunday ");
|
||||
if (substr($phpgw->db->f(5),1,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Monday ");
|
||||
if (substr($phpgw->db->f(5),2,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Tuesday ");
|
||||
if (substr($phpgw->db->f(5),3,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Wednesday ");
|
||||
if (substr($phpgw->db->f(5),4,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Thursday ");
|
||||
if (substr($phpgw->db->f(5),5,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Friday ");
|
||||
if (substr($phpgw->db->f(5),6,1) == 'y')
|
||||
$t_repeat_days .= lang_common("Saturday ");
|
||||
|
||||
echo $phpgw->db->f(2) . " (";
|
||||
if ($phpgw->db->f(3))
|
||||
echo "ends: " . $phpgw->db->f(3) . ", ";
|
||||
if ($phpgw->db->f(2) == 'weekly')
|
||||
echo lang_calendar("days repeated") . ": " . $t_repeat_days . ", ";
|
||||
|
||||
echo lang_calendar("frequency") . ": " . $phpgw->db->f(4) . ")";
|
||||
|
||||
?>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<?php
|
||||
if ($phpgw->session->loginid == $create_by) {
|
||||
echo "<A HREF=\"edit_entry.php?sessionid=" . $phpgw->session->id . "&id=$id\">"
|
||||
. lang_common("Edit") . "</A><BR>\n<A HREF=\"delete.php?sessionid="
|
||||
. $phpgw->session->id . "&id=$id\" onClick=\"return confirm('"
|
||||
. lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang_common("Delete") . "</A><BR>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
||||
|
173
calendar/week.php
Executable file
173
calendar/week.php
Executable file
@ -0,0 +1,173 @@
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
if (!$friendly){
|
||||
$phpgw_flags["noheader"]="True";
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
|
||||
if (! $friendly) {
|
||||
$phpgw->common->header();
|
||||
} else
|
||||
echo "<body bgcolor=\"".$phpgw_info["theme"][bg_color]."\">";
|
||||
|
||||
$view = "week";
|
||||
?>
|
||||
|
||||
<STYLE TYPE="text/css">
|
||||
.tablecell {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<?php
|
||||
if (strlen($date) > 0) {
|
||||
$thisyear = substr($date, 0, 4);
|
||||
$thismonth = substr($date, 4, 2);
|
||||
$thisday = substr($date, 6, 2);
|
||||
} else {
|
||||
if ($month == 0)
|
||||
$thismonth = date("m");
|
||||
else
|
||||
$thismonth = $month;
|
||||
|
||||
if ($year == 0)
|
||||
$thisyear = date("Y");
|
||||
else
|
||||
$thisyear = $year;
|
||||
|
||||
if ($day == 0)
|
||||
$thisday = date("d");
|
||||
else
|
||||
$thisday = $day;
|
||||
}
|
||||
|
||||
$next = mktime(2, 0, 0, $thismonth, $thisday + 7, $thisyear);
|
||||
$nextyear = date("Y", $next);
|
||||
$nextmonth = date("m", $next);
|
||||
$nextday = date("d", $next);
|
||||
|
||||
$prev = mktime(2, 0, 0, $thismonth, $thisday - 7, $thisyear);
|
||||
$prevyear = date("Y", $prev);
|
||||
$prevmonth = date("m", $prev);
|
||||
$prevday = date("d", $prev);
|
||||
|
||||
// We add 2 hours on to the time so that the switch to DST doesn't
|
||||
// throw us off. So, all our dates are 2AM for that day.
|
||||
$sun = get_sunday_before($thisyear, $thismonth, $thisday) + 7200;
|
||||
$sat = $sun + (3600 * 24 * 7);
|
||||
?>
|
||||
|
||||
<TABLE BORDER=0 WIDTH=100%>
|
||||
<TR>
|
||||
<?php if (! $friendly) { ?>
|
||||
<TD ALIGN="left"><A HREF="week.php?sessionid=<?php echo $phpgw->session->id; ?>&year=<?php echo $prevyear;?>&month=<?php echo $prevmonth;?>&day=<?php echo $prevday;?>"><<</A></TD>
|
||||
<?php } ?>
|
||||
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B>
|
||||
<?php
|
||||
if (date("m", $sun) == date("m", $sat)) {
|
||||
echo strftime("%b %d", $sun) . " - " . strftime("%d, %Y", $sat);
|
||||
} else {
|
||||
if (date("Y", $sun) == date("Y", $sat)) {
|
||||
echo strftime("%b %d", $sun) . " - " .
|
||||
strftime("%b %d, %Y", $sat);
|
||||
} else {
|
||||
echo strftime("%b %d, %Y", $sun) . " - " .
|
||||
strftime("%b %d, %Y", $sat);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</B></FONT>
|
||||
<FONT SIZE="+1" COLOR="<?php echo $H2COLOR;?>">
|
||||
<?php
|
||||
$phpgw->db->query("SELECT lastname, firstname FROM accounts WHERE loginid='"
|
||||
. $phpgw->session->loginid . "'");
|
||||
echo "<BR>\n";
|
||||
if ($phpgw->db->next_record()) {
|
||||
if (strlen($phpgw->db->f(0)) || strlen($phpgw->db->f(1))) {
|
||||
if (strlen($phpgw->db->f(1)))
|
||||
echo $phpgw->db->f(1) . " ";
|
||||
if (strlen($phpgw->db->f(0)))
|
||||
echo $phpgw->db->f(0) . " ";
|
||||
} else
|
||||
echo $user;
|
||||
}
|
||||
?>
|
||||
</FONT>
|
||||
</TD>
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
echo "<TD ALIGN=\"right\"><A HREF=\"week.php?sessionid=" . $phpgw->session->id
|
||||
. "&year=$nextyear&month=$nextmonth&day=$nextday\">>></A></TD>";
|
||||
}
|
||||
?>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE WIDTH=100% BORDER=0 bordercolor=FFFFFF cellspacing=2 cellpadding=2>
|
||||
|
||||
<TR>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Sun"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Mon"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Tue"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Wed"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Thu"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Fri"); ?></FONT></TH>
|
||||
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="#000000"><?php echo lang_calendar("Sat"); ?></FONT></TH>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<?php
|
||||
// Pre-Load the repeated events
|
||||
$repeated_events = read_repeated_events($phpgw->session->loginid);
|
||||
|
||||
$today = mktime(2,0,0,date("m"), date("d"), date("Y"));
|
||||
for ($j = 0; $j < 7; $j++) {
|
||||
$date = $sun + ($j * 24 * 3600);
|
||||
$CELLBG = $phpgw->nextmatchs->alternate_row_color($CELLBG);
|
||||
|
||||
echo "<TD VALIGN=\"top\" WIDTH=75 HEIGHT=75 ID=\"tablecell\"";
|
||||
if (date("Ymd", $date) == date("Ymd", $today))
|
||||
echo "BGCOLOR=\"".$phpgw_info["theme"][cal_today]."\">";
|
||||
else
|
||||
echo "BGCOLOR=\"$CELLBG\">";
|
||||
|
||||
print_date_entries($date,$hide_icons,$phpgw->session->id);
|
||||
|
||||
echo "</TD>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<?php
|
||||
if ($thisyear) {
|
||||
$yeartext = "year=$thisyear&month=$thismonth&day=$thisday";
|
||||
}
|
||||
|
||||
if (! $friendly) {
|
||||
echo "<P> <A HREF=\"" . $phpgw->link("week.php","$yeartext&friendly=1");
|
||||
}
|
||||
?>" TARGET="cal_printer_friendly"
|
||||
onMouseOver="window.status = '<?php echo lang_calendar("Generate printer-friendly version"); ?>'">[<?php echo lang_calendar("Printer Friendly"); ?>]</A>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
75
calendar/year.php
Executable file
75
calendar/year.php
Executable file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if ($friendly) {
|
||||
$phpgw_flags["noheader"] = True;
|
||||
}
|
||||
|
||||
$phpgw_flags["currentapp"] = "calendar";
|
||||
include("../header.inc.php");
|
||||
|
||||
if ($friendly) {
|
||||
echo "<body bgcolor=\"".$phpgw_info["theme"][bg_color]."\">";
|
||||
}
|
||||
?>
|
||||
|
||||
<center>
|
||||
<table border="0" cellspacing="4" cellpadding="4">
|
||||
<tr>
|
||||
<?php
|
||||
if (! $friendly)
|
||||
echo "<td align=\"left\"><A HREF=\"year.php?sessionid=" . $phpgw->session->id
|
||||
. "&year=" . ($year - 1) . "\"><<</A>";
|
||||
?>
|
||||
</td>
|
||||
</td>
|
||||
<td colspan="<?php echo ($friendly?"6":"4"); ?>" align="center">
|
||||
<font face=\"".$phpgw_info["theme"][font]."\" size="+1"><? echo $year; ?></font>
|
||||
</td>
|
||||
<?php
|
||||
if (! $friendly)
|
||||
echo "<td align=\"right\"><A HREF=\"year.php?sessionid=" . $phpgw->session->id
|
||||
. "&year=" . ($year + 1) . "\">>></A>";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><? display_small_month(1,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(2,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(3,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(4,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(5,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(6,$year,False); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><? display_small_month(7,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(8,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(9,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(10,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(11,$year,False); ?></td>
|
||||
<td valign="top"><? display_small_month(12,$year,False); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
echo " <A HREF=\"year.php?sessionid=" . $phpgw->session->id . "&friendly=1&"
|
||||
. "&year=$year\"TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||
. "status = '" . lang_calendar("Generate printer-friendly version") . "'\">["
|
||||
. lang_calendar("Printer Friendly") . "]</A>";
|
||||
}
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
|
187
doc/CHANGELOG
Executable file
187
doc/CHANGELOG
Executable file
@ -0,0 +1,187 @@
|
||||
[08--2000] - removed db_lock() and db_unlock() I changed the phpgw_db_* to use them
|
||||
properly
|
||||
- remove all remaining references to $dbase and $phpgw_db we are now using
|
||||
$phpgw->db for database stuff
|
||||
- Added unlock() in halt() for the database class. This should help prevent
|
||||
database lockups if the program executes some invailed SQL.
|
||||
- Moved around the directory layout. The include files and images are now
|
||||
in the applications directory.
|
||||
|
||||
[08152000] - Fixed a problem with the calendar not showing the months in the users
|
||||
langague preference.
|
||||
- Added the new alpha human resources section
|
||||
- Added the new alpha inventory program
|
||||
- Added new global var $phpgw_flags
|
||||
replaces $currentapp, $noheader, $nonavbar
|
||||
- Small change in the API with the lang files.
|
||||
- Added missing files for french
|
||||
- pop_sort() accelerated by using temp file for storing header
|
||||
information - speed factor > 2 for re-sorts!
|
||||
- Added a temp quick fix for PostgreSQL not working in the calendar
|
||||
I am using the old code, so there might be bugs. This is
|
||||
just until we can find a better solution.
|
||||
- Added a warning message if users are still apart of a group thats
|
||||
about to be deleted.
|
||||
- a bunch of error messages where shown when some header info was
|
||||
split into multiple lines (on pop account), and address info
|
||||
could not be built in this case. Fixed.
|
||||
- Added Dutch and Korean langague support
|
||||
- Added default app and default sorting order preference
|
||||
- Fixed multipart handling on pop3
|
||||
- Added config option for where the "Powered by" can go, top or bottom
|
||||
- add/edit/delete accounts code has been cleaned up greatly.
|
||||
- Better error control in the accounts section
|
||||
- Fixed check_owner() in session class not reporting the owner properly
|
||||
|
||||
[08072000] - Fixed current users next matchs icons not showing up properly
|
||||
- Added support to save sent-messages into Sent folder
|
||||
- Fixed bug where users always see the mail server connection
|
||||
error on a new installation
|
||||
- Added cookie support so you can save your session id as a cookie
|
||||
- Fixed permission bug in preferences with anonymous users
|
||||
- Fixed permission bug in calendar
|
||||
- Greatly improved ftp app
|
||||
- Started adding the new manager permission
|
||||
- Added link in the admin section to find out your phpinfo()
|
||||
- A few bug fixes in the admin section
|
||||
|
||||
[08042000] - Fixed repeating events in calendar day view
|
||||
- Started refering to modules as applications
|
||||
- Fixed todo list not showing list properly
|
||||
- Started adding new application layout
|
||||
- Clean up documentation
|
||||
- Added better german langague file support.
|
||||
- Fixed addressbook not showing the group access properly
|
||||
- Added nextmatchs to email
|
||||
- Deleting a message will now forward you to the next message
|
||||
instead of the inbox.
|
||||
- Added spanish, Itailian and Norwegien lang files.
|
||||
- EMail now supports POP-3
|
||||
- Next matchs icons in email
|
||||
- Many other fixes and features that we can't remeber :)
|
||||
|
||||
[07122000] - Added multi-langague support
|
||||
- Added confirms before records are deleted.
|
||||
- Fixed the footer not being called in the calendar
|
||||
- Fixed the todo list not showing the list properly
|
||||
- Added date format thanks vinz
|
||||
- Renamed session.class to session.inc.php
|
||||
- Added feature to allow stale uploads to be deleted on
|
||||
systems that don't support cron
|
||||
- Fixed calendar searchs
|
||||
- Added preferences to have text under icons on navigation bar
|
||||
|
||||
[07062000] - Fixed javascript pop-up window upadting wrong fields.
|
||||
thanks vinz
|
||||
- Fixed security hole in logout.php
|
||||
- Added support support for todo list showing who created
|
||||
the record.
|
||||
- Added support for date due in todo list.
|
||||
- Fixed bug in killsession.php thanks vinz
|
||||
- Added support for day view in calendar
|
||||
- Added support for hovering descriptions using the alt tag
|
||||
- Added support for newsheadlines program
|
||||
thanks Mark Peters <mpeters@satx.rr.com>
|
||||
- The calendar sports a new layout.
|
||||
- Started converting HTML to be HTML 4.0 complient
|
||||
- Added new filemanager program
|
||||
- New experimental look for the user section.
|
||||
|
||||
[06302000] - Moved around the inc directorys for better security.
|
||||
- Fixed the file attachments and parse errors.
|
||||
- Fixed file uploads for Windows thanks vinz
|
||||
- Added to bring you back to the same folder you are in
|
||||
(email) thanks smoser
|
||||
- Fixed directorys not be deleted properly and should
|
||||
now work under windows.
|
||||
- Updated docs a little
|
||||
- Include pre-alpha release of trouble ticket system
|
||||
- A few other small bug fixes.
|
||||
|
||||
[06272000] - Updated most of the docs for the new name (phpGroupWare)
|
||||
- Resolve a few issues with installing on PHP 4.
|
||||
- editaccounts.php3 now updated the calendar tables properly
|
||||
- Cleaned up groups.inc and removed no longer used and repeated code
|
||||
- Fixed broken link in calendar
|
||||
- Renamed all .php3 so program works in PHP 4.
|
||||
- Added next and previous links in calendar year view
|
||||
- Printer friendly version of the calendar no longer show the
|
||||
navigation bar on top
|
||||
|
||||
[06222000] - Fixed problem with timeformat only showing up if you have calendar
|
||||
access.
|
||||
- Added support to select from a few pre-defined date formats
|
||||
Anyone have suggestions on some more ?
|
||||
- Fixed problem with create_tables.mysql for calendar global events
|
||||
thanks Vincent Larchet <vinz@users.sourceforge.net>
|
||||
- Added support for multiable file uploads.
|
||||
- Fixed table locking issues in editaccount.php3
|
||||
- There is now a config option to point to a differant directory that webdistro is install on.
|
||||
- A couple of other small bug fixes and code cleanup.
|
||||
- Fixed a problem with email signatures not working
|
||||
|
||||
[06172000] - Added db_lock() and db_unlock. That should fix the table locking
|
||||
problems.
|
||||
- Fixed problem with filtering in todo list.
|
||||
- Fixed admin viewaccount.php3 not showing permissions properly.
|
||||
|
||||
[06162000] - included new theme thanks Marl <marl@users.sourceforge.net>
|
||||
- Made sure that the docs where included this time.
|
||||
- Fixed javascript error in edit_entry.php thanks marvinhorst
|
||||
- Fixed problem with edit_entry.php not including current users
|
||||
loginid
|
||||
- Renamed functions.inc to calendar.inc to make things easier to
|
||||
understand.
|
||||
- Renamed all .php file to .php3
|
||||
- Fixed small calendar days, Sa and Su where backwords.
|
||||
- Removed cal_eventid from webcal_entry_repeats, wasn't needed and was causing problems.
|
||||
- Fixed a few problems with create_tables.*
|
||||
- Global public items should now work in the calendar
|
||||
- Added feature to change users passwords (admin)
|
||||
- Update some of the docs.
|
||||
- Renamed and merged some files in the calendar.
|
||||
- Added percent of users that logged out to accesslog
|
||||
|
||||
[06092000] - Fixed lastlogin information that wasn't updating.
|
||||
- Added table locks in edit_entry_handler.php (calendar)
|
||||
- Added feature to annoy users that haven't changed there
|
||||
password for more then 30 days.
|
||||
- Added javascript popup window for addressbook in email
|
||||
Thanks Brian King <bking@affcu.com>
|
||||
|
||||
[06082000] - Added new groups class
|
||||
- Combined permissions and preferences into session.inc
|
||||
- Renamed session.inc to webdistro_common.inc
|
||||
- Fixed blank items showing up in the todo list.
|
||||
- Cleaned up create_tables.* Took out all of the uneeded things.
|
||||
- Included a new theme, it looks pretty bad on some computers.
|
||||
But, we need to test things out a little with it.
|
||||
|
||||
[06052000] - Fixed a few permission bugs in the addressbook
|
||||
- Started converting all programs to use the new session class
|
||||
- Light code cleanup
|
||||
- Fixed parse errors in a few places
|
||||
- Added timezone support
|
||||
- Updated stalesessions.pl
|
||||
- Fixed a few possiable security problems with addressbook
|
||||
|
||||
[06032000] - Fixed problems editing accounts using postgresql
|
||||
- Fixed problems creating account in create_tables.*
|
||||
- Admin section updated. Sorting features. New layout for current
|
||||
sessions.
|
||||
- login.php3 Fixed problem with it not updating users lastlogin
|
||||
- Fixed problems with adding events to the calendar.
|
||||
- Fixed problems with repeating events with a frequency of more
|
||||
then 1. I think I have finally narrowed most of the problems
|
||||
down.
|
||||
- Addressbook had the city and street mixed. Thanks Eric Degner
|
||||
- Added feature to show who created the addressbook entry.
|
||||
I will add support for this in the todolist later.
|
||||
- Cleaned up some unneeded files in some of the directorys.
|
||||
- Added next and previous link in message.php3 for email.
|
||||
- Converted program to start using the new permissions and
|
||||
preferences class.
|
||||
- Fixed session table for mysql
|
||||
|
||||
[06022000] - Calendar bug fixes and code cleanup.
|
||||
- Security fix for login.php3
|
75
doc/CREDITS
Executable file
75
doc/CREDITS
Executable file
@ -0,0 +1,75 @@
|
||||
### Core Developers ###
|
||||
|
||||
* Joseph Engo (aka Jengo) |jengo@phpgroupware.org|
|
||||
- Man who started it all.
|
||||
- Provides project direction, documentation.
|
||||
- Works on core services session management, permissions, groups class, etc...
|
||||
- Wrote the following applications
|
||||
--- Addressbook (orignal work)
|
||||
--- ToDolist (orignal work)
|
||||
--- Bookmarks (orignal work)
|
||||
--- Email (Adapted from Aeromail, which was written by Mark Cushman <mark@cushman.net> http://the.cushman.net/)
|
||||
--- Calendar (Adapted from WebCalendar, which was written by Craig Knudsen <cknudsen@radix.net> http://www.radix.net/~cknudsen)
|
||||
- Continues development and project direction.
|
||||
|
||||
* Dan Kuykendall (aka Seek3r) |dan@kuykendall.org|
|
||||
- Project Administrator/Supervisor.
|
||||
- Provides project direction, documentation.
|
||||
- Works on core services such as the $phpgw[] array for application developers.
|
||||
- Hosts website, and offers commercial support thru Clear River Technologies (http://www.clearrivertech.com)
|
||||
- Wrote the following applications
|
||||
--- File Manager (Based on filemanager, which was written by Lacey Pevey <lpevey@mailhost.tcs.tulane.edu> http://px.sklar.com/code.html?code_id=258)
|
||||
--- Chat (orignal work)
|
||||
- Continues development and project direction.
|
||||
|
||||
### Application Developers ###
|
||||
* Michael Weber |weber@rising-systems.de|
|
||||
- Develops/Maintains Trouble Ticket System
|
||||
|
||||
* Vincent Larchet (aka vinz) |vinz@users.sourceforge.net|
|
||||
- He hops from application to application helping out everywhere
|
||||
- Keeps phpGW working on NT servers
|
||||
|
||||
* Mark A Peters (aka Skeeter) |mpeters@satx.rr.com|
|
||||
- Developed/Maintains Headlines application
|
||||
- Helps with almost all other applications as well
|
||||
|
||||
*Scott Moser (aka smoser) |smoser@brickies.net|
|
||||
-Developed/Maintains the FTP application
|
||||
|
||||
* Itzchak Rehberg (aka izzy)|izzysoft@qumran.org|
|
||||
- has been working on replacement for mail() function
|
||||
- Developed/Maintains POP-3 class
|
||||
- Built/Maintains the german language files
|
||||
- He hops from application to application helping out everywhere
|
||||
|
||||
* Stephan Beal (aka wander)|stephan@wanderinghorse.net|
|
||||
- Initial quick-n-dirty rbs port from the MRBS system
|
||||
- Minor bug fixes.
|
||||
- Conned Hakon into doing the Norwegian translations ;)
|
||||
|
||||
### Patch Contributors ### (in alphabetical order)
|
||||
* Wolfgang Lunz |wlunz@infomatec.de|
|
||||
* bachroxx |bachroxx@users.sourceforge.net|
|
||||
* brandonne |brandonne@users.sourceforge.net|
|
||||
* flimm |flimm@users.sourceforge.net|
|
||||
* gmartine |gmartine@users.sourceforge.net|
|
||||
* Omer Uner Guclu |oquclu@superonline.com|
|
||||
* Marvin Horst |marvinhorst@hotmail.com|
|
||||
* Brian King |bking@affcu.com|
|
||||
* Marl |marl@users.sourceforge.net|
|
||||
* Mike Preishuber |martin.preishuber@eclipt.uni-klu.ac.at|
|
||||
* Roy Svendsen |roysv@users.sourceforge.net|
|
||||
* smoser |smoser@users.sourceforge.net|
|
||||
* preisel |preisl@users.aourceforge.net|
|
||||
* Raúl Alexis Betancort Santana |rabs@dimension-virtual.com|
|
||||
- Great working on our first template set.
|
||||
|
||||
### Other Contributors ###
|
||||
* Hakon Tjaum
|
||||
- Norwegian translations.
|
||||
|
||||
|
||||
Thanks to Crista Schofield and Eric Degner for *TONS* of Beta testing.
|
||||
All others on the phpgroupware-developers@lists.sourceforge.net mailing list
|
||||
And finally every one of our users for the encouragement that keeps us happy, which means more development.
|
55
doc/FAQ.html
Normal file
55
doc/FAQ.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare FAQ</TITLE>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1> phpGroupWare FAQ</H1>
|
||||
|
||||
<H2>Dan Kuykendall <dan@kuykendall.org></H2> v1.0, 15 July 2000
|
||||
<P><HR>
|
||||
<EM> phpGroupWare Frequently Asked Questions.</EM>
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Building and Installing</A></H2>
|
||||
|
||||
<H2>1.1 Questions and Answers</H2>
|
||||
|
||||
<P>Q: When I try to send file attachments, I get errors about safe mode being
|
||||
effect.<BR>
|
||||
A: I ran into this problem after I installed Aeromail for the first time.<BR>
|
||||
Try chown root.root for all files in your /phpGroupWare directory. I don't know
|
||||
why this is needed. Any ideas ?
|
||||
<P>Q: Why don't you just use the session class from phplib? Why not use cookies
|
||||
to hold the sessionid?<BR>
|
||||
A: I personally don't like using cookies for something like this.<BR>
|
||||
However, the session management is currently being abstracted for the applications.
|
||||
This means that switching to cookies will be possible for those that are interested.
|
||||
<P>Q: When I do a search, it returns the results but they have the wrong date.<BR>
|
||||
A: Becuase of the way the tables are set up to handle repeating events,
|
||||
I need to rewrite the query. I have not had a chance to play around with it
|
||||
<P>Q: When I view the calendar, I get tons of SQL errors.<BR>
|
||||
A: Make sure all users on the system belong to a group. That should clear up
|
||||
any problems. This is something that needs to be fixed.
|
||||
<P>Q: Will phpGroupWare run on PHP4 ?<BR>
|
||||
A: Yes. It runs on both PHP3 and PHP4.
|
||||
<P>Q: Will phpGroupWare work with SSL ?<BR>
|
||||
A: Sure, why not ? I am running it with mod_ssl and have had no problems.
|
||||
Since there are no references to http:// or https:// there should not be
|
||||
any problems with it.
|
||||
<P>Q: Does phpGroupWare work on any other databases ?<BR>
|
||||
A: Right now, no. I have been playing around with support for mSQL, but, that
|
||||
will take some time. Other databases are completly unknown at this point,
|
||||
support for Oracle, MS-SQL, and others are planned for the future.
|
||||
<P>Q: I am having problems installing on PostgreSQL 6.x.<BR>
|
||||
A: phpGroupWare is being developed with version 7.x. I tried installing it on
|
||||
6.x and ran into a bunch of probelms. Unless you plan on toying around
|
||||
with it, your better off with 7.x.
|
||||
<P>Q: Will phpGroupWare work with Windows?<BR>
|
||||
A: Yes, there several people who are using it.<BR>
|
||||
Thanks Vincent Larchet <<vinz@users.sourceforge.net>> for patching anything
|
||||
we do that breaks phpGroupWare on NT.
|
||||
</BODY>
|
||||
</HTML>
|
65
doc/FAQ.sgml
Normal file
65
doc/FAQ.sgml
Normal file
@ -0,0 +1,65 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<!-- LinuxDoc file was created by hand by <Dan Kuykendall> Sat July 15 -->
|
||||
<article>
|
||||
<title>
|
||||
phpGroupWare FAQ
|
||||
</title>
|
||||
<author>
|
||||
Dan Kuykendall <dan@kuykendall.org>
|
||||
</author>
|
||||
<date>
|
||||
v1.0, 15 July 2000
|
||||
</date>
|
||||
<abstract>
|
||||
phpGroupWare Frequently Asked Questions.
|
||||
</abstract>
|
||||
|
||||
<toc>
|
||||
<sect>Building and Installing
|
||||
<sect1>Questions and Answers
|
||||
<p>
|
||||
Q: When I try to send file attachments, I get errors about safe mode being
|
||||
effect.<newline>
|
||||
A: I ran into this problem after I installed Aeromail for the first time.<newline>
|
||||
Try chown root.root for all files in your /phpGroupWare directory. I don't know
|
||||
why this is needed. Any ideas ?
|
||||
<p>
|
||||
Q: Why don't you just use the session class from phplib? Why not use cookies
|
||||
to hold the sessionid?<newline>
|
||||
A: I personally don't like using cookies for something like this.<newline>
|
||||
However, the session management is currently being abstracted for the applications.
|
||||
This means that switching to cookies will be possible for those that are interested.
|
||||
<p>
|
||||
Q: When I do a search, it returns the results but they have the wrong date.<newline>
|
||||
A: Becuase of the way the tables are set up to handle repeating events,
|
||||
I need to rewrite the query. I have not had a chance to play around with it
|
||||
<p>
|
||||
Q: When I view the calendar, I get tons of SQL errors.<newline>
|
||||
A: Make sure all users on the system belong to a group. That should clear up
|
||||
any problems. This is something that needs to be fixed.
|
||||
<p>
|
||||
Q: Will phpGroupWare run on PHP4 ?<newline>
|
||||
A: Yes. It runs on both PHP3 and PHP4.
|
||||
<p>
|
||||
Q: Will phpGroupWare work with SSL ?<newline>
|
||||
A: Sure, why not ? I am running it with mod_ssl and have had no problems.
|
||||
Since there are no references to http:// or https:// there should not be
|
||||
any problems with it.
|
||||
<p>
|
||||
Q: Does phpGroupWare work on any other databases ?<newline>
|
||||
A: Right now, no. I have been playing around with support for mSQL, but, that
|
||||
will take some time. Other databases are completly unknown at this point,
|
||||
support for Oracle, MS-SQL, and others are planned for the future.
|
||||
<p>
|
||||
Q: I am having problems installing on PostgreSQL 6.x.<newline>
|
||||
A: phpGroupWare is being developed with version 7.x. I tried installing it on
|
||||
6.x and ran into a bunch of probelms. Unless you plan on toying around
|
||||
with it, your better off with 7.x.
|
||||
<p>
|
||||
Q: Will phpGroupWare work with Windows?<newline>
|
||||
A: Yes, there several people who are using it.<newline>
|
||||
Thanks Vincent Larchet <<vinz@users.sourceforge.net>> for patching anything
|
||||
we do that breaks phpGroupWare on NT.
|
||||
</p>
|
||||
</article>
|
132
doc/FAQ.txt
Normal file
132
doc/FAQ.txt
Normal file
@ -0,0 +1,132 @@
|
||||
phpGroupWare FAQ
|
||||
Dan Kuykendall <dan@kuykendall.org>
|
||||
v1.0, 15 July 2000
|
||||
|
||||
phpGroupWare Frequently Asked Questions.
|
||||
______________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
|
||||
|
||||
1. Building and Installing
|
||||
|
||||
1.1 Questions and Answers
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
11.. BBuuiillddiinngg aanndd IInnssttaalllliinngg
|
||||
|
||||
11..11.. QQuueessttiioonnss aanndd AAnnsswweerrss
|
||||
|
||||
Q: When I try to send file attachments, I get errors about safe mode
|
||||
being effect.
|
||||
A: I ran into this problem after I installed Aeromail for the first
|
||||
time.
|
||||
Try chown root.root for all files in your /phpGroupWare directory. I
|
||||
don't know why this is needed. Any ideas ?
|
||||
|
||||
Q: Why don't you just use the session class from phplib? Why not use
|
||||
cookies to hold the sessionid?
|
||||
A: I personally don't like using cookies for something like this.
|
||||
However, the session management is currently being abstracted for the
|
||||
applications. This means that switching to cookies will be possible
|
||||
for those that are interested.
|
||||
|
||||
Q: When I do a search, it returns the results but they have the wrong
|
||||
date.
|
||||
A: Becuase of the way the tables are set up to handle repeating
|
||||
events, I need to rewrite the query. I have not had a chance to play
|
||||
around with it
|
||||
|
||||
Q: When I view the calendar, I get tons of SQL errors.
|
||||
A: Make sure all users on the system belong to a group. That should
|
||||
clear up any problems. This is something that needs to be fixed.
|
||||
|
||||
Q: Will phpGroupWare run on PHP4 ?
|
||||
A: Yes. It runs on both PHP3 and PHP4.
|
||||
|
||||
Q: Will phpGroupWare work with SSL ?
|
||||
A: Sure, why not ? I am running it with mod_ssl and have had no
|
||||
problems. Since there are no references to http:// or https:// there
|
||||
should not be any problems with it.
|
||||
|
||||
Q: Does phpGroupWare work on any other databases ?
|
||||
A: Right now, no. I have been playing around with support for mSQL,
|
||||
but, that will take some time. Other databases are completly unknown
|
||||
at this point, support for Oracle, MS-SQL, and others are planned for
|
||||
the future.
|
||||
|
||||
Q: I am having problems installing on PostgreSQL 6.x.
|
||||
A: phpGroupWare is being developed with version 7.x. I tried
|
||||
installing it on 6.x and ran into a bunch of probelms. Unless you
|
||||
plan on toying around with it, your better off with 7.x.
|
||||
|
||||
Q: Will phpGroupWare work with Windows?
|
||||
A: Yes, there several people who are using it.
|
||||
Thanks Vincent Larchet <<vinz@users.sourceforge.net>> for patching
|
||||
anything we do that breaks phpGroupWare on NT.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
159
doc/HOWTO.html
Normal file
159
doc/HOWTO.html
Normal file
@ -0,0 +1,159 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare HOWTO</TITLE>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1> phpGroupWare HOWTO</H1>
|
||||
|
||||
<H2>Joseph Engo <jengo@phpgroupware.org>,
|
||||
Dan Kuykendall <dan@kuykendall.org></H2> v1.0, 7 July 2000
|
||||
<P><HR>
|
||||
<EM> This document explains how to install and configure phpGroupWare.</EM>
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>phpGroupWare is a web based groupware application that includes integrated features such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system.
|
||||
<P>It should run on all systems where PHP is avalible and currently supports MySQL and PostgreSQL.
|
||||
<H2>1.1 What is phpGroupWare and why should I use it?</H2>
|
||||
|
||||
<P>phpGroupWare is:
|
||||
<P>phpGroupWare is a web based groupware application that includes integrated features such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system.
|
||||
<P>
|
||||
<P>You should use it if:
|
||||
<P>You would like a powerful groupware system that can be access from anywhere on the Internet.
|
||||
For companies with a distributed user base, it's an ideal solution. Oh, and did I mention that its FREE?
|
||||
<H2><A NAME="s2">2. Installation</A></H2>
|
||||
|
||||
<H2>2.1 Requirements</H2>
|
||||
|
||||
<P>You will need PHP compiled and installed on your system. You will also need MySQL or PostgreSQL setup.
|
||||
If you are planning on using the email system, you will need to have an IMAP server installed and IMAP support compiled into PHP.
|
||||
You can have it installed as an Apache module or command line version, the Apache module is prefered.
|
||||
We will assume that you are running on a Linux or other Unix system for these steps.
|
||||
Windows is supported, but there is no documentation for it currently.
|
||||
<H2>2.2 Tested Systems</H2>
|
||||
|
||||
<P>On Linux 2.2.x
|
||||
<UL>
|
||||
<LI>PHP 3.0.15+ / PHP 4.0.x</LI>
|
||||
<LI>Apache 1.3.x</LI>
|
||||
<LI>MySQL 3.22.25 or PostgreSQL 7.0.x</LI>
|
||||
<LI>Courier-IMAP 0.33+</LI>
|
||||
</UL>
|
||||
<P>We have reports of it working on Windows NT, but no details at this time.
|
||||
<H2>2.3 Tested Systems</H2>
|
||||
|
||||
<P>After you have met the system requirements, unpack the tarball in the html
|
||||
directory of your webserver. (eg, /home/httpd/html)
|
||||
<P>The first step is to setup the database and create the tables needed. In the
|
||||
doc directory there is a file called create_tables.(name of your database)
|
||||
<H3>Installation with MySQL</H3>
|
||||
|
||||
<P>We will assume that you are using the database named phpgroupware.
|
||||
<P><CODE>$ mysql phpgroupware -u username -p < create_tables.mysql</CODE>
|
||||
<H3>Installation with PostgreSQL</H3>
|
||||
|
||||
<P>We will assume that you are using the database named phpgroupware.
|
||||
<P><CODE>$ psql -d phpgroupware -U username < create_tables.pgsql</CODE>
|
||||
<H2>2.4 Configure phpGroupWare</H2>
|
||||
|
||||
<P>Change to the inc directory. <BR>
|
||||
Edit the file called config.inc.php to point to the location of your include files.
|
||||
<BLOCKQUOTE><CODE>
|
||||
Some people might prefer to install their include files in a directory which is not world viewable.
|
||||
For this, you will need to move everything except config.inc.php into another directory
|
||||
and point config.inc.php to that directory. For most installations, the current location
|
||||
of these file should be fine.
|
||||
</CODE></BLOCKQUOTE>
|
||||
|
||||
Edit globalconfig.inc.php to reflect your system settings. You can choose which programs
|
||||
you would like to have available to your system.<BR>
|
||||
For example, if you do not have access to a IMAP server, you can change
|
||||
<CODE>$installed["email"] = "Y"; </CODE> to <CODE>$installed["email"] = "N";</CODE><BR>
|
||||
This would make this program unavaiable to all users regardless of their permissions.
|
||||
<P>If you are using the email system you will need to create a temporary directory
|
||||
where file uploads will be stored. For security reasons, you should <CODE>chown
|
||||
nobody.nobody</CODE> and <CODE>chmod 700</CODE> to that directory. Depending on your system configuration.
|
||||
Default installs of Apache normally run as the user nobody. You may need your system
|
||||
administrator to do this for you if you do not have root access.
|
||||
<P>If you do not have access to root, create this file and run it.
|
||||
<PRE>
|
||||
<?php
|
||||
if (mkdir("/path/to/temp/directory",0700)) {
|
||||
echo "Directory created successfully";
|
||||
} else {
|
||||
echo "Error creating directory";
|
||||
}
|
||||
</PRE>
|
||||
|
||||
If you have access to cron, you may want to setup the files in the cron
|
||||
directory.
|
||||
<P>stalesessions.pl - There are 2 reasons for this file.
|
||||
<UL>
|
||||
<LI>Users always forget to logout. This way the session doesn't sit around forever, creating a possible security risk. </LI>
|
||||
<LI>The email system requires plain text passwords which are stored in the sessions table.</LI>
|
||||
</UL>
|
||||
<P>This file is not required, you can simply uncomment the lines indicated in session.class in update_dla().
|
||||
This will require an extra query during every transaction which could cause performance
|
||||
problems. Also, if there are no logins in a few days, they will sit around and
|
||||
wait for someone to login before they are deleted. If you go this route, you
|
||||
will need to edit the number of seconds until they are deleted. It defaults to 2 hours
|
||||
(7200 secs). If you choose to use the cron program, simply edit the settings
|
||||
for your database and uncomment the line for your database type.
|
||||
<P>stale_uploads.pl - This will delete file attachments for messages that where not
|
||||
completed. If a users browser crashes, internet connection dies, etc, their
|
||||
files will sit there forever unless deleted. You could add a few lines to
|
||||
logout.php that will look in the temp directory for any stale uploads and delete
|
||||
them. But, once again, it becomes a performance issue.
|
||||
<P>If your config is setup properly you can now login. Point your browser to the
|
||||
installed location and login with the username <CODE>demo</CODE> and the password is <CODE>1234</CODE><BR>
|
||||
At this point it would be a good idea to create a new user and delete the old
|
||||
one.
|
||||
<H2><A NAME="s3">3. About this document</A></H2>
|
||||
|
||||
<H2>3.1 New versions </H2>
|
||||
|
||||
<P>The newest version of this document can be found on our website
|
||||
<A HREF="http://www.phpgroupware.org">http://www.phpgroupware.org</A> as SGML source, HTML, or TEXT.
|
||||
<H2>3.2 Comments </H2>
|
||||
|
||||
<P>Comments on this HOWTO should be directed to the phpGroupWare developers mailing list
|
||||
<A HREF="mailto:phpgroupware-developers@lists.sourceforge.net">phpgroupware-developers@lists.sourceforge.net</A>.
|
||||
<P>To subscribe, go to
|
||||
<A HREF="http://sourceforge.net/mail/?group_id=7305">http://sourceforge.net/mail/?group_id=7305</A><H2>3.3 History </H2>
|
||||
|
||||
<P>This document was started by Joseph Engo and reworked by Dan Kuykendall.
|
||||
<H2>3.4 Version History </H2>
|
||||
|
||||
<P>Old Version
|
||||
<P>
|
||||
<UL>
|
||||
<LI>Created by Jengo, wasn't in SGML HOWTO format.</LI>
|
||||
</UL>
|
||||
<P>v1.0 (July 6, 2000)
|
||||
<P>
|
||||
<UL>
|
||||
<LI>Built proper SGML version.</LI>
|
||||
<LI>Included the FAQ.</LI>
|
||||
<LI>Other minor additions.</LI>
|
||||
</UL>
|
||||
<H2>3.5 Copyrights and Trademarks </H2>
|
||||
|
||||
<P>Copyright (c) Dan Kuykendall.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation
|
||||
<P>A copy of the license is available at
|
||||
<A HREF="http://www.gnu.org/copyleft/fdl.txt">GNU Free Documentation License</A>.
|
||||
<H2>3.6 Acknowledgements and Thanks </H2>
|
||||
|
||||
<P>Thanks to Joesph Engo for starting phpGroupWare (at the time called webdistro) and the core of this HOWTO.
|
||||
Thanks to all the developers and users who contribute to making phpGroupWare such a success.
|
||||
</BODY>
|
||||
</HTML>
|
184
doc/HOWTO.sgml
Normal file
184
doc/HOWTO.sgml
Normal file
@ -0,0 +1,184 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<!-- LinuxDoc file was created by hand by <Dan Kuykendall> 7 July 2000 -->
|
||||
<article>
|
||||
<title>
|
||||
phpGroupWare HOWTO
|
||||
</title>
|
||||
<author>
|
||||
Joseph Engo <jengo@phpgroupware.org>,
|
||||
Dan Kuykendall <dan@kuykendall.org>
|
||||
</author>
|
||||
<date>
|
||||
v1.0, 7 July 2000
|
||||
</date>
|
||||
<abstract>
|
||||
This document explains how to install and configure phpGroupWare.
|
||||
</abstract>
|
||||
|
||||
<toc>
|
||||
<sect>Introduction
|
||||
<p>
|
||||
phpGroupWare is a web based groupware application that includes integrated features such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system.
|
||||
<p>It should run on all systems where PHP is avalible and currently supports MySQL and PostgreSQL.
|
||||
</p>
|
||||
<sect1>What is phpGroupWare and why should I use it?
|
||||
<p>
|
||||
phpGroupWare is:<p>
|
||||
phpGroupWare is a web based groupware application that includes integrated features such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system.<P>
|
||||
|
||||
You should use it if:<p>
|
||||
You would like a powerful groupware system that can be access from anywhere on the Internet.
|
||||
For companies with a distributed user base, it's an ideal solution. Oh, and did I mention that its FREE?
|
||||
</p>
|
||||
<sect>Installation
|
||||
<sect1>Requirements
|
||||
<p>
|
||||
You will need PHP compiled and installed on your system. You will also need MySQL or PostgreSQL setup.
|
||||
If you are planning on using the email system, you will need to have an IMAP server installed and IMAP support compiled into PHP.
|
||||
You can have it installed as an Apache module or command line version, the Apache module is prefered.
|
||||
We will assume that you are running on a Linux or other Unix system for these steps.
|
||||
Windows is supported, but there is no documentation for it currently.
|
||||
</p>
|
||||
<sect1>Tested Systems
|
||||
<p>
|
||||
On Linux 2.2.x
|
||||
<itemize>
|
||||
<item>PHP 3.0.15+ / PHP 4.0.x
|
||||
<item>Apache 1.3.x
|
||||
<item>MySQL 3.22.25 or PostgreSQL 7.0.x
|
||||
<item>Courier-IMAP 0.33+
|
||||
</itemize>
|
||||
|
||||
We have reports of it working on Windows NT, but no details at this time.
|
||||
</p>
|
||||
<sect1>Tested Systems
|
||||
<p>
|
||||
After you have met the system requirements, unpack the tarball in the html
|
||||
directory of your webserver. (eg, /home/httpd/html)
|
||||
<p>
|
||||
The first step is to setup the database and create the tables needed. In the
|
||||
doc directory there is a file called create_tables.(name of your database)
|
||||
</p>
|
||||
<sect2>Installation with MySQL
|
||||
<p>
|
||||
We will assume that you are using the database named phpgroupware.<p>
|
||||
<tt>$ mysql phpgroupware -u username -p < create_tables.mysql</tt>
|
||||
</p>
|
||||
<sect2>Installation with PostgreSQL
|
||||
<p>
|
||||
We will assume that you are using the database named phpgroupware.<p>
|
||||
<tt>$ psql -d phpgroupware -U username < create_tables.pgsql</tt>
|
||||
</p>
|
||||
<sect1>Configure phpGroupWare
|
||||
<p>
|
||||
Change to the inc directory. <newline>
|
||||
Edit the file called config.inc.php to point to the location of your include files.
|
||||
<tscreen>
|
||||
Some people might prefer to install their include files in a directory which is not world viewable.
|
||||
For this, you will need to move everything except config.inc.php into another directory
|
||||
and point config.inc.php to that directory. For most installations, the current location
|
||||
of these file should be fine.
|
||||
</tscreen>
|
||||
Edit globalconfig.inc.php to reflect your system settings. You can choose which programs
|
||||
you would like to have available to your system.<newline>
|
||||
For example, if you do not have access to a IMAP server, you can change
|
||||
<tt>$installed["email"] = "Y"; </tt> to <tt>$installed["email"] = "N";</tt><newline>
|
||||
This would make this program unavaiable to all users regardless of their permissions.
|
||||
<p>
|
||||
If you are using the email system you will need to create a temporary directory
|
||||
where file uploads will be stored. For security reasons, you should <tt>chown
|
||||
nobody.nobody</tt> and <tt>chmod 700</tt> to that directory. Depending on your system configuration.
|
||||
Default installs of Apache normally run as the user nobody. You may need your system
|
||||
administrator to do this for you if you do not have root access.
|
||||
<p>
|
||||
If you do not have access to root, create this file and run it.
|
||||
<verb>
|
||||
<?php
|
||||
if (mkdir("/path/to/temp/directory",0700)) {
|
||||
echo "Directory created successfully";
|
||||
} else {
|
||||
echo "Error creating directory";
|
||||
}
|
||||
</verb>
|
||||
If you have access to cron, you may want to setup the files in the cron
|
||||
directory.
|
||||
<p>
|
||||
stalesessions.pl - There are 2 reasons for this file.
|
||||
<itemize>
|
||||
<item>Users always forget to logout. This way the session doesn't sit around forever, creating a possible security risk.
|
||||
<item>The email system requires plain text passwords which are stored in the sessions table.
|
||||
</itemize>
|
||||
|
||||
This file is not required, you can simply uncomment the lines indicated in session.class in update_dla().
|
||||
This will require an extra query during every transaction which could cause performance
|
||||
problems. Also, if there are no logins in a few days, they will sit around and
|
||||
wait for someone to login before they are deleted. If you go this route, you
|
||||
will need to edit the number of seconds until they are deleted. It defaults to 2 hours
|
||||
(7200 secs). If you choose to use the cron program, simply edit the settings
|
||||
for your database and uncomment the line for your database type.
|
||||
<p>
|
||||
stale_uploads.pl - This will delete file attachments for messages that where not
|
||||
completed. If a users browser crashes, internet connection dies, etc, their
|
||||
files will sit there forever unless deleted. You could add a few lines to
|
||||
logout.php that will look in the temp directory for any stale uploads and delete
|
||||
them. But, once again, it becomes a performance issue.
|
||||
<p>
|
||||
If your config is setup properly you can now login. Point your browser to the
|
||||
installed location and login with the username <tt>demo</tt> and the password is <tt>1234</tt><newline>
|
||||
At this point it would be a good idea to create a new user and delete the old
|
||||
one.
|
||||
</p>
|
||||
<sect>About this document
|
||||
<sect1>New versions
|
||||
<p>
|
||||
The newest version of this document can be found on our website <url url="http://www.phpgroupware.org"> as SGML source, HTML, or TEXT.
|
||||
</p>
|
||||
<sect1>Comments
|
||||
<p>
|
||||
Comments on this HOWTO should be directed to the phpGroupWare developers mailing list
|
||||
<url url="mailto:phpgroupware-developers@lists.sourceforge.net" name="phpgroupware-developers@lists.sourceforge.net">.<P>
|
||||
To subscribe, go to <url url="http://sourceforge.net/mail/?group_id=7305"
|
||||
name="http://sourceforge.net/mail/?group_id=7305">
|
||||
</p>
|
||||
<sect1>History
|
||||
<p>
|
||||
This document was started by Joseph Engo and reworked by Dan Kuykendall.
|
||||
</p>
|
||||
<sect1>Version History
|
||||
<p>
|
||||
Old Version
|
||||
</p>
|
||||
<p>
|
||||
<itemize>
|
||||
<item>Created by Jengo, wasn't in SGML HOWTO format.
|
||||
</itemize>
|
||||
<p>
|
||||
v1.0 (July 6, 2000)
|
||||
</p>
|
||||
<p>
|
||||
<itemize>
|
||||
<item>Built proper SGML version.
|
||||
<item>Included the FAQ.
|
||||
<item>Other minor additions.
|
||||
</itemize>
|
||||
</p>
|
||||
<sect1>Copyrights and Trademarks
|
||||
<p>
|
||||
Copyright (c) Dan Kuykendall.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation
|
||||
</p>
|
||||
<p>
|
||||
A copy of the license is available at
|
||||
<url url="http://www.gnu.org/copyleft/fdl.txt" name="GNU Free Documentation License">.
|
||||
</p>
|
||||
<sect1>Acknowledgements and Thanks
|
||||
<p>
|
||||
Thanks to Joesph Engo for starting phpGroupWare (at the time called webdistro) and the core of this HOWTO.
|
||||
Thanks to all the developers and users who contribute to making phpGroupWare such a success.
|
||||
</p>
|
||||
</article>
|
264
doc/HOWTO.txt
Normal file
264
doc/HOWTO.txt
Normal file
@ -0,0 +1,264 @@
|
||||
phpGroupWare HOWTO
|
||||
Joseph Engo <jengo@phpgroupware.org>, Dan Kuykendall
|
||||
<dan@kuykendall.org>
|
||||
v1.0, 7 July 2000
|
||||
|
||||
This document explains how to install and configure phpGroupWare.
|
||||
______________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
1.1 What is phpGroupWare and why should I use it?
|
||||
|
||||
2. Installation
|
||||
|
||||
2.1 Requirements
|
||||
2.2 Tested Systems
|
||||
2.3 Tested Systems
|
||||
2.3.1 Installation with MySQL
|
||||
2.3.2 Installation with PostgreSQL
|
||||
2.4 Configure phpGroupWare
|
||||
|
||||
3. About this document
|
||||
|
||||
3.1 New versions
|
||||
3.2 Comments
|
||||
3.3 History
|
||||
3.4 Version History
|
||||
3.5 Copyrights and Trademarks
|
||||
3.6 Acknowledgements and Thanks
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
11.. IInnttrroodduuccttiioonn
|
||||
|
||||
phpGroupWare is a web based groupware application that includes
|
||||
integrated features such as email, calendar, todo list, address book,
|
||||
file manager, headline news, and a trouble ticket system.
|
||||
|
||||
It should run on all systems where PHP is avalible and currently
|
||||
supports MySQL and PostgreSQL.
|
||||
|
||||
11..11.. WWhhaatt iiss pphhppGGrroouuppWWaarree aanndd wwhhyy sshhoouulldd II uussee iitt??
|
||||
|
||||
phpGroupWare is:
|
||||
|
||||
phpGroupWare is a web based groupware application that includes
|
||||
integrated features such as email, calendar, todo list, address book,
|
||||
file manager, headline news, and a trouble ticket system.
|
||||
|
||||
|
||||
You should use it if:
|
||||
|
||||
You would like a powerful groupware system that can be access from
|
||||
anywhere on the Internet. For companies with a distributed user base,
|
||||
it's an ideal solution. Oh, and did I mention that its FREE?
|
||||
|
||||
22.. IInnssttaallllaattiioonn
|
||||
|
||||
22..11.. RReeqquuiirreemmeennttss
|
||||
|
||||
You will need PHP compiled and installed on your system. You will
|
||||
also need MySQL or PostgreSQL setup. If you are planning on using the
|
||||
email system, you will need to have an IMAP server installed and IMAP
|
||||
support compiled into PHP. You can have it installed as an Apache
|
||||
module or command line version, the Apache module is prefered. We
|
||||
will assume that you are running on a Linux or other Unix system for
|
||||
these steps. Windows is supported, but there is no documentation for
|
||||
it currently.
|
||||
|
||||
22..22.. TTeesstteedd SSyysstteemmss
|
||||
|
||||
On Linux 2.2.x
|
||||
|
||||
+o PHP 3.0.15+ / PHP 4.0.x
|
||||
|
||||
+o Apache 1.3.x
|
||||
|
||||
+o MySQL 3.22.25 or PostgreSQL 7.0.x
|
||||
|
||||
+o Courier-IMAP 0.33+
|
||||
|
||||
We have reports of it working on Windows NT, but no details at this
|
||||
time.
|
||||
|
||||
22..33.. TTeesstteedd SSyysstteemmss
|
||||
|
||||
After you have met the system requirements, unpack the tarball in the
|
||||
html directory of your webserver. (eg, /home/httpd/html)
|
||||
|
||||
The first step is to setup the database and create the tables needed.
|
||||
In the doc directory there is a file called create_tables.(name of
|
||||
your database)
|
||||
|
||||
22..33..11.. IInnssttaallllaattiioonn wwiitthh MMyySSQQLL
|
||||
|
||||
We will assume that you are using the database named phpgroupware.
|
||||
|
||||
$ mysql phpgroupware -u username -p < create_tables.mysql
|
||||
|
||||
22..33..22.. IInnssttaallllaattiioonn wwiitthh PPoossttggrreeSSQQLL
|
||||
|
||||
We will assume that you are using the database named phpgroupware.
|
||||
|
||||
$ psql -d phpgroupware -U username < create_tables.pgsql
|
||||
|
||||
22..44.. CCoonnffiigguurree pphhppGGrroouuppWWaarree
|
||||
|
||||
Change to the inc directory.
|
||||
Edit the file called config.inc.php to point to the location of your
|
||||
include files.
|
||||
|
||||
Some people might prefer to install their include files in a directory
|
||||
which is not world viewable. For this, you will need to move every-
|
||||
thing except config.inc.php into another directory and point con-
|
||||
fig.inc.php to that directory. For most installations, the current
|
||||
location of these file should be fine.
|
||||
|
||||
|
||||
Edit globalconfig.inc.php to reflect your system settings. You can
|
||||
choose which programs you would like to have available to your system.
|
||||
For example, if you do not have access to a IMAP server, you can
|
||||
change $installed["email"] = "Y"; to $installed["email"] = "N";
|
||||
This would make this program unavaiable to all users regardless of
|
||||
their permissions.
|
||||
|
||||
If you are using the email system you will need to create a temporary
|
||||
directory where file uploads will be stored. For security reasons,
|
||||
you should chown nobody.nobody and chmod 700 to that directory.
|
||||
Depending on your system configuration. Default installs of Apache
|
||||
normally run as the user nobody. You may need your system
|
||||
administrator to do this for you if you do not have root access.
|
||||
|
||||
If you do not have access to root, create this file and run it.
|
||||
|
||||
<?php
|
||||
if (mkdir("/path/to/temp/directory",0700)) {
|
||||
echo "Directory created successfully";
|
||||
} else {
|
||||
echo "Error creating directory";
|
||||
}
|
||||
|
||||
|
||||
If you have access to cron, you may want to setup the files in the
|
||||
cron directory.
|
||||
|
||||
stalesessions.pl - There are 2 reasons for this file.
|
||||
|
||||
+o Users always forget to logout. This way the session doesn't sit
|
||||
around forever, creating a possible security risk.
|
||||
|
||||
+o The email system requires plain text passwords which are stored in
|
||||
the sessions table.
|
||||
|
||||
This file is not required, you can simply uncomment the lines
|
||||
indicated in session.class in update_dla(). This will require an
|
||||
extra query during every transaction which could cause performance
|
||||
problems. Also, if there are no logins in a few days, they will sit
|
||||
around and wait for someone to login before they are deleted. If you
|
||||
go this route, you will need to edit the number of seconds until they
|
||||
are deleted. It defaults to 2 hours (7200 secs). If you choose to
|
||||
use the cron program, simply edit the settings for your database and
|
||||
uncomment the line for your database type.
|
||||
|
||||
stale_uploads.pl - This will delete file attachments for messages that
|
||||
where not completed. If a users browser crashes, internet connection
|
||||
dies, etc, their files will sit there forever unless deleted. You
|
||||
could add a few lines to logout.php that will look in the temp
|
||||
directory for any stale uploads and delete them. But, once again, it
|
||||
becomes a performance issue.
|
||||
|
||||
If your config is setup properly you can now login. Point your
|
||||
browser to the installed location and login with the username demo and
|
||||
the password is 1234
|
||||
At this point it would be a good idea to create a new user and delete
|
||||
the old one.
|
||||
|
||||
33.. AAbboouutt tthhiiss ddooccuummeenntt
|
||||
|
||||
33..11.. NNeeww vveerrssiioonnss
|
||||
|
||||
The newest version of this document can be found on our website
|
||||
<http://www.phpgroupware.org> as SGML source, HTML, or TEXT.
|
||||
|
||||
33..22.. CCoommmmeennttss
|
||||
|
||||
Comments on this HOWTO should be directed to the phpGroupWare
|
||||
developers mailing list phpgroupware-developers@lists.sourceforge.net
|
||||
<mailto:phpgroupware-developers@lists.sourceforge.net>.
|
||||
|
||||
To subscribe, go to http://sourceforge.net/mail/?group_id=7305
|
||||
<http://sourceforge.net/mail/?group_id=7305>
|
||||
|
||||
|
||||
|
||||
33..33.. HHiissttoorryy
|
||||
|
||||
This document was started by Joseph Engo and reworked by Dan
|
||||
Kuykendall.
|
||||
|
||||
33..44.. VVeerrssiioonn HHiissttoorryy
|
||||
|
||||
Old Version
|
||||
|
||||
|
||||
+o Created by Jengo, wasn't in SGML HOWTO format.
|
||||
|
||||
v1.0 (July 6, 2000)
|
||||
|
||||
|
||||
+o Built proper SGML version.
|
||||
|
||||
+o Included the FAQ.
|
||||
|
||||
+o Other minor additions.
|
||||
|
||||
33..55.. CCooppyyrriigghhttss aanndd TTrraaddeemmaarrkkss
|
||||
|
||||
Copyright (c) Dan Kuykendall. Permission is granted to copy,
|
||||
distribute and/or modify this document under the terms of the GNU Free
|
||||
Documentation License, Version 1.1 or any later version published by
|
||||
the Free Software Foundation
|
||||
|
||||
A copy of the license is available at GNU Free Documentation License
|
||||
<http://www.gnu.org/copyleft/fdl.txt>.
|
||||
|
||||
33..66.. AAcckknnoowwlleeddggeemmeennttss aanndd TThhaannkkss
|
||||
|
||||
Thanks to Joesph Engo for starting phpGroupWare (at the time called
|
||||
webdistro) and the core of this HOWTO. Thanks to all the developers
|
||||
and users who contribute to making phpGroupWare such a success.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
7
doc/INSTALL
Executable file
7
doc/INSTALL
Executable file
@ -0,0 +1,7 @@
|
||||
[ phpGroupWare ]
|
||||
|
||||
See the HOWTO for installation instructions.
|
||||
|
||||
jengo@phpgroupware.org
|
||||
|
||||
|
342
doc/LICENSE
Executable file
342
doc/LICENSE
Executable file
@ -0,0 +1,342 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
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
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
||||
|
63
doc/README
Executable file
63
doc/README
Executable file
@ -0,0 +1,63 @@
|
||||
** This file is mostly out of date, please see the HOWTO docs **
|
||||
|
||||
This program was created becuase I needed a more centralize means of conduting
|
||||
my daily life. I have seen many great programs out there, calendars, todolist,
|
||||
addressbooks, email, etc... But, there is a very common problem with 95% of
|
||||
them, they don't like each other. ( The programs, not the people :) If I was
|
||||
logged into the calendar and wanted to grab a phone number, I would have to
|
||||
login to another app. Which became a real pain real quick. So, I search high
|
||||
and low for something that would have all these systems tied in to one. Well,
|
||||
I didn't find anything I really liked. So, I made my own. ( Isn't that the
|
||||
driving force of 99% of Open Source apps ? :)
|
||||
|
||||
Before I bore you to death, not all of these programs are written by me. Some,
|
||||
I wrote my self. Some where downloaded and converted. All apps are released
|
||||
under the GPL license. I would not use anything but. If you are intrested
|
||||
in adding/recommending a program to be included in this ditro. Please, send
|
||||
me the URL. I will not except restrictive licenses. I will only accept GPL
|
||||
or freeware. If you are intrested in helping out with development, or think
|
||||
you might be able to help out. Let me know what your plains are.
|
||||
|
||||
You might have noticed there are a few references to programs that can't be
|
||||
found anywhere in the archive or on the site. Thats becuase there not ready
|
||||
yet. For example, pop_mail. This is a feature that will be added in the
|
||||
future. It will give the admin control over who has POP-3 access for virtual
|
||||
users. Becuase the system does not use nor require the user to have a shell
|
||||
account on the system, a special POP-3 server is going to be used. It will
|
||||
verify the user from the accounts table, then allow or disallow access to there
|
||||
messages. I don't think this feature will be used too often, but, it gives
|
||||
a nice bit of control for some added flexablity. Currently users that have
|
||||
access to email will be required to have an account on the server. This will
|
||||
change in the future. I am looking into other IMAP servers that can verify
|
||||
logins through the accounts table. This will take some time for me to find the
|
||||
best solution.
|
||||
|
||||
Some things you should note on how this system works. Think of the navigation
|
||||
bar as the glue sticking all of these apps together. It is handling the
|
||||
login portions, session info and account info. If you notice the layout of
|
||||
the directorys, it can give a good clue to how this system is layied out.
|
||||
|
||||
/phpGroupWare
|
||||
|- inc [ The common files used by the distro ]
|
||||
|- addressbook [ File needed by the addressbook only ]
|
||||
| |- inc [ The include files for the addressbook ]
|
||||
| \- icons [ Images for the addressbook, unless commonly
|
||||
| used through out the program ]
|
||||
|- icons [ Images used throughout the program ]
|
||||
|
||||
I think you can get the idea of it. Another thing that should be noted is the
|
||||
structure of the database. Yes, it looks pretty odd, but, for the most part
|
||||
makes a lot of sense. Lets say you didn't need the addressbook. Delete
|
||||
/phpGroupWare/addressbook and change the settings in /phpGroupWare/config.inc There are
|
||||
still a few references to it, like in the account table. But, there not used.
|
||||
This is one of the main reasons I use $dbase->f("con") instead of $dbase->f(0)
|
||||
|
||||
Which brings me to another point, I _try_ to use standared colum names through
|
||||
out the database. con = control number, owner = the users loginid,
|
||||
status = that records status. This makes it easier to keep track of what does
|
||||
what. Refear to CODES in the doc directory.
|
||||
|
||||
BTW: Please, ingnore my very poor spelling and grammer. I am a programmer
|
||||
not an English teacher.
|
||||
|
||||
Happy hacking :)
|
4
doc/RELEASE-NOTES
Executable file
4
doc/RELEASE-NOTES
Executable file
@ -0,0 +1,4 @@
|
||||
This release requires you to change your addressbook table. You need to add the field company varchar(255) after the notes field.
|
||||
|
||||
The groups table has changed greatly. This should be the last changed the groups table requires
|
||||
for quite a while.
|
18
doc/SECURITY
Executable file
18
doc/SECURITY
Executable file
@ -0,0 +1,18 @@
|
||||
First off, I would not recommend using this in a type of enviroment that
|
||||
security is a really big concern. I am *NOT* saying that you shouldn't be
|
||||
concerned about it, but, until the system is thoughly tested. I would not
|
||||
recommend it.
|
||||
|
||||
Becuase of the current methods that the email system works. It is required
|
||||
that the users password is in the sessions table. IMAP needs the password
|
||||
to verify the user. This is one of the main reasons for the stalesessions
|
||||
program. I do not like keeping passwords in any medium that is not encryped.
|
||||
|
||||
The email system stores its file attachments in a temp directory. For right
|
||||
now, you need to watch this directory because it can fill up very quickly.
|
||||
If a user does not finsh composing the message (going else where in the program, internet connection dieing, browser crash, etc) the file will sit there until
|
||||
it is deleted. There will be a simple cron program to go through and clean
|
||||
things up.
|
||||
|
||||
Besides this, there is nothing else that I am aware of. Let me know if you
|
||||
find anything.
|
255
doc/create_tables.mysql
Executable file
255
doc/create_tables.mysql
Executable file
@ -0,0 +1,255 @@
|
||||
# $Id$
|
||||
|
||||
CREATE TABLE applications (
|
||||
app_name varchar(25) NOT NULL,
|
||||
app_title varchar(50),
|
||||
app_enabled int,
|
||||
UNIQUE app_name (app_name)
|
||||
);
|
||||
|
||||
insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0);
|
||||
|
||||
CREATE TABLE accounts (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
loginid varchar(25) NOT NULL,
|
||||
passwd varchar(32) NOT NULL,
|
||||
firstname varchar(50),
|
||||
lastname varchar(50),
|
||||
permissions text,
|
||||
groups varchar(30),
|
||||
lastlogin int(11),
|
||||
lastloginfrom varchar(255),
|
||||
lastpasswd_change int(11),
|
||||
status enum('A','L') DEFAULT 'A' NOT NULL,
|
||||
PRIMARY KEY (con),
|
||||
UNIQUE loginid (loginid)
|
||||
);
|
||||
|
||||
create table bookmarks (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
owner varchar(255),
|
||||
category int NOT NULL,
|
||||
url varchar(255),
|
||||
title varchar(255),
|
||||
des text,
|
||||
access char(7),
|
||||
lastupdate int(11),
|
||||
lastview int(11),
|
||||
totalviews int(11),
|
||||
PRIMARY KEY (con)
|
||||
);
|
||||
|
||||
create table bookmarks_cats (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
owner varchar(255),
|
||||
parent int(11),
|
||||
parent_name varchar(255),
|
||||
type char(4),
|
||||
name varchar(255),
|
||||
PRIMARY KEY (con)
|
||||
);
|
||||
|
||||
create table groups (
|
||||
group_id int NOT NULL auto_increment,
|
||||
group_name varchar(255),
|
||||
group_apps varchar(255),
|
||||
primary key(group_id)
|
||||
);
|
||||
|
||||
insert into groups (group_name) values ('Default');
|
||||
|
||||
insert into accounts (loginid,passwd,firstname,lastname,permissions,groups,
|
||||
status) values ('demo','81dc9bdb52d04dc20036dbd8313ed055','Demo','Account',
|
||||
':admin:email:todo:addressbook:calendar:hr:',',1,','A');
|
||||
|
||||
|
||||
CREATE TABLE addressbook (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
owner varchar(25),
|
||||
access varchar(10),
|
||||
firstname varchar(255),
|
||||
lastname varchar(255),
|
||||
email varchar(255),
|
||||
hphone varchar(255),
|
||||
wphone varchar(255),
|
||||
fax varchar(255),
|
||||
pager varchar(255),
|
||||
mphone varchar(255),
|
||||
ophone varchar(255),
|
||||
street varchar(255),
|
||||
city varchar(255),
|
||||
state varchar(255),
|
||||
zip varchar(255),
|
||||
bday varchar(255),
|
||||
notes text,
|
||||
company varchar(255),
|
||||
PRIMARY KEY (con)
|
||||
);
|
||||
|
||||
CREATE TABLE preferences (
|
||||
owner varchar(20),
|
||||
name varchar(50),
|
||||
value varchar(50)
|
||||
);
|
||||
|
||||
CREATE TABLE sessions (
|
||||
sessionid varchar(255) NOT NULL,
|
||||
loginid varchar(20),
|
||||
passwd varchar(255),
|
||||
ip varchar(255),
|
||||
logintime int(11),
|
||||
dla int(11),
|
||||
UNIQUE sessionid (sessionid)
|
||||
);
|
||||
|
||||
CREATE TABLE app_sessions (
|
||||
sessionid varchar(255) NOT NULL,
|
||||
loginid varchar(20),
|
||||
app varchar(20),
|
||||
content text
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE todo (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
owner varchar(25),
|
||||
access varchar(10),
|
||||
des text,
|
||||
pri int(11),
|
||||
status int(11),
|
||||
datecreated int(11),
|
||||
datedue int(11),
|
||||
PRIMARY KEY (con)
|
||||
);
|
||||
|
||||
CREATE TABLE webcal_entry (
|
||||
cal_id int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
cal_group_id int(11),
|
||||
cal_create_by varchar(25) NOT NULL,
|
||||
cal_date int(11) DEFAULT '0' NOT NULL,
|
||||
cal_time int(11),
|
||||
cal_mod_date int(11),
|
||||
cal_mod_time int(11),
|
||||
cal_duration int(11) DEFAULT '0' NOT NULL,
|
||||
cal_priority int(11) DEFAULT '2',
|
||||
cal_type varchar(10),
|
||||
cal_access char(10),
|
||||
cal_name varchar(80) NOT NULL,
|
||||
cal_description text,
|
||||
PRIMARY KEY (cal_id)
|
||||
);
|
||||
|
||||
CREATE TABLE webcal_entry_repeats (
|
||||
cal_id int(11) DEFAULT '0' NOT NULL,
|
||||
cal_type enum('daily','weekly','monthlyByDay','monthlyByDate','yearly') DEFAULT 'daily' NOT NULL,
|
||||
cal_end int(11),
|
||||
cal_frequency int(11) DEFAULT '1',
|
||||
cal_days char(7)
|
||||
);
|
||||
|
||||
CREATE TABLE webcal_entry_user (
|
||||
cal_id int(11) DEFAULT '0' NOT NULL,
|
||||
cal_login varchar(25) NOT NULL,
|
||||
cal_status char(1) DEFAULT 'A',
|
||||
PRIMARY KEY (cal_id, cal_login)
|
||||
);
|
||||
|
||||
create table webcal_entry_groups (
|
||||
cal_id int,
|
||||
groups varchar(255)
|
||||
);
|
||||
|
||||
create table access_log (
|
||||
sessionid varchar(30),
|
||||
loginid varchar(30),
|
||||
ip varchar(30),
|
||||
li int,
|
||||
lo int
|
||||
);
|
||||
|
||||
create table ticket (
|
||||
t_id int unsigned not null auto_increment,
|
||||
t_category varchar(40) not null,
|
||||
t_subject varchar(80),
|
||||
t_detail text,
|
||||
t_priority smallint,
|
||||
t_user varchar(10) not null,
|
||||
t_assignedto varchar(10) not null,
|
||||
t_timestamp_opened int,
|
||||
t_timestamp_closed int,
|
||||
t_department varchar(25),
|
||||
primary key (t_id)
|
||||
);
|
||||
|
||||
create table category (
|
||||
c_id int unsigned not null auto_increment,
|
||||
c_department varchar(25) not null,
|
||||
c_name varchar(40) not null,
|
||||
primary key (c_id)
|
||||
);
|
||||
|
||||
insert into preferences values ('demo','maxmatchs','10');
|
||||
insert into preferences values ('demo','mainscreen_showbirthdays','True');
|
||||
insert into preferences values ('demo','mainscreen_showevents','True');
|
||||
insert into preferences values ('demo','timeformat','12');
|
||||
insert into preferences values ('demo','dateformat','m/d/Y');
|
||||
insert into preferences values ('demo','theme','default');
|
||||
insert into preferences values ('demo','tz_offset','0');
|
||||
|
||||
CREATE TABLE news_site (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
display varchar(255),
|
||||
base_url varchar(255),
|
||||
newsfile varchar(255),
|
||||
lastread int unsigned,
|
||||
newstype varchar(15),
|
||||
cachetime int unsigned,
|
||||
listings int unsigned,
|
||||
PRIMARY KEY (con)
|
||||
);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Slashdot','http://slashdot.org','/slashdot.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Freshmeat','http://freshmeat.net','/backend/fm.rdf',0,'fm',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Linux Today','http://linuxtoday.com','/backend/linuxtoday.xml',0,'lt',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Linux Game Tome','http://happypenguin.org','/html/news.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Segfault','http://segfault.org','/stories.xml',0,'sf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('KDE News','http://www.kde.org','/news/kdenews.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Gnome News','http://news.gnome.org','/gnome-news/rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Gimp News','http://www.xach.com','/gimp/news/channel.rdf',0,'rdf-chan',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Mozilla','http://www.mozilla.org','/news.rdf',0,'rdf-chan',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('MozillaZine','http://www.mozillazine.org','/contents.rdf',0,'rdf',60,20);
|
||||
|
||||
CREATE TABLE news_headlines (
|
||||
site int(11) NOT NULL,
|
||||
title varchar(255),
|
||||
link varchar(255)
|
||||
);
|
||||
|
||||
CREATE TABLE users_headlines (
|
||||
owner varchar(25) NOT NULL,
|
||||
site int(11) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE profiles (
|
||||
con int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
owner varchar(20),
|
||||
title varchar(255),
|
||||
phone_number varchar(255),
|
||||
comments text,
|
||||
picture_format varchar(255),
|
||||
picture blob,
|
||||
PRIMARY KEY (con)
|
||||
);
|
244
doc/create_tables.pgsql
Executable file
244
doc/create_tables.pgsql
Executable file
@ -0,0 +1,244 @@
|
||||
BEGIN WORK;
|
||||
|
||||
create table applications (
|
||||
app_name varchar(25) NOT NULL,
|
||||
app_title varchar(50),
|
||||
app_enabled int,
|
||||
unique(app_name)
|
||||
);
|
||||
|
||||
insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0);
|
||||
insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0);
|
||||
|
||||
create table accounts (
|
||||
con serial,
|
||||
loginid varchar(25) NOT NULL,
|
||||
passwd char(32) NOT NULL,
|
||||
firstname varchar(50),
|
||||
lastname varchar(50),
|
||||
permissions text,
|
||||
groups varchar(30),
|
||||
lastlogin int,
|
||||
lastloginfrom varchar(255),
|
||||
lastpasswd_change int,
|
||||
status char(1),
|
||||
unique(loginid)
|
||||
);
|
||||
|
||||
create table groups (
|
||||
group_id serial,
|
||||
group_name varchar(50),
|
||||
group_apps varchar(255)
|
||||
);
|
||||
|
||||
insert into groups (group_name) values ('Default');
|
||||
|
||||
insert into accounts (loginid,passwd,firstname,lastname,permissions,groups,
|
||||
status) values ('demo','81dc9bdb52d04dc20036dbd8313ed055','Demo','Account',
|
||||
':admin:email:todo:addressbook:calendar:hr:',',1,','A');
|
||||
|
||||
create table addressbook (
|
||||
con serial,
|
||||
owner varchar(25),
|
||||
access varchar(10),
|
||||
firstname varchar(255),
|
||||
lastname varchar(255),
|
||||
email varchar(255),
|
||||
hphone varchar(255),
|
||||
wphone varchar(255),
|
||||
fax varchar(255),
|
||||
pager varchar(255),
|
||||
mphone varchar(255),
|
||||
ophone varchar(255),
|
||||
street varchar(255),
|
||||
city varchar(255),
|
||||
state varchar(255),
|
||||
zip varchar(255),
|
||||
bday varchar(255),
|
||||
notes TEXT,
|
||||
company varchar(255)
|
||||
);
|
||||
|
||||
create table bookmarks (
|
||||
con serial,
|
||||
owner varchar(255),
|
||||
category int NOT NULL,
|
||||
url varchar(255),
|
||||
title varchar(255),
|
||||
des text,
|
||||
access char(7),
|
||||
lastupdate int,
|
||||
lastview int,
|
||||
totalviews int
|
||||
);
|
||||
|
||||
create table bookmarks_cats (
|
||||
con serial,
|
||||
owner varchar(255),
|
||||
parent int,
|
||||
parent_name varchar(255),
|
||||
type char(4),
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table sessions (
|
||||
sessionid varchar(255),
|
||||
loginid varchar(20),
|
||||
passwd varchar(255),
|
||||
ip varchar(255),
|
||||
logintime int,
|
||||
dla int,
|
||||
unique(sessionid)
|
||||
);
|
||||
|
||||
CREATE TABLE app_sessions (
|
||||
sessionid varchar(255) NOT NULL,
|
||||
loginid varchar(20),
|
||||
app varchar(20),
|
||||
content text
|
||||
);
|
||||
|
||||
create table todo (
|
||||
con serial,
|
||||
owner varchar(25),
|
||||
access varchar(10),
|
||||
des text,
|
||||
pri int,
|
||||
status int,
|
||||
datecreated int,
|
||||
datedue int
|
||||
);
|
||||
|
||||
CREATE TABLE webcal_entry (
|
||||
cal_id serial,
|
||||
cal_group_id int NULL,
|
||||
cal_create_by varchar(25) NOT NULL,
|
||||
cal_date int NOT NULL,
|
||||
cal_time int NULL,
|
||||
cal_mod_date int,
|
||||
cal_mod_time int,
|
||||
cal_duration int NOT NULL,
|
||||
cal_priority int DEFAULT 2,
|
||||
cal_type varchar(10),
|
||||
cal_access varchar(10),
|
||||
cal_name varchar(80) NOT NULL,
|
||||
cal_description TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE webcal_entry_user (
|
||||
cal_id int NOT NULL,
|
||||
cal_login varchar(25) NOT NULL,
|
||||
cal_status char(1) DEFAULT 'A'
|
||||
);
|
||||
|
||||
create table webcal_entry_repeats (
|
||||
cal_id int,
|
||||
cal_type varchar(20),
|
||||
cal_end int,
|
||||
cal_frequency int default 1,
|
||||
cal_days char(7)
|
||||
);
|
||||
|
||||
create table webcal_entry_groups (
|
||||
cal_id int,
|
||||
groups varchar(255)
|
||||
);
|
||||
|
||||
create table preferences (
|
||||
owner varchar(20),
|
||||
name varchar(50),
|
||||
value varchar(50)
|
||||
);
|
||||
|
||||
create table access_log (
|
||||
sessionid varchar(30),
|
||||
loginid varchar(30),
|
||||
ip varchar(30),
|
||||
li int,
|
||||
lo int
|
||||
);
|
||||
|
||||
create table ticket (
|
||||
t_id serial,
|
||||
t_category varchar(40) not null,
|
||||
t_subject varchar(80),
|
||||
t_detail text,
|
||||
t_priority smallint,
|
||||
t_user varchar(10) not null,
|
||||
t_assignedto varchar(10) not null,
|
||||
t_timestamp_opened int,
|
||||
t_timestamp_closed int,
|
||||
t_department varchar(25)
|
||||
);
|
||||
|
||||
create table category (
|
||||
c_id serial,
|
||||
c_department varchar(25) not null,
|
||||
c_name varchar(40) not null
|
||||
);
|
||||
|
||||
insert into preferences values ('demo','maxmatchs','10');
|
||||
insert into preferences values ('demo','email_sig','');
|
||||
insert into preferences values ('demo','mainscreen_showbirthdays','True');
|
||||
insert into preferences values ('demo','mainscreen_showevents','True');
|
||||
insert into preferences values ('demo','timeformat','12');
|
||||
insert into preferences values ('demo','dateformat','m/d/Y');
|
||||
insert into preferences values ('demo','theme','default');
|
||||
insert into preferences values ('demo','tz_offset','0');
|
||||
|
||||
CREATE TABLE news_site (
|
||||
con serial,
|
||||
display varchar(255),
|
||||
base_url varchar(255),
|
||||
newsfile varchar(255),
|
||||
lastread int,
|
||||
newstype varchar(15),
|
||||
cachetime int,
|
||||
listings int
|
||||
);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Slashdot','http://slashdot.org','/slashdot.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Freshmeat','http://freshmeat.net','/backend/fm.rdf',0,'fm',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Linux Today','http://linuxtoday.com','/backend/linuxtoday.xml',0,'lt',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Linux Game Tome','http://happypenguin.org','/html/news.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Segfault','http://segfault.org','/stories.xml',0,'sf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('KDE News','http://www.kde.org','/news/kdenews.rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Gnome News','http://news.gnome.org','/gnome-news/rdf',0,'rdf',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Gimp News','http://www.xach.com','/gimp/news/channel.rdf',0,'rdf-chan',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('Mozilla','http://www.mozilla.org','/news.rdf',0,'rdf-chan',60,20);
|
||||
insert into news_site (display,base_url,newsfile,lastread,newstype,cachetime,listings) values ('MozillaZine','http://www.mozillazine.org','/contents.rdf',0,'rdf',60,20);
|
||||
|
||||
CREATE TABLE news_headlines (
|
||||
site int,
|
||||
title varchar(255),
|
||||
link varchar(255)
|
||||
);
|
||||
|
||||
CREATE TABLE users_headlines (
|
||||
owner varchar(25) not null,
|
||||
site int
|
||||
);
|
||||
|
||||
CREATE TABLE profiles (
|
||||
con serial,
|
||||
owner varchar(20),
|
||||
title varchar(255),
|
||||
phone_number varchar(255),
|
||||
comments text,
|
||||
picture_format varchar(255),
|
||||
picture text
|
||||
);
|
||||
|
||||
COMMIT;
|
7
doc/developers/.cvswrappers
Normal file
7
doc/developers/.cvswrappers
Normal file
@ -0,0 +1,7 @@
|
||||
# just add the following two lines to your $home/.cvswrappers file (if it
|
||||
# already exists and doesn't have these lines - otherwise just create this
|
||||
# file with those two lines). This guarantees that *.gif and *.jpg files will
|
||||
# always be marked as binaries - even if you forgot the -kb on adding them
|
||||
|
||||
*.gif -k 'b'
|
||||
*.jpg -k 'b'
|
35
doc/developers/CODES
Executable file
35
doc/developers/CODES
Executable file
@ -0,0 +1,35 @@
|
||||
Let me take a few minutes to explain codes. This is a system that I have been
|
||||
using for years now to forward generic information to another program.
|
||||
Recently I have noticed that all of my programs are differant. So, I am
|
||||
creating a sort of standard for my self. It you need to tell the user that
|
||||
they have been logged off successfully. Would you send the whole string to
|
||||
login.php or just send a number ? Even though I call them codes, I use the
|
||||
variable cd in the program. They are checked through check_code(int code).
|
||||
|
||||
BTW: Some of these do not apply to this program, the are for completly seperate
|
||||
programs. But, might apply to any developing anyone else does. Feel free to
|
||||
come up with some of your own.
|
||||
|
||||
code Meaning
|
||||
-----------------------
|
||||
0 Successfully logged off
|
||||
2 Login expired
|
||||
5 Bad login or password
|
||||
13 Message has been sent
|
||||
14 New entry added successfully
|
||||
15 Entry updated successfully
|
||||
16 Entry deleted successfully
|
||||
17 Problem proccessing your request
|
||||
18 Password changed
|
||||
19 Session killed
|
||||
22 Database error
|
||||
23 Search returned no matchs
|
||||
25 out of order
|
||||
26 invalied date
|
||||
27 Account updated
|
||||
28 Account created
|
||||
29 Account deleted
|
||||
30 Settings updated
|
||||
31 User group added
|
||||
32 User group deleted
|
||||
33 User group updated
|
137
doc/developers/dos2unix.pl
Normal file
137
doc/developers/dos2unix.pl
Normal file
@ -0,0 +1,137 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# This program is distributed under the GPL.
|
||||
# get the license from http://www.fsf.org
|
||||
# this message must be attached to any redistributions
|
||||
# smoser@brickies.net
|
||||
|
||||
sub getType;
|
||||
sub usage;
|
||||
|
||||
if (!@ARGV) { usage(); }
|
||||
|
||||
for($i=(@ARGV-1);$i>=0;$i--) {
|
||||
if (@ARGV[$i] eq "-D" || @ARGV[$i] eq "--u2d") {
|
||||
$target="dos";
|
||||
splice(@ARGV,$i,1);
|
||||
next;
|
||||
}
|
||||
if (@ARGV[$i] eq "-U" || @ARGV[$i] eq "--d2u") {
|
||||
|
||||
$target="unix";
|
||||
splice(@ARGV,$i,1);
|
||||
next;
|
||||
}
|
||||
if (@ARGV[$i] eq "-q") {
|
||||
$quite=1;
|
||||
splice(@ARGV,$i,1);
|
||||
next;
|
||||
}
|
||||
if (@ARGV[$i] =~ m/^-/) {
|
||||
usage(@ARGV[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $elem (@ARGV) {
|
||||
if (!($origtype=getType($elem))) {
|
||||
if (!$quite) {
|
||||
print STDERR "bad file $elem\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
if (! -s $elem) {
|
||||
if (!$quite) { print STDERR "file $elem is empty\n"; }
|
||||
next;
|
||||
}
|
||||
$currtarget=$target;
|
||||
if ($currtarget eq "") {
|
||||
if ($origtype eq "dos") {
|
||||
$currtarget="unix";
|
||||
} elsif ($origtype eq "unix") {
|
||||
$currtarget="dos";
|
||||
} else {
|
||||
print "BAD ERROR, filetype was \"$origtype\" trying to change it to \"$currtarget\"\n";
|
||||
exit(0);
|
||||
}
|
||||
if (!$quite) { print STDERR "changing $elem to $currtarget\n"; }
|
||||
}
|
||||
# should be sane and safe at this point
|
||||
if ($origtype eq $currtarget) {
|
||||
if (!$quite) {
|
||||
print STDERR "warning, skipping $elem\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
open(READ,"<$elem") || die "couldn't open $elem for reading\n";
|
||||
@contents=<READ>;
|
||||
close(READ);
|
||||
if ($currtarget eq "dos") {
|
||||
for($i=0;$i<@contents;$i++) {
|
||||
@contents[$i]=~s/\x0A$/\x0D\x0A/;
|
||||
}
|
||||
} elsif ($currtarget eq "unix") {
|
||||
for($i=0;$i<@contents;$i++) {
|
||||
@contents[$i]=~s/\x0D\x0A$/\x0A/;
|
||||
}
|
||||
} else {
|
||||
print "BAD ERROR, confused on $elem, origtype=\"$origtype\" target=\"$currtarget\"\n";
|
||||
exit(0);
|
||||
}
|
||||
open(WRITE,">$elem") || die "couldn't open $elem for writing\n";
|
||||
foreach $elem (@contents) {
|
||||
print WRITE $elem;
|
||||
}
|
||||
}
|
||||
exit(1);
|
||||
|
||||
|
||||
|
||||
sub getType {
|
||||
# hopefully, this function returns 0 on failure, "dos" for a unix file
|
||||
# "unix" for file that is in unix style
|
||||
my $filename = shift;
|
||||
my $type;
|
||||
if (! -e $filename) { print "$elem bad -e\n";}
|
||||
if (! -w $filename) { print "$elem bad -w\n";}
|
||||
if (! -f $filename) { print "$elem bad -f\n";}
|
||||
if (! -r $filename) { print "$elem bad -r\n";}
|
||||
|
||||
if (!(-w $filename && -e $filename && -f $filename && -r $filename )) {
|
||||
return 0;
|
||||
} else {
|
||||
open(READ,"<$filename");
|
||||
$line=<READ>;
|
||||
$type="";
|
||||
if ($line=~m/\x0D\x0A$/) {
|
||||
#print "had <LF><CR>\n";
|
||||
|
||||
$type="dos";
|
||||
} elsif ($line=~m/\x0A$/) {
|
||||
#print "had LF\n";
|
||||
$type="unix";
|
||||
} elsif (! -s $filename) {
|
||||
return "unix";
|
||||
} else {
|
||||
# whats going on here
|
||||
# $type=0;
|
||||
if (!$quite) { print "warning, can't tell what $elem was. probably binary\n";}
|
||||
$type=0;
|
||||
}
|
||||
close(READ);
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
sub usage {
|
||||
my $invalid = shift;
|
||||
if ($invalid ne "") {
|
||||
print "$invalid: invalid argument\n";
|
||||
}
|
||||
print "usage: $0 [--d2u|--u2d|-D|-U] file1 file2 ...\n";
|
||||
print "\t--d2u, -U\t change files to UNIX format\n";
|
||||
print "\t--u2d, -D\t change files to DOS format\n";
|
||||
print "- when no options are given, format will be detected and changed\n";
|
||||
print "- avoid using with binary files\n";
|
||||
exit(0);
|
||||
}
|
34
doc/developers/phpGW_Developers-HOWTO-1.html
Normal file
34
doc/developers/phpGW_Developers-HOWTO-1.html
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Introduction</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-2.html" REL=next>
|
||||
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc1" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc1">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>phpGroupWare is a web based groupware application framework (API), for writing applications. Integrated applications such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system are included.
|
||||
<H2><A NAME="ss1.1">1.1 Overview of application writing</A>
|
||||
</H2>
|
||||
|
||||
<P>We have attempted to make writing application for phpGroupWare as painless as possible.
|
||||
We hope any pain and suffering is cause by making your application work, but not dealing with phpGroupWare itself.
|
||||
<H2><A NAME="ss1.2">1.2 What does the phpGroupWare API provide?</A>
|
||||
</H2>
|
||||
|
||||
<P>The phpGroupWare API handles session management, user/group management, has support for multiple databases, using the PHPLIB database abstraction method, we support templates using the PHPLIB Templates class, a file system interface, and even a network i/o interface.<BR>
|
||||
On top of these standard functions, phpgroupWare provides several functions to give you the information you need about the users environment, and to properly plug into phpgroupWare.
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc1">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
74
doc/developers/phpGW_Developers-HOWTO-2.html
Normal file
74
doc/developers/phpGW_Developers-HOWTO-2.html
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Guidelines</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-3.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-1.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc2" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-3.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-1.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc2">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s2">2. Guidelines</A></H2>
|
||||
|
||||
<H2><A NAME="ss2.1">2.1 Requirements</A>
|
||||
</H2>
|
||||
|
||||
<P>These guidelines must be followed for any application that wants considered for inclusion into phpGroupWare proper.
|
||||
<P>It must run on PHP3 and PHP4. <BR>
|
||||
SQL statements must be compatible with both MySQL and PostgreSQL.<BR>
|
||||
It must use our default header.inc.php include.<BR>
|
||||
It must use our <CODE>$phpgw_link($url)</CODE> for all links (this is for session support).<BR>
|
||||
It must respect phpGW group rights and phpGW user permissions.<BR>
|
||||
It must use our directory structure, template support and lang (multi-language) support.<BR>
|
||||
Where possible it should run on both Unix and NT platforms.
|
||||
<P>For applications that do not meet these requirements, we will store them in a seperate location, indicating their status.<BR>
|
||||
If you need help converting your application to templates and our lang support, we will try to connect you with someone to help.
|
||||
<H2><A NAME="ss2.2">2.2 Writing/porting your application</A>
|
||||
</H2>
|
||||
|
||||
<H3>Include files</H3>
|
||||
|
||||
<P>Each PHP page you write will need to include the header.inc.php along with a few variables.<BR>
|
||||
This is done by putting this at the top of each PHP page.
|
||||
<HR>
|
||||
<PRE>
|
||||
<?php
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
include("../header.inc.php");
|
||||
?>
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
Of course change application name to fit.<BR>
|
||||
This will include the standard functions, verify the sessionid, rights to the application, and will toss in the navbar.
|
||||
<P>If you have other includes, or functions that need to be inserted/run before the navbar replace
|
||||
<HR>
|
||||
<PRE>
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
with
|
||||
<HR>
|
||||
<PRE>
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
$phpgw_flags["nonavbar"] = True;
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
Then when you are done you need to display the navbar by adding this line:
|
||||
<HR>
|
||||
<PRE>
|
||||
$phpgw->common->navbar();
|
||||
</PRE>
|
||||
<HR>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-3.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-1.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc2">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
62
doc/developers/phpGW_Developers-HOWTO-3.html
Normal file
62
doc/developers/phpGW_Developers-HOWTO-3.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Installing your application</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-4.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-2.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc3" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-4.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-2.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc3">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Installing your application</A></H2>
|
||||
|
||||
<H2><A NAME="ss3.1">3.1 Overview</A>
|
||||
</H2>
|
||||
|
||||
<P>It is fairly simple to add and delete applications to/from phpGroupWare.
|
||||
<H2><A NAME="ss3.2">3.2 Automatic features</A>
|
||||
</H2>
|
||||
|
||||
<P>To make things easy for developers we go ahead and load the following files.
|
||||
<UL>
|
||||
<LI> inc/appname/appname.inc.php - This file should include all your application specific functions.</LI>
|
||||
<LI> inc/appname/header.inc.php - This file is loaded just after the system header/navbar, and allows developers to use it for whatever they need to load.</LI>
|
||||
<LI> inc/appname/footer.inc.php - This file is loaded just before the system footer, allowing developers to close connections and whetever else they need.</LI>
|
||||
</UL>
|
||||
<H2><A NAME="ss3.3">3.3 Adding files, directories and icons.</A>
|
||||
</H2>
|
||||
|
||||
<P>You will need to create the following directories for your code <BR>
|
||||
(replace 'newapp' with your application name)<BR>
|
||||
<PRE>
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
|
||||
</PRE>
|
||||
<H2><A NAME="ss3.4">3.4 Making phpGroupWare aware of your application</A>
|
||||
</H2>
|
||||
|
||||
<P>To make the application aware of your application, add your application setup in the inc/globalconfig.inc.php.<BR>
|
||||
Simply add the following line just after <CODE>'/* ADD NEW APPS HERE */'</CODE> (replace 'newapp' with your application name)
|
||||
<PRE>
|
||||
$phpgw_info["apps"]["newapp"] = array ("title" => "Title of Application", "enabled" => True);
|
||||
</PRE>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-4.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-2.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc3">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
122
doc/developers/phpGW_Developers-HOWTO-4.html
Normal file
122
doc/developers/phpGW_Developers-HOWTO-4.html
Normal file
@ -0,0 +1,122 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Infastructure</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-5.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-3.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc4" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-5.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-3.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc4">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s4">4. Infastructure</A></H2>
|
||||
|
||||
<H2><A NAME="ss4.1">4.1 Overview</A>
|
||||
</H2>
|
||||
|
||||
<P>phpGroupWare attempts to provide developers with a sound directory structure to work from.<BR>
|
||||
The directory layout may seem complex at first, but after some use, you will see that it is designed to accommidate a large number of applications and functions.
|
||||
<H2><A NAME="ss4.2">4.2 Directory tree</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<PRE>
|
||||
.-- addressbook
|
||||
|-- admin
|
||||
|-- calendar
|
||||
|-- cron
|
||||
|-- doc
|
||||
|-- email
|
||||
|-- filemanager
|
||||
|-- files
|
||||
| |-- groups
|
||||
| `-- users
|
||||
|-- headlines
|
||||
|-- inc
|
||||
| |-- addressbook
|
||||
| |-- calendar
|
||||
| |-- core
|
||||
| |-- email
|
||||
| |-- headlines
|
||||
| |-- lang
|
||||
| | |-- en
|
||||
| | |-- gr
|
||||
| | `-- sp
|
||||
| `-- templates
|
||||
| |-- default
|
||||
| | |-- addressbook
|
||||
| | |-- admin
|
||||
| | |-- calendar
|
||||
| | |-- common
|
||||
| | |-- email
|
||||
| | |-- filemanager
|
||||
| | |-- headlines
|
||||
| | |-- preferences
|
||||
| | |-- todo
|
||||
| | `-- tts
|
||||
| `-- icons
|
||||
| |-- email
|
||||
| |-- calendar
|
||||
| `-- tts
|
||||
|-- preferences
|
||||
|-- themes
|
||||
|-- todo
|
||||
`-- tts
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
|
||||
</PRE>
|
||||
<H2><A NAME="ss4.3">4.3 The lang Directory</A>
|
||||
</H2>
|
||||
|
||||
<P>The lang directory is pretty basic. The lang files are simply named appname.inc.php.
|
||||
<PRE>
|
||||
.-- inc
|
||||
`-- lang
|
||||
|-- en
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
|-- de
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
`-- sp
|
||||
|-- admin.inc.php
|
||||
|-- common.inc.php
|
||||
|-- login.inc.php
|
||||
|-- todo.inc.php
|
||||
|-- addressbook.inc.php
|
||||
|-- calendar.inc.php
|
||||
|-- filemanager.inc.php
|
||||
`-- preferences.inc.php
|
||||
|
||||
</PRE>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-5.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-3.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc4">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
144
doc/developers/phpGW_Developers-HOWTO-5.html
Normal file
144
doc/developers/phpGW_Developers-HOWTO-5.html
Normal file
@ -0,0 +1,144 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: The API</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-6.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-4.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc5" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-6.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-4.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc5">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s5">5. The API</A></H2>
|
||||
|
||||
<H2><A NAME="ss5.1">5.1 Introduction</A>
|
||||
</H2>
|
||||
|
||||
<P>phpGroupWare attempts to provide developers with a useful API to handle common tasks.<BR>
|
||||
To do this we have created a multi-dimensional class $phpgw->.<BR>
|
||||
This allows for terrific code organization, and help developers easily identify the file that the function is in.
|
||||
All the files that are patr of this class are in the inc/core directory and are named to match the sub-class.<BR>
|
||||
Example:
|
||||
<CODE>$phpgw->msg->send()</CODE> is in the <CODE>inc/core/phpgw_msg.inc.php</CODE> file.
|
||||
<H2><A NAME="ss5.2">5.2 Basic functions</A>
|
||||
</H2>
|
||||
|
||||
<H3>$phpgw->link</H3>
|
||||
|
||||
<P><CODE>$phpgw->link($url)</CODE><BR>
|
||||
Add support for session management. ALL links must use this, that includes href's form actions and header location's.<BR>
|
||||
If you are just doing a form action back to the same page, you can use it without any paramaters.<BR>
|
||||
This function is right at the core of the class because it is used so often, we wanted to save developers a few keystrokes.
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
<form name=copy method=post action="<?php echo $phpgw->link();?>">
|
||||
/* If session management is done via passing url paramaters */
|
||||
/* The the result would be */
|
||||
/* <form name=copy method=post action="somepage.php?sessionid=87687693276?kp3=kjh98u80"> */
|
||||
</PRE>
|
||||
<HR>
|
||||
<H2><A NAME="ss5.3">5.3 Application Functions</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<H3>$phpgw->common->appsession</H3>
|
||||
|
||||
<P><CODE>$phpgw->common->appsession($data)</CODE><BR>
|
||||
Store important information session information that your application needs.<BR>
|
||||
<CODE>$phpgw->appsession</CODE> will return the value of your session data is you leave the paramater enmpty [i.e. <CODE>$phpgw->appsession("")</CODE>], otherwise it will store whatever data you send to it.<BR>
|
||||
You can also store a comma delimited string and use <CODE>explode()</CODE> to turn it back into an array when you recieve the value back.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$phpgw->common->appsession("/path/to/something");
|
||||
echo "Dir: " . $phpgw->common->appsession();
|
||||
</PRE>
|
||||
<HR>
|
||||
<H2><A NAME="ss5.4">5.4 File functions</A>
|
||||
</H2>
|
||||
|
||||
<H3>$phpgw->vfs->read_file</H3>
|
||||
|
||||
<P><CODE>$phpgw->vfs->read_file($file)</CODE><BR>
|
||||
Returns the data from $file.<BR>
|
||||
You must send the complete path to the file.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$data = $phpgw->vfs->read_file("/some/dir/to/file.txt");
|
||||
</PRE>
|
||||
<HR>
|
||||
<P>
|
||||
<H3>$phpgw->vfs->write_file</H3>
|
||||
|
||||
<P><CODE>$phpgw->vfs->write_file($file, $contents)</CODE><BR>
|
||||
Write data to $file.<BR>
|
||||
You must send the complete path to the file.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$data = $phpgw->vfs->write_file("/some/dir/to/file.txt");
|
||||
</PRE>
|
||||
<HR>
|
||||
<P>
|
||||
<H3>$phpgw->vfs->read_userfile</H3>
|
||||
|
||||
<P><CODE>$phpgw->vfs->read_userfile($file)</CODE><BR>
|
||||
Returns the data from $file, which resides in the users private dir.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$data = $phpgw->vfs->read_userfile("file.txt");
|
||||
</PRE>
|
||||
<HR>
|
||||
<P>
|
||||
<H3>$phpgw->vfs->write_userfile</H3>
|
||||
|
||||
<P><CODE>$phpgw->write_userfile($file, $contents)</CODE><BR>
|
||||
Writes data to $file, which resides in the users private dir.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$data = $phpgw->vfs->write_userfile("file.txt");
|
||||
</PRE>
|
||||
<HR>
|
||||
<P>
|
||||
<H3>$phpgw->vfs->list_userfiles</H3>
|
||||
|
||||
<P><CODE>$phpgw->vfs->list_userfiles()</CODE><BR>
|
||||
Returns an array which has the list of files in the users private dir.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$filelist = array();
|
||||
$filelist = $phpgw->vfs->list_userfiles();
|
||||
</PRE>
|
||||
<HR>
|
||||
<H2><A NAME="ss5.5">5.5 Email/NNTP Functions</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<P>
|
||||
<H3>$phpgw->send->msg</H3>
|
||||
|
||||
<P><CODE>$phpgw->msg->send($service, $to, $subject, $body, $msgtype, $cc, $bcc)</CODE><BR>
|
||||
Send a message via email or NNTP and returns any error codes.<BR>
|
||||
Example:
|
||||
<HR>
|
||||
<PRE>
|
||||
$to = "someuser@domain.com";
|
||||
$subject = "Hello buddy";
|
||||
$body = "Give me a call\n Been wondering what your up to.";
|
||||
$errors = $phpgw->msg->send("email", $to, $subject, $body);
|
||||
</PRE>
|
||||
<HR>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-6.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-4.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc5">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
122
doc/developers/phpGW_Developers-HOWTO-6.html
Normal file
122
doc/developers/phpGW_Developers-HOWTO-6.html
Normal file
@ -0,0 +1,122 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Configuration Variables</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-7.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-5.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc6" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-7.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-5.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc6">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s6">6. Configuration Variables</A></H2>
|
||||
|
||||
<H2><A NAME="ss6.1">6.1 Introduction</A>
|
||||
</H2>
|
||||
|
||||
<P>phpGroupWare attempt to provide developers with as much information about the user, group, server, and application configuration as possible.<BR>
|
||||
To do this we provide a multi-dimensional array called '$phpgw_info[]', which includes all the information about your environment.<BR>
|
||||
Due to the multi-dimensional array approach. getting these values is easy. <BR>
|
||||
Here are some examples:
|
||||
<HR>
|
||||
<PRE>
|
||||
<?php
|
||||
// To do a hello username
|
||||
echo "Hello " . $phpgw_info["user"]["fullname"];
|
||||
//If username first name is John and last name is Doe, prints: 'Hello John Doe'
|
||||
?>
|
||||
<?php
|
||||
// To find out the location of the imap server
|
||||
echo "IMAP Server is named: " . $phpgw_info["server"]["imap_server"];
|
||||
//If imap is running on localhost, prints: 'IMAP Server is named: localhost'
|
||||
?>
|
||||
|
||||
</PRE>
|
||||
<HR>
|
||||
<H2><A NAME="ss6.2">6.2 User information</A>
|
||||
</H2>
|
||||
|
||||
<P><CODE>$phpgw_info["user"]["userid"] = </CODE>The user ID.<BR>
|
||||
<CODE>$phpgw_info["user"]["sessionid"] = </CODE>The session ID<BR>
|
||||
<CODE>$phpgw_info["user"]["theme"] = </CODE>Selected theme<BR>
|
||||
<CODE>$phpgw_info["user"]["private_dir"] = </CODE>Users private dir. Use phpgroupware core functions for access to the files.<BR>
|
||||
<CODE>$phpgw_info["user"]["firstname"] = </CODE>Users first name<BR>
|
||||
<CODE>$phpgw_info["user"]["lastname"] = </CODE>Users last name<BR>
|
||||
<CODE>$phpgw_info["user"]["fullname"] = </CODE>Users Full Name<BR>
|
||||
<CODE>$phpgw_info["user"]["groups"] = </CODE>Groups the user is a member of<BR>
|
||||
<CODE>$phpgw_info["user"]["app_perms"] = </CODE>If the user has access to the current application<BR>
|
||||
<CODE>$phpgw_info["user"]["lastlogin"] = </CODE>Last time the user logged in.<BR>
|
||||
<CODE>$phpgw_info["user"]["lastloginfrom"] = </CODE>Where they logged in from the last time.<BR>
|
||||
<CODE>$phpgw_info["user"]["lastpasswd_change"] = </CODE>Last time they changed their password.<BR>
|
||||
<CODE>$phpgw_info["user"]["passwd"] = </CODE>Hashed password.<BR>
|
||||
<CODE>$phpgw_info["user"]["status"] = </CODE>If the user is enabled.<BR>
|
||||
<CODE>$phpgw_info["user"]["logintime"] = </CODE>Time they logged into their current session.<BR>
|
||||
<CODE>$phpgw_info["user"]["session_dla"] = </CODE>Last time they did anything in their current session<BR>
|
||||
<CODE>$phpgw_info["user"]["session_ip"] = </CODE>Current IP address<BR>
|
||||
<H2><A NAME="ss6.3">6.3 Group information</A>
|
||||
</H2>
|
||||
|
||||
<P><CODE>$phpgw_info["group"]["group_names"] = </CODE>List of groups.<BR>
|
||||
<H2><A NAME="ss6.4">6.4 Server information</A>
|
||||
</H2>
|
||||
|
||||
<P><CODE>$phpgw_info["server"]["server_root"] = </CODE>Main installation directory<BR>
|
||||
<CODE>$phpgw_info["server"]["include_root"] = </CODE>Location of the '<CODE>inc</CODE>' directory.<BR>
|
||||
<CODE>$phpgw_info["server"]["temp_dir"] = </CODE>Directory that can be used for temporarily storing files<BR>
|
||||
<CODE>$phpgw_info["server"]["common_include_dir"] = </CODE>Location of the core/shared include files.<BR>
|
||||
<CODE>$phpgw_info["server"]["template_dir"] = </CODE>Active template files directory. This is defaulted by the server, and changeable by the user.<BR>
|
||||
<CODE>$phpgw_info["server"]["dir_separator"] = </CODE>Allows compatibility with WindowsNT directory format,<BR>
|
||||
<CODE>$phpgw_info["server"]["encrpytkey"] = </CODE><BR>
|
||||
<CODE>$phpgw_info["server"]["site_title"] = </CODE>Site Title will show in the title bar of each webpage.<BR>
|
||||
<CODE>$phpgw_info["server"]["webserver_url"] = </CODE>URL to phpGroupWare installation.<BR>
|
||||
<CODE>$phpgw_info["server"]["charset"] = </CODE>Unknown<BR>
|
||||
<CODE>$phpgw_info["server"]["version"] = </CODE>phpGroupWare version.<BR>
|
||||
<H2><A NAME="ss6.5">6.5 Database information</A>
|
||||
</H2>
|
||||
|
||||
<P>It is unlikely you will need these, because $phpgw_info_db will already be loaded as a database for you to use.
|
||||
<CODE>$phpgw_info["server"]["db_host"] = </CODE>Address of the database server. Usually this is set to localhost.<BR>
|
||||
<CODE>$phpgw_info["server"]["db_name"] = </CODE>Database name.<BR>
|
||||
<CODE>$phpgw_info["server"]["db_user"] = </CODE>User name.<BR>
|
||||
<CODE>$phpgw_info["server"]["db_pass"] = </CODE>Password<BR>
|
||||
<CODE>$phpgw_info["server"]["db_type"] = </CODE>Type of database. Currently MySQL and PostgreSQL are supported.<BR>
|
||||
<H2><A NAME="ss6.6">6.6 Mail information</A>
|
||||
</H2>
|
||||
|
||||
<P>It is unlikely you will need these, because most email needs are services thru core phpGroupWare functions.
|
||||
<CODE>$phpgw_info["server"]["mail_server"] = </CODE>Address of the IMAP server. Usually this is set to localhost.<BR>
|
||||
<CODE>$phpgw_info["server"]["mail_server_type"] = </CODE>IMAP or POP3<BR>
|
||||
<CODE>$phpgw_info["server"]["imap_server_type"] = </CODE>Cyrus or Uwash<BR>
|
||||
<CODE>$phpgw_info["server"]["imap_port"] = </CODE>This is usually 143, and should only be changed if there is a good reason.<BR>
|
||||
<CODE>$phpgw_info["server"]["mail_suffix] = </CODE>This is the domain name, used to add to email address<BR>
|
||||
<CODE>$phpgw_info["server"]["mail_login_type"] = </CODE>This adds support for VMailMgr. Generally this hsould be set to '<CODE>standard</CODE>'.<BR>
|
||||
<CODE>$phpgw_info["server"]["smtp_server"] = </CODE>Address of the SMTP server. Usually this is set to localhost.<BR>
|
||||
<CODE>$phpgw_info["server"]["smtp_port"] = </CODE>This is usually 25, and should only be changed if there is a good reason.<BR>
|
||||
<H2><A NAME="ss6.7">6.7 NNTP information</A>
|
||||
</H2>
|
||||
|
||||
<P><CODE>$phpgw_info["server"]["nntp_server"] = </CODE>Address of the NNTP server.<BR>
|
||||
<CODE>$phpgw_info["server"]["nntp_port"] = </CODE>This is usually XX, and should only be changed if there is a good reason.<BR>
|
||||
<CODE>$phpgw_info["server"]["nntp_sender"] = </CODE>Unknown<BR>
|
||||
<CODE>$phpgw_info["server"]["nntp_organization"] = </CODE>Unknown<BR>
|
||||
<CODE>$phpgw_info["server"]["nntp_admin"] = </CODE>Uknown<BR>
|
||||
<H2><A NAME="ss6.8">6.8 Application information</A>
|
||||
</H2>
|
||||
|
||||
<P>Each application has the following information avalible.
|
||||
<CODE>$phpgw_info["apps"]["appname"]["title"] = </CODE>The title of the application.<BR>
|
||||
<CODE>$phpgw_info["apps"]["appname"]["enabled"] = </CODE>If the application is enabled. True or False.<BR>
|
||||
<CODE>$phpgw_info["server"]["app_include_dir"] = </CODE>Location of the current application include files.<BR>
|
||||
<CODE>$phpgw_info["server"]["app_template_dir"] = </CODE>Location of the current application tpl files.<BR>
|
||||
<CODE>$phpgw_info["server"]["app_lang_dir"] = </CODE>Location of the current lang directory.<BR>
|
||||
<CODE>$phpgw_info["server"]["app_auth"] = </CODE>If the server and current user have access to current application<BR>
|
||||
<CODE>$phpgw_info["server"]["app_current"] = </CODE>name of the current application.<BR>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-7.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-5.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc6">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
63
doc/developers/phpGW_Developers-HOWTO-7.html
Normal file
63
doc/developers/phpGW_Developers-HOWTO-7.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Using Language Support</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-8.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-6.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc7" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-8.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-6.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc7">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s7">7. Using Language Support</A></H2>
|
||||
|
||||
<H2><A NAME="ss7.1">7.1 Overview</A>
|
||||
</H2>
|
||||
|
||||
<P>phpGroupWare is built using a multi-language support scheme. This means the pages can be translated to other languages
|
||||
very easily. It is done thru a series of lang files, which can be translated and selected by the user.
|
||||
<H2><A NAME="ss7.2">7.2 How to use lang support</A>
|
||||
</H2>
|
||||
|
||||
<P>Some instructions on using the lang files.<BR>
|
||||
Under inc/lang there needs to be a sub-directory for each langague. Inside the
|
||||
directory there are a number of files for each application. There is one common file
|
||||
which contains a list of words that all applications use. ie, add, delete, edit, etc...<BR>
|
||||
Words that are specific to a application should be stored with that applications include file.
|
||||
<HR>
|
||||
<PRE>
|
||||
function lang_todo($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
switch($message)
|
||||
{
|
||||
case "urgency": $s = "Urgency"; break;
|
||||
case "completed": $s = "completed"; break;
|
||||
[ snip ]
|
||||
default: $s = "<b>*</b> " . $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
The list of words in the left column should always be written in english. The
|
||||
second column is used to return those words in that includes language. <CODE>$m1, $m2,
|
||||
$m3, and $m4</CODE> are used to pass extra data to be place in the middle of a sentence.<BR>
|
||||
For example:
|
||||
<PRE>
|
||||
You have 29 new messages!
|
||||
</PRE>
|
||||
|
||||
The default should return a bold faced * and the word that wasn't found. This allows users to notice that something is missing in the files and make changes if
|
||||
necessary.
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-8.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-6.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc7">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
31
doc/developers/phpGW_Developers-HOWTO-8.html
Normal file
31
doc/developers/phpGW_Developers-HOWTO-8.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: Using Templates</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-9.html" REL=next>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-7.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc8" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-9.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-7.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc8">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s8">8. Using Templates</A></H2>
|
||||
|
||||
<H2><A NAME="ss8.1">8.1 Overview</A>
|
||||
</H2>
|
||||
|
||||
<P>phpGroupWare is built using a templates based design. This means the display pages, stored in tpl files, can be translated to other languages, made to look completely different.
|
||||
<H2><A NAME="ss8.2">8.2 How to use templates</A>
|
||||
</H2>
|
||||
|
||||
<P>Some instructions on using templates<BR>
|
||||
For Further info read the PHPLIBs documentation for their template class.
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-9.html">Next</A>
|
||||
<A HREF="phpGW_Developers-HOWTO-7.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc8">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
50
doc/developers/phpGW_Developers-HOWTO-9.html
Normal file
50
doc/developers/phpGW_Developers-HOWTO-9.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development: About this document</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-8.html" REL=previous>
|
||||
<LINK HREF="phpGW_Developers-HOWTO.html#toc9" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
Next
|
||||
<A HREF="phpGW_Developers-HOWTO-8.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc9">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s9">9. About this document</A></H2>
|
||||
|
||||
<H2><A NAME="ss9.1">9.1 New versions </A>
|
||||
</H2>
|
||||
|
||||
<P>The newest version of this document can be found on our website
|
||||
<A HREF="http://www.phpgroupware.org">http://www.phpgroupware.org</A> as SGML source, as HTML and as TEXT.
|
||||
<H2><A NAME="ss9.2">9.2 Comments </A>
|
||||
</H2>
|
||||
|
||||
<P>Comments on this HOWTO should be directed to the phpGroupWare developers mailing list
|
||||
<A HREF="mailto:phpgroupware-developers@lists.sourceforge.net">phpgroupware-developers@lists.sourceforge.net</A>.
|
||||
<P>To subscribe, go to
|
||||
<A HREF="http://sourceforge.net/mail/?group_id=7305">http://sourceforge.net/mail/?group_id=7305</A><H2><A NAME="ss9.3">9.3 History </A>
|
||||
</H2>
|
||||
|
||||
<P>This document was written by Dan Kuykendall.
|
||||
<H2><A NAME="ss9.4">9.4 Copyrights and Trademarks </A>
|
||||
</H2>
|
||||
|
||||
<P>Copyright (c) Dan Kuykendall.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation
|
||||
<P>A copy of the license is available at
|
||||
<A HREF="http://www.gnu.org/copyleft/fdl.txt">GNU Free Documentation License</A>.
|
||||
<H2><A NAME="ss9.5">9.5 Acknowledgements and Thanks </A>
|
||||
</H2>
|
||||
|
||||
<P>Thanks to Joesph Engo for starting phpGroupWare (at the time called webdistro).
|
||||
Thanks to all the developers and users who contribute to making phpGroupWare such a success.
|
||||
<HR>
|
||||
Next
|
||||
<A HREF="phpGW_Developers-HOWTO-8.html">Previous</A>
|
||||
<A HREF="phpGW_Developers-HOWTO.html#toc9">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
104
doc/developers/phpGW_Developers-HOWTO.html
Normal file
104
doc/developers/phpGW_Developers-HOWTO.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE> phpGroupWare Application Development</TITLE>
|
||||
<LINK HREF="phpGW_Developers-HOWTO-1.html" REL=next>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="phpGW_Developers-HOWTO-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
<HR>
|
||||
<H1> phpGroupWare Application Development</H1>
|
||||
|
||||
<H2>Dan Kuykendall <dan@kuykendall.org></H2> v0.3, 12 August 2000
|
||||
<P><HR>
|
||||
<EM> This document explains phpGroupWare's infastructure and API, along what is required to integrate applications into it.</EM>
|
||||
<HR>
|
||||
<P>
|
||||
<H2><A NAME="toc1">1.</A> <A HREF="phpGW_Developers-HOWTO-1.html">Introduction</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-1.html#ss1.1">1.1 Overview of application writing</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-1.html#ss1.2">1.2 What does the phpGroupWare API provide?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc2">2.</A> <A HREF="phpGW_Developers-HOWTO-2.html">Guidelines</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-2.html#ss2.1">2.1 Requirements</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-2.html#ss2.2">2.2 Writing/porting your application</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc3">3.</A> <A HREF="phpGW_Developers-HOWTO-3.html">Installing your application</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-3.html#ss3.1">3.1 Overview</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-3.html#ss3.2">3.2 Automatic features</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-3.html#ss3.3">3.3 Adding files, directories and icons.</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-3.html#ss3.4">3.4 Making phpGroupWare aware of your application</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc4">4.</A> <A HREF="phpGW_Developers-HOWTO-4.html">Infastructure</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-4.html#ss4.1">4.1 Overview</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-4.html#ss4.2">4.2 Directory tree</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-4.html#ss4.3">4.3 The lang Directory</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc5">5.</A> <A HREF="phpGW_Developers-HOWTO-5.html">The API</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-5.html#ss5.1">5.1 Introduction</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-5.html#ss5.2">5.2 Basic functions</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-5.html#ss5.3">5.3 Application Functions</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-5.html#ss5.4">5.4 File functions</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-5.html#ss5.5">5.5 Email/NNTP Functions</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc6">6.</A> <A HREF="phpGW_Developers-HOWTO-6.html">Configuration Variables</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.1">6.1 Introduction</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.2">6.2 User information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.3">6.3 Group information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.4">6.4 Server information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.5">6.5 Database information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.6">6.6 Mail information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.7">6.7 NNTP information</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-6.html#ss6.8">6.8 Application information</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc7">7.</A> <A HREF="phpGW_Developers-HOWTO-7.html">Using Language Support</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-7.html#ss7.1">7.1 Overview</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-7.html#ss7.2">7.2 How to use lang support</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc8">8.</A> <A HREF="phpGW_Developers-HOWTO-8.html">Using Templates</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-8.html#ss8.1">8.1 Overview</A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-8.html#ss8.2">8.2 How to use templates</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc9">9.</A> <A HREF="phpGW_Developers-HOWTO-9.html">About this document</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-9.html#ss9.1">9.1 New versions </A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-9.html#ss9.2">9.2 Comments </A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-9.html#ss9.3">9.3 History </A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-9.html#ss9.4">9.4 Copyrights and Trademarks </A>
|
||||
<LI><A HREF="phpGW_Developers-HOWTO-9.html#ss9.5">9.5 Acknowledgements and Thanks </A>
|
||||
</UL>
|
||||
<HR>
|
||||
<A HREF="phpGW_Developers-HOWTO-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
</BODY>
|
||||
</HTML>
|
503
doc/developers/phpGW_Developers-HOWTO.sgml
Normal file
503
doc/developers/phpGW_Developers-HOWTO.sgml
Normal file
@ -0,0 +1,503 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<!-- LinuxDoc file was created by hand by <Dan Kuykendall> 7 July 2000 -->
|
||||
<article>
|
||||
<title>
|
||||
phpGroupWare Application Development
|
||||
</title>
|
||||
<author>
|
||||
Dan Kuykendall <dan@kuykendall.org>
|
||||
</author>
|
||||
<date>
|
||||
v0.3, 12 August 2000
|
||||
</date>
|
||||
<abstract>
|
||||
This document explains phpGroupWare's infastructure and API, along what is required to integrate applications into it.
|
||||
</abstract>
|
||||
|
||||
<toc>
|
||||
<sect>Introduction
|
||||
<p>
|
||||
phpGroupWare is a web based groupware application framework (API), for writing applications. Integrated applications such as
|
||||
email, calendar, todo list, address book, file manager, headline news, and a trouble ticket system are included.
|
||||
</p>
|
||||
<sect1>Overview of application writing
|
||||
<p>
|
||||
We have attempted to make writing application for phpGroupWare as painless as possible.
|
||||
We hope any pain and suffering is cause by making your application work, but not dealing with phpGroupWare itself.
|
||||
</p>
|
||||
<sect1>What does the phpGroupWare API provide?
|
||||
<p>
|
||||
The phpGroupWare API handles session management, user/group management, has support for multiple databases, using the PHPLIB database abstraction method, we support templates using the PHPLIB Templates class, a file system interface, and even a network i/o interface.<newline>
|
||||
On top of these standard functions, phpgroupWare provides several functions to give you the information you need about the users environment, and to properly plug into phpgroupWare.
|
||||
</p>
|
||||
<sect>Guidelines
|
||||
<sect1>Requirements
|
||||
<p>
|
||||
These guidelines must be followed for any application that wants considered for inclusion into phpGroupWare proper.
|
||||
</P>
|
||||
<P>
|
||||
It must run on PHP3 and PHP4. <newline>
|
||||
SQL statements must be compatible with both MySQL and PostgreSQL.<newline>
|
||||
It must use our default header.inc.php include.<newline>
|
||||
It must use our <tt>$phpgw_link($url)</tt> for all links (this is for session support).<newline>
|
||||
It must respect phpGW group rights and phpGW user permissions.<newline>
|
||||
It must use our directory structure, template support and lang (multi-language) support.<newline>
|
||||
Where possible it should run on both Unix and NT platforms.
|
||||
</p>
|
||||
<p>
|
||||
For applications that do not meet these requirements, we will store them in a seperate location, indicating their status.<newline>
|
||||
If you need help converting your application to templates and our lang support, we will try to connect you with someone to help.
|
||||
</P>
|
||||
<sect1>Writing/porting your application
|
||||
<sect2>Include files
|
||||
<p>
|
||||
Each PHP page you write will need to include the header.inc.php along with a few variables.<newline>
|
||||
This is done by putting this at the top of each PHP page.
|
||||
<code>
|
||||
<?php
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
include("../header.inc.php");
|
||||
?>
|
||||
</code>
|
||||
Of course change application name to fit.<newline>
|
||||
This will include the standard functions, verify the sessionid, rights to the application, and will toss in the navbar.
|
||||
<p>
|
||||
If you have other includes, or functions that need to be inserted/run before the navbar replace
|
||||
<code>
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
</code>
|
||||
with
|
||||
<code>
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
$phpgw_flags["nonavbar"] = True;
|
||||
</code>
|
||||
Then when you are done you need to display the navbar by adding this line:
|
||||
<code>
|
||||
$phpgw->common->navbar();
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<sect>Installing your application
|
||||
<sect1>Overview
|
||||
<P>
|
||||
It is fairly simple to add and delete applications to/from phpGroupWare.
|
||||
</p>
|
||||
<sect1>Automatic features
|
||||
<P>
|
||||
To make things easy for developers we go ahead and load the following files.
|
||||
<itemize>
|
||||
<item> inc/appname/appname.inc.php - This file should include all your application specific functions.
|
||||
<item> inc/appname/header.inc.php - This file is loaded just after the system header/navbar, and allows developers to use it for whatever they need to load.
|
||||
<item> inc/appname/footer.inc.php - This file is loaded just before the system footer, allowing developers to close connections and whetever else they need.
|
||||
</itemize>
|
||||
</p>
|
||||
<sect1>Adding files, directories and icons.
|
||||
<p>
|
||||
You will need to create the following directories for your code <newline>
|
||||
(replace 'newapp' with your application name)<newline>
|
||||
<verb>
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
</verb>
|
||||
</p>
|
||||
<sect1>Making phpGroupWare aware of your application
|
||||
<p>
|
||||
To make the application aware of your application, add your application setup in the inc/globalconfig.inc.php.<newline>
|
||||
Simply add the following line just after <tt>'/* ADD NEW APPS HERE */'</tt> (replace 'newapp' with your application name)
|
||||
<verb>
|
||||
$phpgw_info["apps"]["newapp"] = array ("title" => "Title of Application", "enabled" => True);
|
||||
</verb>
|
||||
</p>
|
||||
|
||||
<sect>Infastructure
|
||||
<sect1>Overview
|
||||
<P>
|
||||
phpGroupWare attempts to provide developers with a sound directory structure to work from.<newline>
|
||||
The directory layout may seem complex at first, but after some use, you will see that it is designed to accommidate a large number of applications and functions.
|
||||
</p>
|
||||
<sect1>Directory tree
|
||||
<p>
|
||||
<verb>
|
||||
.-- addressbook
|
||||
|-- admin
|
||||
|-- calendar
|
||||
|-- cron
|
||||
|-- doc
|
||||
|-- email
|
||||
|-- filemanager
|
||||
|-- files
|
||||
| |-- groups
|
||||
| `-- users
|
||||
|-- headlines
|
||||
|-- inc
|
||||
| |-- addressbook
|
||||
| |-- calendar
|
||||
| |-- core
|
||||
| |-- email
|
||||
| |-- headlines
|
||||
| |-- lang
|
||||
| | |-- en
|
||||
| | |-- gr
|
||||
| | `-- sp
|
||||
| `-- templates
|
||||
| |-- default
|
||||
| | |-- addressbook
|
||||
| | |-- admin
|
||||
| | |-- calendar
|
||||
| | |-- common
|
||||
| | |-- email
|
||||
| | |-- filemanager
|
||||
| | |-- headlines
|
||||
| | |-- preferences
|
||||
| | |-- todo
|
||||
| | `-- tts
|
||||
| `-- icons
|
||||
| |-- email
|
||||
| |-- calendar
|
||||
| `-- tts
|
||||
|-- preferences
|
||||
|-- themes
|
||||
|-- todo
|
||||
`-- tts
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
</verb>
|
||||
</p>
|
||||
<sect1>The lang Directory
|
||||
<p>
|
||||
The lang directory is pretty basic. The lang files are simply named appname.inc.php.
|
||||
<verb>
|
||||
.-- inc
|
||||
`-- lang
|
||||
|-- en
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
|-- de
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
`-- sp
|
||||
|-- admin.inc.php
|
||||
|-- common.inc.php
|
||||
|-- login.inc.php
|
||||
|-- todo.inc.php
|
||||
|-- addressbook.inc.php
|
||||
|-- calendar.inc.php
|
||||
|-- filemanager.inc.php
|
||||
`-- preferences.inc.php
|
||||
</verb>
|
||||
</p>
|
||||
<sect>The API
|
||||
<sect1>Introduction
|
||||
<p>
|
||||
phpGroupWare attempts to provide developers with a useful API to handle common tasks.<newline>
|
||||
To do this we have created a multi-dimensional class $phpgw->.<newline>
|
||||
This allows for terrific code organization, and help developers easily identify the file that the function is in.
|
||||
All the files that are patr of this class are in the inc/core directory and are named to match the sub-class.<newline>
|
||||
Example:
|
||||
<tt>$phpgw->msg->send()</tt> is in the <tt>inc/core/phpgw_msg.inc.php</tt> file.
|
||||
<sect1>Basic functions
|
||||
|
||||
<sect2>$phpgw->link
|
||||
<p>
|
||||
<tt>$phpgw->link($url)</tt><newline>
|
||||
Add support for session management. ALL links must use this, that includes href's form actions and header location's.<newline>
|
||||
If you are just doing a form action back to the same page, you can use it without any paramaters.<newline>
|
||||
This function is right at the core of the class because it is used so often, we wanted to save developers a few keystrokes.
|
||||
Example:
|
||||
<code>
|
||||
<form name=copy method=post action="<?php echo $phpgw->link();?>">
|
||||
/* If session management is done via passing url paramaters */
|
||||
/* The the result would be */
|
||||
/* <form name=copy method=post action="somepage.php?sessionid=87687693276?kp3=kjh98u80"> */
|
||||
</code>
|
||||
</p>
|
||||
<sect1>Application Functions
|
||||
<p>
|
||||
<sect2>$phpgw->common->appsession
|
||||
<p>
|
||||
<tt>$phpgw->common->appsession($data)</tt><newline>
|
||||
Store important information session information that your application needs.<newline>
|
||||
<tt>$phpgw->appsession</tt> will return the value of your session data is you leave the paramater enmpty [i.e. <tt>$phpgw->appsession("")</tt>], otherwise it will store whatever data you send to it.<newline>
|
||||
You can also store a comma delimited string and use <tt>explode()</tt> to turn it back into an array when you recieve the value back.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$phpgw->common->appsession("/path/to/something");
|
||||
echo "Dir: " . $phpgw->common->appsession();
|
||||
</code>
|
||||
</p>
|
||||
|
||||
|
||||
<sect1>File functions
|
||||
<sect2>$phpgw->vfs->read_file
|
||||
<p>
|
||||
<tt>$phpgw->vfs->read_file($file)</tt><newline>
|
||||
Returns the data from $file.<newline>
|
||||
You must send the complete path to the file.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$data = $phpgw->vfs->read_file("/some/dir/to/file.txt");
|
||||
</code>
|
||||
|
||||
<sect2>$phpgw->vfs->write_file
|
||||
<p>
|
||||
<tt>$phpgw->vfs->write_file($file, $contents)</tt><newline>
|
||||
Write data to $file.<newline>
|
||||
You must send the complete path to the file.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$data = $phpgw->vfs->write_file("/some/dir/to/file.txt");
|
||||
</code>
|
||||
|
||||
<sect2>$phpgw->vfs->read_userfile
|
||||
<p>
|
||||
<tt>$phpgw->vfs->read_userfile($file)</tt><newline>
|
||||
Returns the data from $file, which resides in the users private dir.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$data = $phpgw->vfs->read_userfile("file.txt");
|
||||
</code>
|
||||
|
||||
<sect2>$phpgw->vfs->write_userfile
|
||||
<p>
|
||||
<tt>$phpgw->write_userfile($file, $contents)</tt><newline>
|
||||
Writes data to $file, which resides in the users private dir.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$data = $phpgw->vfs->write_userfile("file.txt");
|
||||
</code>
|
||||
|
||||
<sect2>$phpgw->vfs->list_userfiles
|
||||
<p>
|
||||
<tt>$phpgw->vfs->list_userfiles()</tt><newline>
|
||||
Returns an array which has the list of files in the users private dir.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$filelist = array();
|
||||
$filelist = $phpgw->vfs->list_userfiles();
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<sect1>Email/NNTP Functions
|
||||
<p>
|
||||
|
||||
<sect2>$phpgw->send->msg
|
||||
<p>
|
||||
<tt>$phpgw->msg->send($service, $to, $subject, $body, $msgtype, $cc, $bcc)</tt><newline>
|
||||
Send a message via email or NNTP and returns any error codes.<newline>
|
||||
Example:
|
||||
<code>
|
||||
$to = "someuser@domain.com";
|
||||
$subject = "Hello buddy";
|
||||
$body = "Give me a call\n Been wondering what your up to.";
|
||||
$errors = $phpgw->msg->send("email", $to, $subject, $body);
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<sect>Configuration Variables
|
||||
<sect1>Introduction
|
||||
<p>
|
||||
phpGroupWare attempt to provide developers with as much information about the user, group, server, and application configuration as possible.<newline>
|
||||
To do this we provide a multi-dimensional array called '$phpgw_info[]', which includes all the information about your environment.<newline>
|
||||
Due to the multi-dimensional array approach. getting these values is easy. <newline>
|
||||
Here are some examples:
|
||||
<code>
|
||||
<?php
|
||||
// To do a hello username
|
||||
echo "Hello " . $phpgw_info["user"]["fullname"];
|
||||
//If username first name is John and last name is Doe, prints: 'Hello John Doe'
|
||||
?>
|
||||
<?php
|
||||
// To find out the location of the imap server
|
||||
echo "IMAP Server is named: " . $phpgw_info["server"]["imap_server"];
|
||||
//If imap is running on localhost, prints: 'IMAP Server is named: localhost'
|
||||
?>
|
||||
</code>
|
||||
</p>
|
||||
<sect1>User information
|
||||
<p>
|
||||
<tt>$phpgw_info["user"]["userid"] = </tt>The user ID.<newline>
|
||||
<tt>$phpgw_info["user"]["sessionid"] = </tt>The session ID<newline>
|
||||
<tt>$phpgw_info["user"]["theme"] = </tt>Selected theme<newline>
|
||||
<tt>$phpgw_info["user"]["private_dir"] = </tt>Users private dir. Use phpgroupware core functions for access to the files.<newline>
|
||||
<tt>$phpgw_info["user"]["firstname"] = </tt>Users first name<newline>
|
||||
<tt>$phpgw_info["user"]["lastname"] = </tt>Users last name<newline>
|
||||
<tt>$phpgw_info["user"]["fullname"] = </tt>Users Full Name<newline>
|
||||
<tt>$phpgw_info["user"]["groups"] = </tt>Groups the user is a member of<newline>
|
||||
<tt>$phpgw_info["user"]["app_perms"] = </tt>If the user has access to the current application<newline>
|
||||
<tt>$phpgw_info["user"]["lastlogin"] = </tt>Last time the user logged in.<newline>
|
||||
<tt>$phpgw_info["user"]["lastloginfrom"] = </tt>Where they logged in from the last time.<newline>
|
||||
<tt>$phpgw_info["user"]["lastpasswd_change"] = </tt>Last time they changed their password.<newline>
|
||||
<tt>$phpgw_info["user"]["passwd"] = </tt>Hashed password.<newline>
|
||||
<tt>$phpgw_info["user"]["status"] = </tt>If the user is enabled.<newline>
|
||||
<tt>$phpgw_info["user"]["logintime"] = </tt>Time they logged into their current session.<newline>
|
||||
<tt>$phpgw_info["user"]["session_dla"] = </tt>Last time they did anything in their current session<newline>
|
||||
<tt>$phpgw_info["user"]["session_ip"] = </tt>Current IP address<newline>
|
||||
</p>
|
||||
<sect1>Group information
|
||||
<p>
|
||||
<tt>$phpgw_info["group"]["group_names"] = </tt>List of groups.<newline>
|
||||
</p>
|
||||
<sect1>Server information
|
||||
<p>
|
||||
<tt>$phpgw_info["server"]["server_root"] = </tt>Main installation directory<newline>
|
||||
<tt>$phpgw_info["server"]["include_root"] = </tt>Location of the '<tt>inc</tt>' directory.<newline>
|
||||
<tt>$phpgw_info["server"]["temp_dir"] = </tt>Directory that can be used for temporarily storing files<newline>
|
||||
<tt>$phpgw_info["server"]["common_include_dir"] = </tt>Location of the core/shared include files.<newline>
|
||||
<tt>$phpgw_info["server"]["template_dir"] = </tt>Active template files directory. This is defaulted by the server, and changeable by the user.<newline>
|
||||
<tt>$phpgw_info["server"]["dir_separator"] = </tt>Allows compatibility with WindowsNT directory format,<newline>
|
||||
<tt>$phpgw_info["server"]["encrpytkey"] = </tt><newline>
|
||||
<tt>$phpgw_info["server"]["site_title"] = </tt>Site Title will show in the title bar of each webpage.<newline>
|
||||
<tt>$phpgw_info["server"]["webserver_url"] = </tt>URL to phpGroupWare installation.<newline>
|
||||
<tt>$phpgw_info["server"]["charset"] = </tt>Unknown<newline>
|
||||
<tt>$phpgw_info["server"]["version"] = </tt>phpGroupWare version.<newline>
|
||||
</p>
|
||||
<sect1>Database information
|
||||
<p>
|
||||
It is unlikely you will need these, because $phpgw_info_db will already be loaded as a database for you to use.
|
||||
<tt>$phpgw_info["server"]["db_host"] = </tt>Address of the database server. Usually this is set to localhost.<newline>
|
||||
<tt>$phpgw_info["server"]["db_name"] = </tt>Database name.<newline>
|
||||
<tt>$phpgw_info["server"]["db_user"] = </tt>User name.<newline>
|
||||
<tt>$phpgw_info["server"]["db_pass"] = </tt>Password<newline>
|
||||
<tt>$phpgw_info["server"]["db_type"] = </tt>Type of database. Currently MySQL and PostgreSQL are supported.<newline>
|
||||
</p>
|
||||
<sect1>Mail information
|
||||
<p>
|
||||
It is unlikely you will need these, because most email needs are services thru core phpGroupWare functions.
|
||||
<tt>$phpgw_info["server"]["mail_server"] = </tt>Address of the IMAP server. Usually this is set to localhost.<newline>
|
||||
<tt>$phpgw_info["server"]["mail_server_type"] = </tt>IMAP or POP3<newline>
|
||||
<tt>$phpgw_info["server"]["imap_server_type"] = </tt>Cyrus or Uwash<newline>
|
||||
<tt>$phpgw_info["server"]["imap_port"] = </tt>This is usually 143, and should only be changed if there is a good reason.<newline>
|
||||
<tt>$phpgw_info["server"]["mail_suffix] = </tt>This is the domain name, used to add to email address<newline>
|
||||
<tt>$phpgw_info["server"]["mail_login_type"] = </tt>This adds support for VMailMgr. Generally this hsould be set to '<tt>standard</tt>'.<newline>
|
||||
<tt>$phpgw_info["server"]["smtp_server"] = </tt>Address of the SMTP server. Usually this is set to localhost.<newline>
|
||||
<tt>$phpgw_info["server"]["smtp_port"] = </tt>This is usually 25, and should only be changed if there is a good reason.<newline>
|
||||
</p>
|
||||
<sect1>NNTP information
|
||||
<p>
|
||||
<tt>$phpgw_info["server"]["nntp_server"] = </tt>Address of the NNTP server.<newline>
|
||||
<tt>$phpgw_info["server"]["nntp_port"] = </tt>This is usually XX, and should only be changed if there is a good reason.<newline>
|
||||
<tt>$phpgw_info["server"]["nntp_sender"] = </tt>Unknown<newline>
|
||||
<tt>$phpgw_info["server"]["nntp_organization"] = </tt>Unknown<newline>
|
||||
<tt>$phpgw_info["server"]["nntp_admin"] = </tt>Uknown<newline>
|
||||
</p>
|
||||
<sect1>Application information
|
||||
<p>
|
||||
Each application has the following information avalible.
|
||||
<tt>$phpgw_info["apps"]["appname"]["title"] = </tt>The title of the application.<newline>
|
||||
<tt>$phpgw_info["apps"]["appname"]["enabled"] = </tt>If the application is enabled. True or False.<newline>
|
||||
<tt>$phpgw_info["server"]["app_include_dir"] = </tt>Location of the current application include files.<newline>
|
||||
<tt>$phpgw_info["server"]["app_template_dir"] = </tt>Location of the current application tpl files.<newline>
|
||||
<tt>$phpgw_info["server"]["app_lang_dir"] = </tt>Location of the current lang directory.<newline>
|
||||
<tt>$phpgw_info["server"]["app_auth"] = </tt>If the server and current user have access to current application<newline>
|
||||
<tt>$phpgw_info["server"]["app_current"] = </tt>name of the current application.<newline>
|
||||
</p>
|
||||
<sect>Using Language Support
|
||||
<sect1>Overview
|
||||
<P>
|
||||
phpGroupWare is built using a multi-language support scheme. This means the pages can be translated to other languages
|
||||
very easily. It is done thru a series of lang files, which can be translated and selected by the user.
|
||||
</p>
|
||||
<sect1>How to use lang support
|
||||
<p>
|
||||
Some instructions on using the lang files.<newline>
|
||||
Under inc/lang there needs to be a sub-directory for each langague. Inside the
|
||||
directory there are a number of files for each application. There is one common file
|
||||
which contains a list of words that all applications use. ie, add, delete, edit, etc...<newline>
|
||||
Words that are specific to a application should be stored with that applications include file.
|
||||
<code>
|
||||
function lang_todo($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
switch($message)
|
||||
{
|
||||
case "urgency": $s = "Urgency"; break;
|
||||
case "completed": $s = "completed"; break;
|
||||
[ snip ]
|
||||
default: $s = "<b>*</b> " . $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
</code>
|
||||
The list of words in the left column should always be written in english. The
|
||||
second column is used to return those words in that includes language. <tt>$m1, $m2,
|
||||
$m3, and $m4</tt> are used to pass extra data to be place in the middle of a sentence.<newline>
|
||||
For example:
|
||||
<verb>
|
||||
You have 29 new messages!
|
||||
</verb>
|
||||
The default should return a bold faced * and the word that wasn't found. This allows users to notice that something is missing in the files and make changes if
|
||||
necessary.
|
||||
</p>
|
||||
<sect>Using Templates
|
||||
<sect1>Overview
|
||||
<P>
|
||||
phpGroupWare is built using a templates based design. This means the display pages, stored in tpl files, can be translated to other languages, made to look completely different.
|
||||
</p>
|
||||
<sect1>How to use templates
|
||||
<p>
|
||||
Some instructions on using templates<newline>
|
||||
For Further info read the PHPLIBs documentation for their template class.
|
||||
</p>
|
||||
<sect>About this document
|
||||
<sect1>New versions
|
||||
<p>
|
||||
The newest version of this document can be found on our website <url url="http://www.phpgroupware.org"> as SGML source, as HTML and as TEXT.
|
||||
</p>
|
||||
<sect1>Comments
|
||||
<p>
|
||||
Comments on this HOWTO should be directed to the phpGroupWare developers mailing list
|
||||
<url url="mailto:phpgroupware-developers@lists.sourceforge.net" name="phpgroupware-developers@lists.sourceforge.net">.<P>
|
||||
To subscribe, go to <url url="http://sourceforge.net/mail/?group_id=7305"
|
||||
</p>
|
||||
<sect1>History
|
||||
<p>
|
||||
This document was written by Dan Kuykendall.
|
||||
</p>
|
||||
<sect1>Copyrights and Trademarks
|
||||
<p>
|
||||
Copyright (c) Dan Kuykendall.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation
|
||||
</p>
|
||||
<p>
|
||||
A copy of the license is available at
|
||||
<url url="http://www.gnu.org/copyleft/fdl.txt" name="GNU Free Documentation License">.
|
||||
</p>
|
||||
<sect1>Acknowledgements and Thanks
|
||||
<p>
|
||||
Thanks to Joesph Engo for starting phpGroupWare (at the time called webdistro).
|
||||
Thanks to all the developers and users who contribute to making phpGroupWare such a success.
|
||||
</p>
|
||||
</article>
|
858
doc/developers/phpGW_Developers-HOWTO.txt
Normal file
858
doc/developers/phpGW_Developers-HOWTO.txt
Normal file
@ -0,0 +1,858 @@
|
||||
phpGroupWare Application Development
|
||||
Dan Kuykendall <dan@kuykendall.org>
|
||||
v0.3, 12 August 2000
|
||||
|
||||
This document explains phpGroupWare's infastructure and API, along
|
||||
what is required to integrate applications into it.
|
||||
______________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
1.1 Overview of application writing
|
||||
1.2 What does the phpGroupWare API provide?
|
||||
|
||||
2. Guidelines
|
||||
|
||||
2.1 Requirements
|
||||
2.2 Writing/porting your application
|
||||
2.2.1 Include files
|
||||
|
||||
3. Installing your application
|
||||
|
||||
3.1 Overview
|
||||
3.2 Automatic features
|
||||
3.3 Adding files, directories and icons.
|
||||
3.4 Making phpGroupWare aware of your application
|
||||
|
||||
4. Infastructure
|
||||
|
||||
4.1 Overview
|
||||
4.2 Directory tree
|
||||
4.3 The lang Directory
|
||||
|
||||
5. The API
|
||||
|
||||
5.1 Introduction
|
||||
5.2 Basic functions
|
||||
5.2.1 $phpgw->link
|
||||
5.3 Application Functions
|
||||
5.3.1 $phpgw->common->appsession
|
||||
5.4 File functions
|
||||
5.4.1 $phpgw->vfs->read_file
|
||||
5.4.2 $phpgw->vfs->write_file
|
||||
5.4.3 $phpgw->vfs->read_userfile
|
||||
5.4.4 $phpgw->vfs->write_userfile
|
||||
5.4.5 $phpgw->vfs->list_userfiles
|
||||
5.5 Email/NNTP Functions
|
||||
5.5.1 $phpgw->send->msg
|
||||
|
||||
6. Configuration Variables
|
||||
|
||||
6.1 Introduction
|
||||
6.2 User information
|
||||
6.3 Group information
|
||||
6.4 Server information
|
||||
6.5 Database information
|
||||
6.6 Mail information
|
||||
6.7 NNTP information
|
||||
6.8 Application information
|
||||
|
||||
7. Using Language Support
|
||||
|
||||
7.1 Overview
|
||||
7.2 How to use lang support
|
||||
|
||||
8. Using Templates
|
||||
|
||||
8.1 Overview
|
||||
8.2 How to use templates
|
||||
|
||||
9. About this document
|
||||
|
||||
9.1 New versions
|
||||
9.2 Comments
|
||||
9.3 History
|
||||
9.4 Copyrights and Trademarks
|
||||
9.5 Acknowledgements and Thanks
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
11.. IInnttrroodduuccttiioonn
|
||||
|
||||
phpGroupWare is a web based groupware application framework (API), for
|
||||
writing applications. Integrated applications such as email, calendar,
|
||||
todo list, address book, file manager, headline news, and a trouble
|
||||
ticket system are included.
|
||||
|
||||
11..11.. OOvveerrvviieeww ooff aapppplliiccaattiioonn wwrriittiinngg
|
||||
|
||||
We have attempted to make writing application for phpGroupWare as
|
||||
painless as possible. We hope any pain and suffering is cause by
|
||||
making your application work, but not dealing with phpGroupWare
|
||||
itself.
|
||||
|
||||
11..22.. WWhhaatt ddooeess tthhee pphhppGGrroouuppWWaarree AAPPII pprroovviiddee??
|
||||
|
||||
The phpGroupWare API handles session management, user/group
|
||||
management, has support for multiple databases, using the PHPLIB
|
||||
database abstraction method, we support templates using the PHPLIB
|
||||
Templates class, a file system interface, and even a network i/o
|
||||
interface.
|
||||
On top of these standard functions, phpgroupWare provides several
|
||||
functions to give you the information you need about the users
|
||||
environment, and to properly plug into phpgroupWare.
|
||||
|
||||
22.. GGuuiiddeelliinneess
|
||||
|
||||
22..11.. RReeqquuiirreemmeennttss
|
||||
|
||||
These guidelines must be followed for any application that wants
|
||||
considered for inclusion into phpGroupWare proper.
|
||||
|
||||
It must run on PHP3 and PHP4.
|
||||
SQL statements must be compatible with both MySQL and PostgreSQL.
|
||||
It must use our default header.inc.php include.
|
||||
It must use our $phpgw_link($url) for all links (this is for session
|
||||
support).
|
||||
It must respect phpGW group rights and phpGW user permissions.
|
||||
It must use our directory structure, template support and lang (multi-
|
||||
language) support.
|
||||
Where possible it should run on both Unix and NT platforms.
|
||||
|
||||
For applications that do not meet these requirements, we will store
|
||||
them in a seperate location, indicating their status.
|
||||
If you need help converting your application to templates and our lang
|
||||
support, we will try to connect you with someone to help.
|
||||
|
||||
22..22.. WWrriittiinngg//ppoorrttiinngg yyoouurr aapppplliiccaattiioonn
|
||||
|
||||
22..22..11.. IInncclluuddee ffiilleess
|
||||
|
||||
Each PHP page you write will need to include the header.inc.php along
|
||||
with a few variables.
|
||||
This is done by putting this at the top of each PHP page.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
<?php
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
include("../header.inc.php");
|
||||
?>
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
Of course change application name to fit.
|
||||
This will include the standard functions, verify the sessionid,
|
||||
rights to the application, and will toss in the navbar.
|
||||
|
||||
If you have other includes, or functions that need to be inserted/run
|
||||
before the navbar replace
|
||||
|
||||
______________________________________________________________________
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
with
|
||||
|
||||
______________________________________________________________________
|
||||
$phpgw_flags["currentapp"] = "newapp";
|
||||
$phpgw_flags["nonavbar"] = True;
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
Then when you are done you need to display the navbar by adding this
|
||||
line:
|
||||
|
||||
______________________________________________________________________
|
||||
$phpgw->common->navbar();
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
33.. IInnssttaalllliinngg yyoouurr aapppplliiccaattiioonn
|
||||
|
||||
33..11.. OOvveerrvviieeww
|
||||
|
||||
It is fairly simple to add and delete applications to/from
|
||||
phpGroupWare.
|
||||
|
||||
33..22.. AAuuttoommaattiicc ffeeaattuurreess
|
||||
|
||||
To make things easy for developers we go ahead and load the following
|
||||
files.
|
||||
|
||||
+o inc/appname/appname.inc.php - This file should include all your
|
||||
application specific functions.
|
||||
|
||||
+o inc/appname/header.inc.php - This file is loaded just after the
|
||||
system header/navbar, and allows developers to use it for whatever
|
||||
they need to load.
|
||||
|
||||
+o inc/appname/footer.inc.php - This file is loaded just before the
|
||||
system footer, allowing developers to close connections and
|
||||
whetever else they need.
|
||||
|
||||
33..33.. AAddddiinngg ffiilleess,, ddiirreeccttoorriieess aanndd iiccoonnss..
|
||||
|
||||
You will need to create the following directories for your code
|
||||
(replace 'newapp' with your application name)
|
||||
|
||||
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
|
||||
|
||||
|
||||
|
||||
33..44.. MMaakkiinngg pphhppGGrroouuppWWaarree aawwaarree ooff yyoouurr aapppplliiccaattiioonn
|
||||
|
||||
To make the application aware of your application, add your
|
||||
application setup in the inc/globalconfig.inc.php.
|
||||
Simply add the following line just after '/* ADD NEW APPS HERE */'
|
||||
(replace 'newapp' with your application name)
|
||||
|
||||
$phpgw_info["apps"]["newapp"] = array ("title" => "Title of Application", "enabled" => True);
|
||||
|
||||
|
||||
|
||||
44.. IInnffaassttrruuccttuurree
|
||||
|
||||
44..11.. OOvveerrvviieeww
|
||||
|
||||
phpGroupWare attempts to provide developers with a sound directory
|
||||
structure to work from.
|
||||
The directory layout may seem complex at first, but after some use,
|
||||
you will see that it is designed to accommidate a large number of
|
||||
applications and functions.
|
||||
|
||||
44..22.. DDiirreeccttoorryy ttrreeee
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.-- addressbook
|
||||
|-- admin
|
||||
|-- calendar
|
||||
|-- cron
|
||||
|-- doc
|
||||
|-- email
|
||||
|-- filemanager
|
||||
|-- files
|
||||
| |-- groups
|
||||
| `-- users
|
||||
|-- headlines
|
||||
|-- inc
|
||||
| |-- addressbook
|
||||
| |-- calendar
|
||||
| |-- core
|
||||
| |-- email
|
||||
| |-- headlines
|
||||
| |-- lang
|
||||
| | |-- en
|
||||
| | |-- gr
|
||||
| | `-- sp
|
||||
| `-- templates
|
||||
| |-- default
|
||||
| | |-- addressbook
|
||||
| | |-- admin
|
||||
| | |-- calendar
|
||||
| | |-- common
|
||||
| | |-- email
|
||||
| | |-- filemanager
|
||||
| | |-- headlines
|
||||
| | |-- preferences
|
||||
| | |-- todo
|
||||
| | `-- tts
|
||||
| `-- icons
|
||||
| |-- email
|
||||
| |-- calendar
|
||||
| `-- tts
|
||||
|-- preferences
|
||||
|-- themes
|
||||
|-- todo
|
||||
`-- tts
|
||||
`-- newapp
|
||||
`-- icons
|
||||
| `-- navbar.gif
|
||||
`-- inc
|
||||
| |-- header.inc.php
|
||||
| `-- footer.inc.php
|
||||
|-- lang
|
||||
| `-- en
|
||||
| `-- newapp.inc.php
|
||||
`-- template
|
||||
`-- default
|
||||
|
||||
|
||||
|
||||
|
||||
44..33.. TThhee llaanngg DDiirreeccttoorryy
|
||||
|
||||
The lang directory is pretty basic. The lang files are simply named
|
||||
appname.inc.php.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.-- inc
|
||||
`-- lang
|
||||
|-- en
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
|-- de
|
||||
| |-- admin.inc.php
|
||||
| |-- common.inc.php
|
||||
| |-- login.inc.php
|
||||
| |-- todo.inc.php
|
||||
| |-- addressbook.inc.php
|
||||
| |-- calendar.inc.php
|
||||
| |-- filemanager.inc.php
|
||||
| `-- preferences.inc.php
|
||||
`-- sp
|
||||
|-- admin.inc.php
|
||||
|-- common.inc.php
|
||||
|-- login.inc.php
|
||||
|-- todo.inc.php
|
||||
|-- addressbook.inc.php
|
||||
|-- calendar.inc.php
|
||||
|-- filemanager.inc.php
|
||||
`-- preferences.inc.php
|
||||
|
||||
|
||||
|
||||
|
||||
55.. TThhee AAPPII
|
||||
|
||||
55..11.. IInnttrroodduuccttiioonn
|
||||
|
||||
phpGroupWare attempts to provide developers with a useful API to
|
||||
handle common tasks.
|
||||
To do this we have created a multi-dimensional class $phpgw->.
|
||||
This allows for terrific code organization, and help developers easily
|
||||
identify the file that the function is in. All the files that are
|
||||
patr of this class are in the inc/core directory and are named to
|
||||
match the sub-class.
|
||||
Example: $phpgw->msg->send() is in the inc/core/phpgw_msg.inc.php
|
||||
file.
|
||||
|
||||
55..22.. BBaassiicc ffuunnccttiioonnss
|
||||
|
||||
55..22..11.. $$pphhppggww-->>lliinnkk
|
||||
|
||||
$phpgw->link($url)
|
||||
Add support for session management. ALL links must use this, that
|
||||
includes href's form actions and header location's.
|
||||
If you are just doing a form action back to the same page, you can use
|
||||
it without any paramaters.
|
||||
This function is right at the core of the class because it is used so
|
||||
often, we wanted to save developers a few keystrokes. Example:
|
||||
|
||||
______________________________________________________________________
|
||||
<form name=copy method=post action="<?php echo $phpgw->link();?>">
|
||||
/* If session management is done via passing url paramaters */
|
||||
/* The the result would be */
|
||||
/* <form name=copy method=post action="somepage.php?sessionid=87687693276?kp3=kjh98u80"> */
|
||||
______________________________________________________________________
|
||||
|
||||
55..33.. AApppplliiccaattiioonn FFuunnccttiioonnss
|
||||
|
||||
|
||||
55..33..11.. $$pphhppggww-->>ccoommmmoonn-->>aappppsseessssiioonn
|
||||
|
||||
$phpgw->common->appsession($data)
|
||||
Store important information session information that your application
|
||||
needs.
|
||||
$phpgw->appsession will return the value of your session data is you
|
||||
leave the paramater enmpty [i.e. $phpgw->appsession("")], otherwise it
|
||||
will store whatever data you send to it.
|
||||
You can also store a comma delimited string and use explode() to turn
|
||||
it back into an array when you recieve the value back.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$phpgw->common->appsession("/path/to/something");
|
||||
echo "Dir: " . $phpgw->common->appsession();
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
55..44.. FFiillee ffuunnccttiioonnss
|
||||
|
||||
55..44..11.. $$pphhppggww-->>vvffss-->>rreeaadd__ffiillee
|
||||
|
||||
$phpgw->vfs->read_file($file)
|
||||
Returns the data from $file.
|
||||
You must send the complete path to the file.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$data = $phpgw->vfs->read_file("/some/dir/to/file.txt");
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
55..44..22.. $$pphhppggww-->>vvffss-->>wwrriittee__ffiillee
|
||||
|
||||
$phpgw->vfs->write_file($file, $contents)
|
||||
Write data to $file.
|
||||
You must send the complete path to the file.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$data = $phpgw->vfs->write_file("/some/dir/to/file.txt");
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
55..44..33.. $$pphhppggww-->>vvffss-->>rreeaadd__uusseerrffiillee
|
||||
|
||||
$phpgw->vfs->read_userfile($file)
|
||||
Returns the data from $file, which resides in the users private dir.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$data = $phpgw->vfs->read_userfile("file.txt");
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
55..44..44.. $$pphhppggww-->>vvffss-->>wwrriittee__uusseerrffiillee
|
||||
|
||||
$phpgw->write_userfile($file, $contents)
|
||||
Writes data to $file, which resides in the users private dir.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$data = $phpgw->vfs->write_userfile("file.txt");
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
55..44..55.. $$pphhppggww-->>vvffss-->>lliisstt__uusseerrffiilleess
|
||||
|
||||
$phpgw->vfs->list_userfiles()
|
||||
Returns an array which has the list of files in the users private dir.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$filelist = array();
|
||||
$filelist = $phpgw->vfs->list_userfiles();
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
55..55.. EEmmaaiill//NNNNTTPP FFuunnccttiioonnss
|
||||
|
||||
|
||||
|
||||
55..55..11.. $$pphhppggww-->>sseenndd-->>mmssgg
|
||||
|
||||
$phpgw->msg->send($service, $to, $subject, $body, $msgtype, $cc, $bcc)
|
||||
Send a message via email or NNTP and returns any error codes.
|
||||
Example:
|
||||
|
||||
______________________________________________________________________
|
||||
$to = "someuser@domain.com";
|
||||
$subject = "Hello buddy";
|
||||
$body = "Give me a call\n Been wondering what your up to.";
|
||||
$errors = $phpgw->msg->send("email", $to, $subject, $body);
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
66.. CCoonnffiigguurraattiioonn VVaarriiaabblleess
|
||||
|
||||
66..11.. IInnttrroodduuccttiioonn
|
||||
|
||||
phpGroupWare attempt to provide developers with as much information
|
||||
about the user, group, server, and application configuration as
|
||||
possible.
|
||||
To do this we provide a multi-dimensional array called
|
||||
'$phpgw_info[]', which includes all the information about your
|
||||
environment.
|
||||
Due to the multi-dimensional array approach. getting these values is
|
||||
easy.
|
||||
Here are some examples:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
<?php
|
||||
// To do a hello username
|
||||
echo "Hello " . $phpgw_info["user"]["fullname"];
|
||||
//If username first name is John and last name is Doe, prints: 'Hello John Doe'
|
||||
?>
|
||||
<?php
|
||||
// To find out the location of the imap server
|
||||
echo "IMAP Server is named: " . $phpgw_info["server"]["imap_server"];
|
||||
//If imap is running on localhost, prints: 'IMAP Server is named: localhost'
|
||||
?>
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
|
||||
66..22.. UUsseerr iinnffoorrmmaattiioonn
|
||||
|
||||
$phpgw_info["user"]["userid"] = The user ID.
|
||||
$phpgw_info["user"]["sessionid"] = The session ID
|
||||
$phpgw_info["user"]["theme"] = Selected theme
|
||||
$phpgw_info["user"]["private_dir"] = Users private dir. Use
|
||||
phpgroupware core functions for access to the files.
|
||||
$phpgw_info["user"]["firstname"] = Users first name
|
||||
$phpgw_info["user"]["lastname"] = Users last name
|
||||
$phpgw_info["user"]["fullname"] = Users Full Name
|
||||
$phpgw_info["user"]["groups"] = Groups the user is a member of
|
||||
$phpgw_info["user"]["app_perms"] = If the user has access to the
|
||||
current application
|
||||
$phpgw_info["user"]["lastlogin"] = Last time the user logged in.
|
||||
$phpgw_info["user"]["lastloginfrom"] = Where they logged in from the
|
||||
last time.
|
||||
$phpgw_info["user"]["lastpasswd_change"] = Last time they changed
|
||||
their password.
|
||||
$phpgw_info["user"]["passwd"] = Hashed password.
|
||||
$phpgw_info["user"]["status"] = If the user is enabled.
|
||||
$phpgw_info["user"]["logintime"] = Time they logged into their current
|
||||
session.
|
||||
$phpgw_info["user"]["session_dla"] = Last time they did anything in
|
||||
their current session
|
||||
$phpgw_info["user"]["session_ip"] = Current IP address
|
||||
|
||||
66..33.. GGrroouupp iinnffoorrmmaattiioonn
|
||||
|
||||
$phpgw_info["group"]["group_names"] = List of groups.
|
||||
|
||||
66..44.. SSeerrvveerr iinnffoorrmmaattiioonn
|
||||
|
||||
$phpgw_info["server"]["server_root"] = Main installation directory
|
||||
$phpgw_info["server"]["include_root"] = Location of the 'inc'
|
||||
directory.
|
||||
$phpgw_info["server"]["temp_dir"] = Directory that can be used for
|
||||
temporarily storing files
|
||||
$phpgw_info["server"]["common_include_dir"] = Location of the
|
||||
core/shared include files.
|
||||
$phpgw_info["server"]["template_dir"] = Active template files
|
||||
directory. This is defaulted by the server, and changeable by the
|
||||
user.
|
||||
$phpgw_info["server"]["dir_separator"] = Allows compatibility with
|
||||
WindowsNT directory format,
|
||||
$phpgw_info["server"]["encrpytkey"] =
|
||||
$phpgw_info["server"]["site_title"] = Site Title will show in the
|
||||
title bar of each webpage.
|
||||
$phpgw_info["server"]["webserver_url"] = URL to phpGroupWare
|
||||
installation.
|
||||
$phpgw_info["server"]["charset"] = Unknown
|
||||
$phpgw_info["server"]["version"] = phpGroupWare version.
|
||||
|
||||
66..55.. DDaattaabbaassee iinnffoorrmmaattiioonn
|
||||
|
||||
It is unlikely you will need these, because $phpgw_info_db will
|
||||
already be loaded as a database for you to use.
|
||||
$phpgw_info["server"]["db_host"] = Address of the database server.
|
||||
Usually this is set to localhost.
|
||||
$phpgw_info["server"]["db_name"] = Database name.
|
||||
$phpgw_info["server"]["db_user"] = User name.
|
||||
$phpgw_info["server"]["db_pass"] = Password
|
||||
$phpgw_info["server"]["db_type"] = Type of database. Currently MySQL
|
||||
and PostgreSQL are supported.
|
||||
|
||||
66..66.. MMaaiill iinnffoorrmmaattiioonn
|
||||
|
||||
It is unlikely you will need these, because most email needs are
|
||||
services thru core phpGroupWare functions.
|
||||
$phpgw_info["server"]["mail_server"] = Address of the IMAP server.
|
||||
Usually this is set to localhost.
|
||||
$phpgw_info["server"]["mail_server_type"] = IMAP or POP3
|
||||
$phpgw_info["server"]["imap_server_type"] = Cyrus or Uwash
|
||||
$phpgw_info["server"]["imap_port"] = This is usually 143, and should
|
||||
only be changed if there is a good reason.
|
||||
$phpgw_info["server"]["mail_suffix] = This is the domain name, used to
|
||||
add to email address
|
||||
$phpgw_info["server"]["mail_login_type"] = This adds support for
|
||||
VMailMgr. Generally this hsould be set to 'standard'.
|
||||
$phpgw_info["server"]["smtp_server"] = Address of the SMTP server.
|
||||
Usually this is set to localhost.
|
||||
$phpgw_info["server"]["smtp_port"] = This is usually 25, and should
|
||||
only be changed if there is a good reason.
|
||||
|
||||
66..77.. NNNNTTPP iinnffoorrmmaattiioonn
|
||||
|
||||
$phpgw_info["server"]["nntp_server"] = Address of the NNTP server.
|
||||
$phpgw_info["server"]["nntp_port"] = This is usually XX, and should
|
||||
only be changed if there is a good reason.
|
||||
$phpgw_info["server"]["nntp_sender"] = Unknown
|
||||
$phpgw_info["server"]["nntp_organization"] = Unknown
|
||||
$phpgw_info["server"]["nntp_admin"] = Uknown
|
||||
|
||||
66..88.. AApppplliiccaattiioonn iinnffoorrmmaattiioonn
|
||||
|
||||
Each application has the following information avalible.
|
||||
$phpgw_info["apps"]["appname"]["title"] = The title of the
|
||||
application.
|
||||
$phpgw_info["apps"]["appname"]["enabled"] = If the application is
|
||||
enabled. True or False.
|
||||
$phpgw_info["server"]["app_include_dir"] = Location of the current
|
||||
application include files.
|
||||
$phpgw_info["server"]["app_template_dir"] = Location of the current
|
||||
application tpl files.
|
||||
$phpgw_info["server"]["app_lang_dir"] = Location of the current lang
|
||||
directory.
|
||||
$phpgw_info["server"]["app_auth"] = If the server and current user
|
||||
have access to current application
|
||||
$phpgw_info["server"]["app_current"] = name of the current
|
||||
application.
|
||||
|
||||
77.. UUssiinngg LLaanngguuaaggee SSuuppppoorrtt
|
||||
|
||||
77..11.. OOvveerrvviieeww
|
||||
|
||||
phpGroupWare is built using a multi-language support scheme. This
|
||||
means the pages can be translated to other languages very easily. It
|
||||
is done thru a series of lang files, which can be translated and
|
||||
selected by the user.
|
||||
|
||||
77..22.. HHooww ttoo uussee llaanngg ssuuppppoorrtt
|
||||
|
||||
Some instructions on using the lang files.
|
||||
Under inc/lang there needs to be a sub-directory for each langague.
|
||||
Inside the directory there are a number of files for each application.
|
||||
There is one common file which contains a list of words that all
|
||||
applications use. ie, add, delete, edit, etc...
|
||||
Words that are specific to a application should be stored with that
|
||||
applications include file.
|
||||
|
||||
______________________________________________________________________
|
||||
function lang_todo($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "")
|
||||
{
|
||||
$message = strtolower($message);
|
||||
switch($message)
|
||||
{
|
||||
case "urgency": $s = "Urgency"; break;
|
||||
case "completed": $s = "completed"; break;
|
||||
[ snip ]
|
||||
default: $s = "<b>*</b> " . $message;
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
The list of words in the left column should always be written in
|
||||
english. The second column is used to return those words in that
|
||||
includes language. $m1, $m2, $m3, and $m4 are used to pass extra data
|
||||
to be place in the middle of a sentence.
|
||||
For example:
|
||||
|
||||
You have 29 new messages!
|
||||
|
||||
|
||||
The default should return a bold faced * and the word that wasn't
|
||||
found. This allows users to notice that something is missing in the
|
||||
files and make changes if necessary.
|
||||
|
||||
88.. UUssiinngg TTeemmppllaatteess
|
||||
|
||||
88..11.. OOvveerrvviieeww
|
||||
|
||||
phpGroupWare is built using a templates based design. This means the
|
||||
display pages, stored in tpl files, can be translated to other
|
||||
languages, made to look completely different.
|
||||
|
||||
88..22.. HHooww ttoo uussee tteemmppllaatteess
|
||||
|
||||
Some instructions on using templates
|
||||
For Further info read the PHPLIBs documentation for their template
|
||||
class.
|
||||
|
||||
99.. AAbboouutt tthhiiss ddooccuummeenntt
|
||||
|
||||
99..11.. NNeeww vveerrssiioonnss
|
||||
|
||||
The newest version of this document can be found on our website
|
||||
<http://www.phpgroupware.org> as SGML source, as HTML and as TEXT.
|
||||
|
||||
|
||||
|
||||
99..22.. CCoommmmeennttss
|
||||
|
||||
Comments on this HOWTO should be directed to the phpGroupWare
|
||||
developers mailing list phpgroupware-developers@lists.sourceforge.net
|
||||
<mailto:phpgroupware-developers@lists.sourceforge.net>.
|
||||
|
||||
To subscribe, go to <http://sourceforge.net/mail/?group_id=7305>
|
||||
|
||||
99..33.. HHiissttoorryy
|
||||
|
||||
This document was written by Dan Kuykendall.
|
||||
|
||||
99..44.. CCooppyyrriigghhttss aanndd TTrraaddeemmaarrkkss
|
||||
|
||||
Copyright (c) Dan Kuykendall. Permission is granted to copy,
|
||||
distribute and/or modify this document under the terms of the GNU Free
|
||||
Documentation License, Version 1.1 or any later version published by
|
||||
the Free Software Foundation
|
||||
|
||||
A copy of the license is available at GNU Free Documentation License
|
||||
<http://www.gnu.org/copyleft/fdl.txt>.
|
||||
|
||||
99..55.. AAcckknnoowwlleeddggeemmeennttss aanndd TThhaannkkss
|
||||
|
||||
Thanks to Joesph Engo for starting phpGroupWare (at the time called
|
||||
webdistro). Thanks to all the developers and users who contribute to
|
||||
making phpGroupWare such a success.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
139
doc/developers/phpgwapi/msg_pop3.txt
Normal file
139
doc/developers/phpgwapi/msg_pop3.txt
Normal file
@ -0,0 +1,139 @@
|
||||
phpgw_msg_pop3.inc.php
|
||||
Itzchak Rehberg <izzy@qumran.org>
|
||||
v1.0, 07 August 2000
|
||||
|
||||
documentation of the pop3 "msg" class
|
||||
______________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
|
||||
|
||||
1. Why this pop class?
|
||||
2. Function reference
|
||||
2.1. function pop_close($stream,$flags="")
|
||||
2.2. function pop_delete($stream,$msg_num,$flags="")
|
||||
2.3. function pop_fetchbody($stream,$msgnr,$partnr="",$flags="")
|
||||
2.4. function pop_fetchstructure($stream,$msg_num,$flags="")
|
||||
2.5. function pop_header($stream,$msg_nr,$fromlength="",$tolength="",
|
||||
$defaulthost="")
|
||||
2.6. function pop_mailboxmsginfo($stream)
|
||||
2.7. function pop_sort($stream,$criteria,$reverse="",$options="",
|
||||
$msg_info="")
|
||||
3. Additional functionality
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
1. Why this pop class?
|
||||
|
||||
You may ask, why we use another pop class - php's imap_*() functions
|
||||
would work on pop3, too. Well, that may be true - but there are lots
|
||||
of folks out there having their php *not* compiled --with-imap, and
|
||||
some of them feel unable doing such. So it's the easiest thing to have
|
||||
an own pop3 class built on straight socket calls - and since I already
|
||||
did the same writing the smtp "send" class... And by the way this pop3
|
||||
class will have some advantages over php's imap_*() functions...
|
||||
|
||||
We named this class "msg" instead of "pop3", since we use another
|
||||
class with the same structure for imap. Additionally to imap_open()
|
||||
(or pop_open() in this case) we have the "wrapper method" open(),
|
||||
which allows us just to decide on user configuration wether using
|
||||
imap or pop and then just to include the appropriate file, using the
|
||||
same function/method calls for both.
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
2. Function reference
|
||||
|
||||
When I built up this pop class, I felt it an important issue to have
|
||||
it most compatible in syntax to the imap_*() functions, so we could
|
||||
adapt it easily into phpGroupWare. So if I made some improvements, as
|
||||
e.g. to the pop_sort() method, I did it in a manner, that one still
|
||||
can call it the same way as he would call imap_sort() (in this case).
|
||||
|
||||
Due to this fact I have *not* to explain the syntax of each single
|
||||
method here (for this, please refer to your php manual). I will just
|
||||
list up differences one has to keep in mind when using them.
|
||||
|
||||
The first difference is, that this is a class. So before you can use
|
||||
the functions, you have to create an instance of this class, e.g.
|
||||
|
||||
$mypop3 = new msg;
|
||||
$mypop3->open($mailbox,$username,$password,$flags); // or:
|
||||
$mypop3->pop_open($mailbox,$username,$password,$flags);
|
||||
|
||||
both methods do the same - see "wrapper" above in section 1. So if you
|
||||
want to use this pop3 class outside the phpGroupWare environment, you
|
||||
may just want to strip these wrapper methods off the file and just use
|
||||
the pop_*() methods themselves.
|
||||
|
||||
Not all imap_*() funcs have their (working) pendant here, since pop3
|
||||
does not support all the features imap has (e.g. multiple folders).
|
||||
Those methods (e.g. pop_expunge()) just return a default value (here
|
||||
false) and do nothing. They are just kept here in case one of our
|
||||
wrapper methods tries to call them :) These methods are not listed in
|
||||
this document, neither are those who are fully described by their imap
|
||||
pendant.
|
||||
|
||||
|
||||
2.1. function pop_close($stream,$flags="")
|
||||
|
||||
$flags is not used here and won't ever be (makes no sense), but just
|
||||
kept for compatibility.
|
||||
|
||||
2.2. function pop_delete($stream,$msg_num,$flags="")
|
||||
|
||||
Does a real delete - not just marks as deleted (as in imap_delete),
|
||||
since this function is not available to pop3 (in fact the mail is
|
||||
deleted by calling pop_close() afterwards - but there's no undelete)
|
||||
|
||||
2.3. function pop_fetchbody($stream,$msgnr,$partnr="",$flags="")
|
||||
|
||||
$partnr and $flags are ignored and just put here for compatibility
|
||||
purposes to imap_fetchbody
|
||||
|
||||
2.4. function pop_fetchstructure($stream,$msg_num,$flags="")
|
||||
|
||||
$flags is not used here (yet).
|
||||
|
||||
2.5. function pop_header($stream,$msg_nr,$fromlength="",$tolength="",
|
||||
$defaulthost="")
|
||||
|
||||
Not all information you find returned by imap_header is included here,
|
||||
some fields of the array just contain empty values, since these are
|
||||
not available in pop. Note further, that just the first two params of
|
||||
the method are evaluated here. $info[date] contains the date as it
|
||||
appears in the msg header. The method returns false if message does
|
||||
not exist.
|
||||
|
||||
2.6. function pop_mailboxmsginfo($stream)
|
||||
|
||||
Only Nmsgs and Size contain real values. All other fields are empty
|
||||
and just in here for compatibility (those informations you'ld expect
|
||||
in there is not retainable from pop3 servers - e.g. Recent or Unread)
|
||||
|
||||
2.7. function pop_sort($stream,$criteria,$reverse="",$options="")
|
||||
|
||||
$options is not used here. For speed optimizing this method will make
|
||||
use of an array stored within the class (and temporary "out-sourced"
|
||||
to a file, since else it would be lost after the page is once built),
|
||||
holding all the header infos needed to fulfill the sort task. So it
|
||||
only retrieves new header info when either the page is called for the
|
||||
very first time that session, the count of messages reported by the
|
||||
array differs from the count reported by the pop3 server (which in
|
||||
this case would be the same ;), or the class variable $force_check is
|
||||
set to true (which is done automatically by pop_delete, e.g.) - thus
|
||||
not only saving bandwith but gaining additional speed (you will really
|
||||
feel this with several hundreds of mails in your mailbox :)
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
3. Additional functionality
|
||||
|
||||
The msg->err Array is available as described for the smtp "send"
|
||||
method.
|
||||
|
||||
The $msg->logout() method does remove the temp file.
|
117
doc/developers/phpgwapi/send.txt
Normal file
117
doc/developers/phpgwapi/send.txt
Normal file
@ -0,0 +1,117 @@
|
||||
phpgw_send.inc.php
|
||||
Itzchak Rehberg <izzy@qumran.org>
|
||||
v1.0, 07 August 2000
|
||||
|
||||
documentation of the smtp "send" class
|
||||
______________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
|
||||
|
||||
1. Why another mail() function?
|
||||
2. Function reference
|
||||
3. Additional functionality
|
||||
3.1. The smail->err Array
|
||||
3.2. The smail->to_res Array
|
||||
3.3. The function msg()
|
||||
4. Comments
|
||||
4.1. reply codes according to RFC821 - short explanation
|
||||
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
1. Why another mail() function?
|
||||
|
||||
Who ever has used php's owm (built-in) mail() function will certainly
|
||||
agree to its limitations. And if I say "limitations", this is a very
|
||||
neat way to describe what we really think of it - it's almost
|
||||
unreliable at all. Imagine sending a mail to multiple recipients: how
|
||||
will you know if a copy was sent to all of them, and not just one
|
||||
address failed? Or even only one address did *not* fail? There's
|
||||
almost no possibility for detailed error checking (if there's limited
|
||||
possibility for it, I didn't see it). That was the point when we
|
||||
decided on writing an own mail() function to use with phpGroupWare.
|
||||
|
||||
We call the class "send" instead of "smtp" since we plan to have nntp
|
||||
sending, too, with the same structure and function naming.
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
2. Function reference
|
||||
|
||||
Syntax is almost the same as for the mail() function, so please refer
|
||||
to php's docu on this. The difference, of course, is that smtp is a
|
||||
class, so you first have to create an instance of it before you can
|
||||
actually use it, e.g.:
|
||||
|
||||
$mymailer = new send;
|
||||
$mymailer->smail($to,$subject,$message,$header);
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
3. Additional functionality
|
||||
|
||||
As mentioned above, the smtp class provides additional error checking
|
||||
facilities. These are realized by two arrays used inside the class:
|
||||
|
||||
3.1. The smail->err Array
|
||||
|
||||
This array holds the latest information returned by the remote smtp
|
||||
server. It consists of 3 parts:
|
||||
smail->err["code"] is a 3 digit code according to RFC821
|
||||
smail->err["msg"] is the additional message returned by the server
|
||||
smail->err["desc"] may hold some more detailed information, if
|
||||
available
|
||||
|
||||
3.2. The smail->to_res Array
|
||||
|
||||
This is actually an array of arrays holding information equivalent to
|
||||
the smail->err array, but for each single recipient. So here you can
|
||||
check for each recipient, if the server accepted him/her. There's an
|
||||
additional field smail->to_res["addr"] to identify the recipient:
|
||||
smail->to_res["addr"] is the concerned recipient's address
|
||||
smail->to_res["code"] is a 3 digit code according to RFC821
|
||||
smail->to_res["msg"] is the additional message returned by the server
|
||||
smail->to_res["desc"] may hold some more detailed information, if
|
||||
available
|
||||
|
||||
3.3. The function msg($service, $to, $subject, $body)
|
||||
|
||||
We use this additional function to build the message header and call
|
||||
the "smail()" function right from within this. So you may want to
|
||||
adapt the header information, if you want to use the class outside
|
||||
the phpGroupWare environment.
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
|
||||
4. Comments
|
||||
|
||||
the server to use is hardcoded into the smtp->smail() func using the
|
||||
variable $phpgw_info - so if you want to use the function outside of
|
||||
phpGroupWare, you may want to change this.
|
||||
|
||||
4.1. reply codes according to RFC821 - short explanation
|
||||
|
||||
The reply code according to RFC821 consists of 3 digits, I'll refer to
|
||||
those here as xyz. X holds some general information - and by x only
|
||||
one already can decide wether the code tells something good or bad. Y
|
||||
tells the service affected, and z may give some non specified detail.
|
||||
|
||||
value | x | y
|
||||
------+--------------------------------------+------------------------
|
||||
0 | - | syntax
|
||||
1 | accepted, confirmation required | information only
|
||||
2 | action completed successfully | connection related
|
||||
3 | accepted, send more (detailed) data | -
|
||||
4 | not accepted, try again later | -
|
||||
5 | refused, don't retry | mail system
|
||||
|
||||
so x=4 notifies of some temporary, x=5 of some permanent problem.
|
||||
|
||||
If the 3-digit-code is followed by a "-", it's a multi-line response
|
||||
(last line of this response will have a blank following the 3-digit
|
||||
code). Otherwise the 3-digit-code is just followed by a blank.
|
126
doc/update_permission_tables_07122000_to_08032000.php
Normal file
126
doc/update_permission_tables_07122000_to_08032000.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?
|
||||
/**************************************************************************\
|
||||
* update_mysql_perms.php *
|
||||
* Written by Peter "tooley" Tebault <peter@tebault.org> *
|
||||
* quick and dirty converter for mysql accounts.permissions field upgrade *
|
||||
* caused by CVS changes around 31-July-2000 *
|
||||
* written as a bit of: *
|
||||
* *
|
||||
* phpGroupWare *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/*
|
||||
// tooley: and i quote from irc...
|
||||
<Seek3r> admin' => '1',
|
||||
<Seek3r> email' => '2',
|
||||
<Seek3r> pop_mail'=> '3',
|
||||
<Seek3r> calendar' => '4',
|
||||
<Seek3r> addressbook' => '5',
|
||||
<Seek3r> todo' => '6',
|
||||
<Seek3r> tts' => '7',
|
||||
<Seek3r> bookmarks' => '8',
|
||||
<Seek3r> anonymous' => '9',
|
||||
<Seek3r> filemanager' => '10',
|
||||
<Seek3r> headlines' => '11',
|
||||
<Seek3r> nntp' => '12',
|
||||
<Seek3r> chat' => '13',
|
||||
<Seek3r> ftp' => '14'
|
||||
*/
|
||||
|
||||
// CHANGE THIS LINE IF NECESSARY
|
||||
include("../inc/config.inc.php");
|
||||
|
||||
// DON'T EDIT BELOW THIS LINE
|
||||
$host = $phpgw_info["server"]["db_host"];
|
||||
$db = $phpgw_info["server"]["db_name"];
|
||||
$user = $phpgw_info["server"]["db_user"];
|
||||
$pass = $phpgw_info["server"]["db_pass"];
|
||||
|
||||
$conn = mysql_connect($host,$user,$pass);
|
||||
$result = mysql_db_query($db,"SELECT con,permissions,firstname,lastname FROM accounts",$conn);
|
||||
|
||||
echo "Updating permissions...<br><br>\n";
|
||||
echo mysql_num_rows($result) . " users to process:<br>\n";
|
||||
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
$perm = $row[1];
|
||||
$tok = strtok($perm,":");
|
||||
if(isset($newperm)) unset($newperm);
|
||||
while($tok) {
|
||||
switch($tok) {
|
||||
case "1":
|
||||
$newperm .= "admin:";
|
||||
break;
|
||||
case "2":
|
||||
$newperm .= "email:";
|
||||
break;
|
||||
case "3":
|
||||
$newperm .= "pop_mail:";
|
||||
break;
|
||||
case "4":
|
||||
$newperm .= "calendar:";
|
||||
break;
|
||||
case "5":
|
||||
$newperm .= "addressbook:";
|
||||
break;
|
||||
case "6":
|
||||
$newperm .= "todo:";
|
||||
break;
|
||||
case "7":
|
||||
$newperm .= "tts:";
|
||||
break;
|
||||
case "8":
|
||||
$newperm .= "bookmarks:";
|
||||
break;
|
||||
case "9":
|
||||
$newperm .= "anonymous:";
|
||||
break;
|
||||
case "10":
|
||||
$newperm .= "filemanager:";
|
||||
break;
|
||||
case "11":
|
||||
$newperm .= "headlines:";
|
||||
break;
|
||||
case "12":
|
||||
$newperm .= "nntp:";
|
||||
break;
|
||||
case "13":
|
||||
$newperm .= "chat:";
|
||||
break;
|
||||
case "14":
|
||||
$newperm .= "ftp:";
|
||||
break;
|
||||
default:
|
||||
$newperm .= $tok.":";
|
||||
$slip++;
|
||||
break;
|
||||
}
|
||||
$tok = strtok(":");
|
||||
}
|
||||
$thiscon = $row[0];
|
||||
echo ("Updating $row[3], $row[2] ($newperm)...");
|
||||
if(
|
||||
mysql_db_query($db,"UPDATE accounts SET permissions='$newperm' WHERE con='$thiscon'",$conn)) {
|
||||
echo "Success.<br>\n";
|
||||
$success++;
|
||||
} else {
|
||||
echo "Fail: " . mysql_error($conn);
|
||||
$fail++;
|
||||
}
|
||||
}
|
||||
|
||||
echo "Processed $success records successfully";
|
||||
if($fail > 0) {
|
||||
echo ", failed $fail records (see errors above).<br>\n";
|
||||
} else {
|
||||
echo ".<br>\n";
|
||||
}
|
||||
if($slip > 0) {
|
||||
echo "<br>Warning: $slip permission entries didn't parse as old style permissions. Perhaps you already converted? (No harm done, we just stored their permissions as they had been.)<br>\n";
|
||||
}
|
30
header.inc.php.sample
Normal file
30
header.inc.php.sample
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare *
|
||||
* http://www.phpgroupware.org *
|
||||
* This file written by Dan Kuykendall <seek3r@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/**************************************************************************\
|
||||
* !!!!!!! EDIT THIS LINE !!!!!!!! *
|
||||
* This setting allows you to easily move the include directory *
|
||||
* simply point this to your inc dir and then edit the globalconfig.inc.php *
|
||||
* to fit your site, and you should be up and running. *
|
||||
\**************************************************************************/
|
||||
|
||||
$phpgw_info["server"]["include_root"] = "/path/to/phpGroupWare/inc";
|
||||
/* This is the basic include needed on each page for phpGroupWare application compliance */
|
||||
$phpgw_flags["htmlcompliant"] = True;
|
||||
|
||||
/**************************************************************************\
|
||||
* Do not edit this line *
|
||||
\**************************************************************************/
|
||||
include($phpgw_info["server"]["include_root"] . "/phpgwapi/phpgw.inc.php");
|
||||
?>
|
149
index.php
Executable file
149
index.php
Executable file
@ -0,0 +1,149 @@
|
||||
<?
|
||||
/**************************************************************************\
|
||||
* phpGroupWare *
|
||||
* http://www.phpgroupware.org *
|
||||
* The file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if (! $sessionid) {
|
||||
Header("Location: login.php");
|
||||
}
|
||||
|
||||
$phpgw_flags = array("noheader" => True, "nonavbar" => True, "currentapp" => "home");
|
||||
include("header.inc.php");
|
||||
// Note: I need to add checks to make sure these apps are installed.
|
||||
|
||||
if ($cd=="yes" && $phpgw_info["user"]["preferences"]["default_app"]
|
||||
&& $phpgw_info["user"]["permissions"][$phpgw_info["user"]["preferences"]["default_app"]]) {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"
|
||||
. $phpgw_info["user"]["preferences"]["default_app"]));
|
||||
exit;
|
||||
}
|
||||
$phpgw->common->header();
|
||||
$phpgw->common->navbar();
|
||||
|
||||
|
||||
if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) {
|
||||
$fp = fsockopen("phpgroupware.org",80,&$errono,&$errstr,30);
|
||||
fputs($fp,"GET /currentversion HTTP/1.0\nHOST: www.phpgroupware.org\n\n");
|
||||
if ($fp) {
|
||||
while ($line = fgets($fp,4096)) {
|
||||
$lines[] = $line;
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
for ($i=0; $i<count($lines); $i++) {
|
||||
if (ereg("currentversion",$lines[$i])) {
|
||||
$line_found = explode(":",chop($lines[$i]));
|
||||
}
|
||||
}
|
||||
if ($line_found[1] > $phpgw_info["server"]["version"]) {
|
||||
echo "<p>There is a new version of phpGroupWare avaiable. <a href=\""
|
||||
. "http://www.phpgroupware.org\">http://www.phpgroupware.org</a>";
|
||||
}
|
||||
}
|
||||
|
||||
echo '<TABLE border="0">';
|
||||
?>
|
||||
<script langague="JavaScript">
|
||||
function opennotifywindow()
|
||||
{
|
||||
window.open("<?php echo $phpgw->link("notify.php")?>", "phpGroupWare", "width=150,height=25,location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=yes");
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
//echo '<a href="javascript:opennotifywindow()">Open notify window</a>';
|
||||
|
||||
if ($phpgw_info["user"]["permissions"]["email"]
|
||||
&& $phpgw_info["user"]["preferences"]["mainscreen_showmail"]) {
|
||||
echo "<!-- Mailox info -->\n";
|
||||
|
||||
$mbox = $phpgw->msg->login();
|
||||
if (! $mbox) {
|
||||
echo "Mail error: can not open connection to mail server";
|
||||
exit;
|
||||
}
|
||||
|
||||
$mailbox_status = $phpgw->msg->status($mbox,"{" . $phpgw_info["server"]["mail_server"] . ":" . $phpgw_info["server"]["mail_port"] . "}INBOX",SA_UNSEEN);
|
||||
if ($mailbox_status->unseen == 1) {
|
||||
echo "<tr><td><A href=\"" . $phpgw->link("email/") . "\"> "
|
||||
. lang_common("You have 1 new message!") . "</A></td></tr>\n";
|
||||
}
|
||||
if ($mailbox_status->unseen > 1) {
|
||||
echo "<tr><td><A href=\"" . $phpgw->link("email/") . "\"> "
|
||||
. lang_common("You have x new messages!",$mailbox_status->unseen) . "</A></td></tr>";
|
||||
}
|
||||
echo "<!-- Mailox info -->\n";
|
||||
}
|
||||
|
||||
if ($phpgw_info["user"]["permissions"]["addressbook"]
|
||||
&& $phpgw_info["user"]["preferences"]["mainscreen_showbirthdays"]) {
|
||||
echo "<!-- Birthday info -->\n";
|
||||
$phpgw->db->query("select DISTINCT firstname,lastname from addressbook where "
|
||||
. "bday like '" . $phpgw->preferences->show_date_other("n/d",time())
|
||||
. "/%' and (owner='" . $phpgw->session->loginid . "' or access='"
|
||||
. "public')");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<tr><td>" . lang_common("Today is x's birthday!", $phpgw->db->f("firstname") . " "
|
||||
. $phpgw->db->f("lastname")) . "</td></tr>\n";
|
||||
}
|
||||
$tommorow = $phpgw->preferences->show_date_other("n/d", mktime(0,0,0,
|
||||
$phpgw->preferences->show_date_other("m",time()),
|
||||
$phpgw->preferences->show_date_other("d",time())+1,
|
||||
$phpgw->preferences->show_date_other("Y",time())) );
|
||||
$phpgw->db->query("select firstname,lastname from addressbook where "
|
||||
. "bday like '$tommorow/%' and (owner='"
|
||||
. $phpgw->session->loginid . "' or access='public')");
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<tr><td>" . lang_common("Tommorow is x's birthday.", $phpgw->db->f("firstname") . " "
|
||||
. $phpgw->db->f("lastname")) . "</td></tr>\n";
|
||||
}
|
||||
echo "<!-- Birthday info -->\n";
|
||||
}
|
||||
|
||||
// Reaccuring events have not been added yet and this needs to be updated
|
||||
// to handle global public and group events.
|
||||
|
||||
|
||||
// This is disbaled until I can convert the calendar over
|
||||
if ($phpgw_info["user"]["permissions"]["calendar"]
|
||||
&& $phpgw_info["user"]["preferences"]["mainscreen_showevents"]) {
|
||||
echo "<!-- Calendar info -->\n";
|
||||
include($phpgw_info["server"]["server_root"] . "/calendar/inc/functions.inc.php");
|
||||
$repeated_events = read_repeated_events($phpgw->session->loginid);
|
||||
$phpgw->db->query("select count(*) from webcal_entry,webcal_entry_user"
|
||||
. " where cal_date='" . $phpgw->preferences->show_date_other("Ymd", time())
|
||||
. "' and (webcal_entry_user.cal_login='" . $phpgw->session->loginid
|
||||
. "' and webcal_entry.cal_id = webcal_entry_user.cal_id) and "
|
||||
. "(cal_priority='3')");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) == 1) {
|
||||
echo "<tr><td>" . lang_common("You have 1 high priority event on your calendar today.")
|
||||
. "</td></tr>";
|
||||
}
|
||||
if ($phpgw->db->f(0) > 1) {
|
||||
echo "<tr><td>" . lang_common("You have x high priority events on your calendar "
|
||||
. "today.",$phpgw->db->f(0)) . "</td></tr>";
|
||||
}
|
||||
echo "<!-- Calendar info -->\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<TR><TD></TD></TR>
|
||||
</TABLE>
|
||||
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?>
|
||||
|
140
login.php
Executable file
140
login.php
Executable file
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Dan Kuykendall <seek3r@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags = array("disable_message_class" => True, "disable_send_class" => True,
|
||||
"disable_nextmatchs_class" => True, "disable_template_class" => True,
|
||||
"login" => True, "currentapp" => "",
|
||||
"noheader" => True
|
||||
);
|
||||
|
||||
include("header.inc.php");
|
||||
include($phpgw_info["server"]["include_root"] . "/lang/" . "en" . "_login.inc.php");
|
||||
include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php");
|
||||
|
||||
$deny_login = False;
|
||||
|
||||
$tmpl = new Template($phpgw_info["server"]["template_dir"]);
|
||||
|
||||
$tmpl->set_file(array("login" => "login.tpl",
|
||||
"login2" => "login2.tpl"));
|
||||
|
||||
// When I am updating my server, I don't want people logging in a messing
|
||||
// things up.
|
||||
|
||||
function deny_login()
|
||||
{
|
||||
global $tmpl;
|
||||
$tmpl->set_var("updating","<center>Opps! You caught us in the middle of a system"
|
||||
. " upgrade.<br>Please, check back with us shortly.</center>");
|
||||
$tmpl->parse("loginout", "login");
|
||||
$tmpl->p("loginout");
|
||||
exit;
|
||||
}
|
||||
|
||||
function show_cookie($code,$lastloginid,$new_loginid)
|
||||
{
|
||||
if ($code != 5)
|
||||
return $lastloginid;
|
||||
}
|
||||
|
||||
function check_logoutcode($code)
|
||||
{
|
||||
if ($code == "1") {
|
||||
return lang_login("You have been successfully logged out");
|
||||
}
|
||||
else if ($code == "2") {
|
||||
return lang_login("Sorry, your login has expired");
|
||||
}
|
||||
else if ($code == "5") {
|
||||
return "<font color=FF0000>" . lang_login("Bad login or password") . "</font>";
|
||||
}
|
||||
else {
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
|
||||
/* Program starts here */
|
||||
|
||||
if ($deny_login) {
|
||||
deny_login();
|
||||
}
|
||||
|
||||
if ($submit) {
|
||||
if (getenv(REQUEST_METHOD) != "POST") {
|
||||
Header("Location: " . $phpgw->link("", "cd=5"));
|
||||
}
|
||||
|
||||
$phpgw->db->query("SELECT * FROM accounts WHERE loginid = '$login' AND "
|
||||
. "passwd='" . md5($passwd) . "' AND status ='A'");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if (! $phpgw->db->f("loginid")) {
|
||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
|
||||
} else {
|
||||
// Make sure the server allows us to use cookies
|
||||
if (! $phpgw_info["server"]["usecookies"]) {
|
||||
$usecookies = False;
|
||||
}
|
||||
$phpgw->session->create($phpgw->db->f("loginid"),$passwd, $usecookies);
|
||||
|
||||
// Create the users private_dir if not exist
|
||||
/*
|
||||
$basedir = $phpgw_info["server"]["server_root"]
|
||||
. $phpgw_info["server"]["dir_separator"]
|
||||
. "filemanager"
|
||||
. $phpgw_info["server"]["dir_separator"]
|
||||
. "users"
|
||||
. $phpgw_info["server"]["dir_separator"];
|
||||
if(!is_dir($basedir . $phpgw->db->f("loginid")))
|
||||
mkdir($basedir . $phpgw->db->f("loginid"), 0707);
|
||||
*/
|
||||
// Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
// . "/", $usecookies));
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/", "cd=yes"));
|
||||
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
if ($last_loginid) {
|
||||
$phpgw->db->query("select value from preferences where owner='$last_loginid' "
|
||||
. "and name='lang'");
|
||||
$phpgw->db->next_record();
|
||||
if (! $phpgw->db->f("value")) {
|
||||
$users_lang = "en";
|
||||
// } else {
|
||||
// $users_lang = $phpgw->db->f("value");
|
||||
// include($phpgw_info["server"]["include_root"] . "/lang/$users_lang/" . $users_lang
|
||||
// . "_login.inc.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
$tmpl->set_var("login_url", $phpgw_info["server"]["webserver_url"] . "/login.php");
|
||||
$tmpl->set_var("cd",check_logoutcode($cd));
|
||||
$tmpl->set_var("cookie",show_cookie($cd,$last_loginid,$login));
|
||||
|
||||
$tmpl->set_var("lang_username",lang_login("username"));
|
||||
$tmpl->set_var("lang_password",lang_login("password"));
|
||||
$tmpl->set_var("lang_login",lang_login("login"));
|
||||
|
||||
if ($phpgw_info["server"]["usecookies"]) {
|
||||
$tmpl->set_var("use_cookies","<tr><td bgcolor=#FFFFFF height=\"25\" width=\"29%\" "
|
||||
. "colspan=\"2\">" . lang_login("use cookies") . "<input type=\"checkbox\" "
|
||||
. "name=\"usecookies\" value=\"True\"></td></tr>");
|
||||
}
|
||||
$tmpl->parse("login2out","login2");
|
||||
$tmpl->parse("loginout", "login");
|
||||
$tmpl->p("loginout");
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user