Merged revisions 3217-3223 via svnmerge from
svn+ssh://danydb@svn/svn/phpcompta/branches/rel510 ........ r3217 | danydb | 2010-05-16 13:10:27 +0200 (Sun, 16 May 2010) | 4 lines Update translation Cosmetic javascript bug Fix setup problem ........ r3218 | danydb | 2010-05-16 13:23:11 +0200 (Sun, 16 May 2010) | 1 line create htaccess file properly ........ r3219 | danydb | 2010-05-16 13:25:58 +0200 (Sun, 16 May 2010) | 1 line fix bug installation ........ r3220 | danydb | 2010-05-16 14:02:51 +0200 (Sun, 16 May 2010) | 1 line Fix bug due to the removal of echo_debug ........ r3221 | danydb | 2010-05-16 14:07:03 +0200 (Sun, 16 May 2010) | 1 line fix bug in bilan ........ r3222 | danydb | 2010-05-16 14:32:51 +0200 (Sun, 16 May 2010) | 1 line Cosmetic CSS popup ........ r3223 | danydb | 2010-05-16 14:37:16 +0200 (Sun, 16 May 2010) | 2 lines Javascript bugs ........
This commit is contained in:
parent
965e10bb22
commit
8a51032a7a
8 changed files with 605 additions and 32 deletions
|
|
@ -8,4 +8,4 @@
|
|||
echo "Extract"
|
||||
cd ..
|
||||
xgettext -L PHP -j --from-code=UTF-8 -p html/lang/en_US/LC_MESSAGES/ html/*.php include/*.php include/template/*.php
|
||||
xgettext -L PHP -j --from-code=UTF-8 -p html/lang/nl_NL/LC_MESSAGES/ html/*.php include/*.php include/template/*.php include/ext/stock/*.php
|
||||
# xgettext -L PHP -j --from-code=UTF-8 -p html/lang/nl_NL/LC_MESSAGES/ html/*.php include/*.php include/template/*.php include/ext/stock/*.php
|
||||
|
|
|
|||
|
|
@ -71,6 +71,15 @@ border:groove 2px blue;
|
|||
*/
|
||||
|
||||
$inc_path=get_include_path();
|
||||
/**
|
||||
*@brief create correctly the htaccess file
|
||||
*@param
|
||||
*@param
|
||||
*@return
|
||||
*@see
|
||||
*/
|
||||
function create_htaccess() {
|
||||
$inc_path=get_include_path();
|
||||
|
||||
if ( strpos($inc_path,";") != 0 ) {
|
||||
$new_path=$inc_path.';..\..\include;addon';
|
||||
|
|
@ -79,28 +88,7 @@ if ( strpos($inc_path,";") != 0 ) {
|
|||
$new_path=$inc_path.':../../include:addon';
|
||||
$os=1; /* $os is 1 for unix */
|
||||
}
|
||||
set_include_path($new_path);
|
||||
|
||||
require_once('config_file.php');
|
||||
include_once('constant.php');
|
||||
require_once('class_database.php');
|
||||
|
||||
include_once('ac_common.php');
|
||||
|
||||
if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) {
|
||||
/* if the config file is not found we propose to create one */
|
||||
if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) {
|
||||
echo '<h2 class="error"> On ne peut pas écrire dans le répertoire de phpcompta, changez-en les droits </h2>';
|
||||
exit();
|
||||
}
|
||||
|
||||
echo '<form method="post">';
|
||||
echo '<h1 class="info">Entrez les informations nécessaires à phpcompta</h1>';
|
||||
echo config_file_form();
|
||||
echo HtmlInput::submit('save_config','Sauver la configuration');
|
||||
echo '</form>';
|
||||
exit();
|
||||
}
|
||||
/* If htaccess file doesn't exists we create them here
|
||||
* if os == 1 then windows, 0 means Unix
|
||||
*/
|
||||
|
|
@ -133,17 +121,47 @@ $file='..'.DIRECTORY_SEPARATOR.'.htaccess';
|
|||
fwrite($hFile,'php_value include_path .:../../include:../include:addon'."\n");
|
||||
foreach ($array as $value ) fwrite($hFile,$value."\n");
|
||||
fclose($hFile);
|
||||
}
|
||||
|
||||
if ( strpos($inc_path,";") != 0 ) {
|
||||
$new_path=$inc_path.';..\..\include;addon';
|
||||
$os=0; /* $os is 0 for windoz */
|
||||
} else {
|
||||
$new_path=$inc_path.':../../include:addon';
|
||||
$os=1; /* $os is 1 for unix */
|
||||
}
|
||||
set_include_path($new_path);
|
||||
/* The config file is created here */
|
||||
if (isset($_POST['save_config'])) {
|
||||
require_once('config_file.php');
|
||||
$url=config_file_create($_POST,1,$os);
|
||||
echo '
|
||||
<form method="post" >
|
||||
Les informations sont sauvées vous pouvez continuer
|
||||
<input type="submit" value="Continuer">
|
||||
</form>';
|
||||
create_htaccess();
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) {
|
||||
/* if the config file is not found we propose to create one */
|
||||
if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) {
|
||||
echo '<h2 class="error"> On ne peut pas écrire dans le répertoire de phpcompta, changez-en les droits </h2>';
|
||||
exit();
|
||||
}
|
||||
|
||||
echo '<form method="post">';
|
||||
echo '<h1 class="info">Entrez les informations nécessaires à phpcompta</h1>';
|
||||
require_once('config_file.php');
|
||||
|
||||
echo config_file_form();
|
||||
echo HtmlInput::submit('save_config','Sauver la configuration');
|
||||
echo '</form>';
|
||||
exit();
|
||||
}
|
||||
create_htaccess();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// End functions
|
||||
//
|
||||
|
|
@ -155,6 +173,12 @@ echo '
|
|||
// magic_quotes_sybase = Off
|
||||
// include_path
|
||||
|
||||
?>
|
||||
<?
|
||||
require_once('config_file.php');
|
||||
include_once('constant.php');
|
||||
require_once('class_database.php');
|
||||
|
||||
?>
|
||||
<h2>Info</h2>
|
||||
Vous utilisez le domaine <?php echo domaine; ?>
|
||||
|
|
@ -255,6 +279,8 @@ if ( $Res==0) { ?>
|
|||
|
||||
<?php exit(); }
|
||||
|
||||
include_once('ac_common.php');
|
||||
|
||||
// Memory setting
|
||||
//--
|
||||
$sql="select name,setting
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
*/
|
||||
function todo_list_show(p_id) {
|
||||
var gDossier=$('gDossier').value;
|
||||
$('add_todo_list').style.top=posY+offsetY;
|
||||
$('add_todo_list').style.left=posX+offsetX;
|
||||
|
||||
try {
|
||||
var action=new Ajax.Request(
|
||||
'todo_list.php',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -623,7 +623,7 @@ div.popup_border_notitle {
|
|||
|
||||
div.popup_content {
|
||||
position:absolute;
|
||||
top:10;
|
||||
top:16;
|
||||
bottom:0;
|
||||
left:0;
|
||||
right:0;
|
||||
|
|
|
|||
|
|
@ -298,6 +298,8 @@ class Acc_Bilan {
|
|||
//echo "<br>".$form;
|
||||
$a=ParseFormula($this->db,"$buffer",$buffer,$this->from,$this->to,false);
|
||||
$b=str_replace("$","\$this->",$a);
|
||||
if ( eval("$b;") === false )
|
||||
echo_debug(__FILE__,__LINE__,"Code failed with $b");
|
||||
|
||||
|
||||
}// end read form line per line
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_
|
|||
else
|
||||
$cond="( j_date >= to_date('$p_start','DD.MM.YYYY') and j_date <= to_date('$p_end','DD.MM.YYYY'))";
|
||||
include_once("class_acc_account_ledger.php");
|
||||
while (myereg("(\[[0-9]*%*D*C*S*\])",$p_formula,$e) == true) {
|
||||
while (@ereg("(\[[0-9]*%*D*C*S*\])",$p_formula,$e) == true) {
|
||||
|
||||
// remove the [ ]
|
||||
$x=$e;
|
||||
|
|
@ -73,7 +73,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_
|
|||
// If there is a FROM clause we must recompute
|
||||
// the time cond
|
||||
|
||||
if ($p_type_date == 0 && myereg ("FROM=[0-9]+\.[0-9]+", $p_formula,$afrom) == true ){
|
||||
if ($p_type_date == 0 && @ereg ("FROM=[0-9]+\.[0-9]+", $p_formula,$afrom) == true ){
|
||||
// There is a FROM clause
|
||||
// then we must modify the cond for the periode
|
||||
$from=str_replace("FROM=","",$afrom[0]);
|
||||
|
|
@ -144,7 +144,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_
|
|||
|
||||
eval("$p_formula");
|
||||
|
||||
while (myereg("\[([0-9]+)([Tt]*)\]",trim($p_label),$e) == true) {
|
||||
while (@ereg("\[([0-9]+)([Tt]*)\]",trim($p_label),$e) == true) {
|
||||
$nom = "!!".$e[1]."!!";
|
||||
if (CheckFormula($e[0])) {
|
||||
$nom = $p_cn->get_value ( "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE $1||'%' ORDER BY pcm_val ASC LIMIT 1",array($e[1]));
|
||||
|
|
@ -196,7 +196,7 @@ function CheckFormula($p_string) {
|
|||
$p_string=str_replace("T","",$p_string);
|
||||
$p_string=str_replace("t","",$p_string);
|
||||
|
||||
if ( myereg ("^(\\$[a-zA-Z]*[0-9]*=){0,1}((\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})+ *([+-\*/])* *(\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})*)*(([+-\*/])*\\$([a-zA-Z])+[0-9]*([+-\*/])*)* *( *FROM=[0-9][0-0].20[0-9][0-9]){0,1}$",$p_string) == false)
|
||||
if ( @ereg ("^(\\$[a-zA-Z]*[0-9]*=){0,1}((\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})+ *([+-\*/])* *(\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})*)*(([+-\*/])*\\$([a-zA-Z])+[0-9]*([+-\*/])*)* *( *FROM=[0-9][0-0].20[0-9][0-9]){0,1}$",$p_string) == false)
|
||||
{
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ( ! empty ($array) ) {
|
|||
$row['tl_date'].
|
||||
'</td>'.
|
||||
'<td>'.
|
||||
'<a href="javascript:void" onclick="todo_list_show(\''.$row['tl_id'].'\')">'.
|
||||
'<a href="javascript:void(0)" onclick="todo_list_show(\''.$row['tl_id'].'\')">'.
|
||||
htmlspecialchars($row['tl_title']).
|
||||
'</a>'.
|
||||
'</td>'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue