mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Anyone still need this?
This commit is contained in:
parent
a89a1c9c1a
commit
044c98c83a
@ -12,76 +12,86 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
Header("Cache-Control: no-cache");
|
Header('Cache-Control: no-cache');
|
||||||
Header("Pragma: no-cache");
|
Header('Pragma: no-cache');
|
||||||
//Header("Expires: Sat, Jan 01 2000 01:01:01 GMT");
|
//Header('Expires: Sat, Jan 01 2000 01:01:01 GMT');
|
||||||
|
|
||||||
$phpgw_info["flags"]["currentapp"] = "preferences";
|
$phpgw_info = array();
|
||||||
include("../header.inc.php");
|
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'preferences';
|
||||||
if ($phpgw_info["user"]["permissions"]["anonymous"]) {
|
include('../header.inc.php');
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"));
|
|
||||||
$phpgw->common->phpgw_exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($submit) {
|
if ($GLOBALS['phpgw_info']['user']['permissions']['anonymous'])
|
||||||
if ($picture_size) {
|
{
|
||||||
$fh = fopen($picture,"r");
|
Header('Location: ' . $GLOBALS['phpgw']->link('/'));
|
||||||
$picture_raw = fread($fh,$picture_size);
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
fclose($fh);
|
}
|
||||||
|
|
||||||
$phone_number = addslashes($phone_number);
|
if ($submit)
|
||||||
$comments = addslashes($comments);
|
{
|
||||||
$title = addslashes($title);
|
if ($picture_size)
|
||||||
|
{
|
||||||
|
$fh = fopen($picture,'rb');
|
||||||
|
$picture_raw = fread($fh,$picture_size);
|
||||||
|
fclose($fh);
|
||||||
|
|
||||||
if ($phpgw_info["server"]["db_type"] == "mysql") {
|
$phone_number = addslashes($phone_number);
|
||||||
$picture_raw = addslashes($picture_raw);
|
$comments = addslashes($comments);
|
||||||
} else {
|
$title = addslashes($title);
|
||||||
$picture_raw = base64_encode($picture_raw);
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpgw->db->query("delete from profiles where owner='" . $phpgw_info["user"]["userid"] . "'");
|
if ($GLOBALS['phpgw_info']['server']['db_type'] == 'mysql')
|
||||||
|
{
|
||||||
|
$picture_raw = addslashes($picture_raw);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$picture_raw = base64_encode($picture_raw);
|
||||||
|
}
|
||||||
|
|
||||||
$phpgw->db->query("insert into profiles (owner,title,phone_number,comments,"
|
$GLOBALS['phpgw']->db->query("delete from profiles where owner='" . $GLOBALS['phpgw_info']['user']['userid'] . "'");
|
||||||
. "picture_format,picture) values ('" . $phpgw_info["user"]["userid"] . "','"
|
|
||||||
. "$title','$phone_number','$comments','$picture_type','$picture_raw')");
|
|
||||||
} else {
|
|
||||||
$phone_number = addslashes($phone_number);
|
|
||||||
$picture_raw = addslashes($picture_raw);
|
|
||||||
$comments = addslashes($comments);
|
|
||||||
$title = addslashes($title);
|
|
||||||
|
|
||||||
$phpgw->db->query("update profiles set title='$title',phone_number='$phone_number',"
|
$GLOBALS['phpgw']->db->query("insert into profiles (owner,title,phone_number,comments,"
|
||||||
. "comments='$comments' where owner='" . $phpgw_info["user"]["userid"] . "'");
|
. "picture_format,picture) values ('" . $GLOBALS['phpgw_info']['user']['userid'] . "','"
|
||||||
}
|
. "$title','$phone_number','$comments','$picture_type','$picture_raw')");
|
||||||
echo "<center>Your profile has been updated</center>";
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
$phone_number = addslashes($phone_number);
|
||||||
|
$picture_raw = addslashes($picture_raw);
|
||||||
|
$comments = addslashes($comments);
|
||||||
|
$title = addslashes($title);
|
||||||
|
|
||||||
$phpgw->db->query("select * from profiles where owner='" . $phpgw_info["user"]["userid"] . "'");
|
$GLOBALS['phpgw']->db->query("update profiles set title='$title',phone_number='$phone_number',"
|
||||||
$phpgw->db->next_record();
|
. "comments='$comments' where owner='" . $GLOBALS['phpgw_info']['user']['userid'] . "'");
|
||||||
|
}
|
||||||
|
echo '<center>Your profile has been updated</center>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$GLOBALS['phpgw']->db->query("select * from profiles where owner='" . $GLOBALS['phpgw_info']['user']['userid'] . "'");
|
||||||
|
$GLOBALS['phpgw']->db->next_record();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="POST" ENCTYPE="multipart/form-data" action="<?php echo $phpgw->link("changeprofile.php"); ?>">
|
<form method="POST" ENCTYPE="multipart/form-data" action="<?php echo $GLOBALS['phpgw']->link('/preferences/changeprofile.php'); ?>">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><?php echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]); ?></td>
|
<td colspan="2"><?php echo $GLOBALS['phpgw']->common->display_fullname($GLOBALS['phpgw_info']['user']['userid'],$GLOBALS['phpgw_info']['user']['firstname'],$GLOBALS['phpgw_info']['user']['lastname']); ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Title:</td>
|
<td>Title:</td>
|
||||||
<td><input name="title" value="<?php echo $phpgw->db->f("title"); ?>"></td>
|
<td><input name="title" value="<?php echo $GLOBALS['phpgw']->db->f('title'); ?>"></td>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
<img src="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"] . "/hr/view_image.php","con=" . $phpgw_info["user"]["con"]); ?> width="100" height="120">
|
<img src="<?php echo $GLOBALS['phpgw']->link('/hr/view_image.php','con=' . $GLOBALS['phpgw_info']['user']['con']); ?>" width="100" height="120">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Phone number:</td>
|
<td>Phone number:</td>
|
||||||
<td><input name="phone_number" value="<?php echo $phpgw->db->f("phone_number"); ?>"></td>
|
<td><input name="phone_number" value="<?php echo $GLOBALS['phpgw']->db->f('phone_number'); ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Comments:</td>
|
<td>Comments:</td>
|
||||||
<td><textarea cols="60" name="comments" rows="4" wrap="virtual"><?php echo $phpgw->db->f("comments"); ?></textarea></td>
|
<td><textarea cols="60" name="comments" rows="4" wrap="virtual"><?php echo $GLOBALS['phpgw']->db->f('comments'); ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -95,4 +105,6 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<?php $phpgw->common->phpgw_footer(); ?>
|
<?php
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||||
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user