2
/////////////////////////////////////////////////////////
4
// include/save_prefs.inc
6
// (C) Copyright 2001-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
8
// This file is part of IlohaMail. IlohaMail is free software released
9
// under the GPL license. See enclosed file COPYING for details, or
10
// see http://www.fsf.org/copyleft/gpl.html
12
/////////////////////////////////////////////////////////
14
/********************************************************
17
Save prefs (in $my_prefs) to back-end
18
Generate $usrPath/my_prefs.inc file.
20
"include/session_auth.inc"
21
$userPath (or $path) - user directory
24
********************************************************/
25
include_once("../include/array2php.inc");
27
if ((isset($userPath)) && (!isset($path))) $path = $userPath;
29
// save prefs into $userPath/prefs file
31
$fd=fopen($file, "w");
34
while ( list($key, $val) = each($my_prefs)){
35
fwrite($fd, $key.":".base64_encode($val)."\n");
40
// write dynamically created PHP code into $userPath/prefs.inc
41
$fp = fopen($file.".inc", "w");
43
$str = Array2PHP($my_prefs, "my_prefs");
44
fputs($fp, "<?php\n");
b'\\ No newline at end of file'