Task #0000839: Réécriture de la procédure d'installation

Inclu en premier lieu constant.php pour avoir la bonne valeur dans include_path
Tous les tags <? ont été changés en <?php pour les servers mutualisés
This commit is contained in:
Dany De Bontridder 2013-05-16 22:13:12 +00:00
parent d714773279
commit ead69f843d
32 changed files with 61 additions and 37 deletions

View file

@ -22,6 +22,7 @@
* \brief Administration of the repository : creation of user, folder, security,
* templates... Accessible only by the administrator
*/
require_once '../include/constant.php';
require_once("user_common.php");
include_once("ac_common.php");
require_once('class_database.php');

View file

@ -7,6 +7,7 @@
* - gDossier
* - plugin_code
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once('class_user.php');
require_once('class_extension.php');

View file

@ -54,6 +54,7 @@
* - ref if we want to refresh the window
*\see fiche fiche::Save constant.php
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once ('class_fiche.php');
require_once('class_iradio.php');

View file

@ -24,6 +24,7 @@
* \brief show the history of a card of an accounting
* for the card f_id is set and for an accounting : pcm_val
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once('class_user.php');
require_once('class_dossier.php');

View file

@ -29,6 +29,7 @@
- for reconcialiation
- update of analytic content
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once('class_user.php');
require_once('class_acc_operation.php');

View file

@ -35,6 +35,7 @@
* dl : display form to modify, add and delete lettering for a given operation
*
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once ('class_fiche.php');
require_once('class_iradio.php');

View file

@ -33,6 +33,7 @@
*
*
*/
require_once '../include/constant.php';
require_once ("ac_common.php");
require_once('class_acc_ledger.php');
require_once ('class_database.php');

View file

@ -34,6 +34,7 @@
* - gDossier
* - i id
*/
require_once '../include/constant.php';
require_once ('class_dossier.php');
require_once ('class_todo_list.php');
require_once ('class_database.php');

View file

@ -19,6 +19,7 @@
/* $Revision$ */
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
require_once '../include/constant.php';
require_once("constant.php");
require_once('class_database.php');
require_once ("class_user.php");

View file

@ -31,8 +31,7 @@
* - gDossier
* Must return at least tva, htva and tvac
*/
require_once ('constant.php');
require_once '../include/constant.php';
require_once ('class_database.php');
require_once ('class_acc_compute.php');
require_once('class_dossier.php');

View file

@ -1,4 +1,5 @@
<?php
<?php
require_once '../include/constant.php';
require_once ("class_database.php");
require_once 'class_user.php';
$cn=new Database($_GET['gDossier']);

View file

@ -24,6 +24,7 @@
/**\file
* \brief Main file
*/
require_once '../include/constant.php';
require_once 'class_database.php';
require_once ('class_dossier.php');
require_once('user_common.php');

View file

@ -25,7 +25,7 @@
* act can be
*
*/
require_once '../include/constant.php';
global $g_user,$cn,$g_parameter;
require_once('class_database.php');
require_once('class_user.php');

View file

@ -24,6 +24,7 @@
* \brief this file includes the called plugin. It check first
* the security. Load several javascript files
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once('class_dossier.php');
require_once("ac_common.php");

View file

@ -33,7 +33,7 @@
* - FID is the QuickCode
*\note if the j is -1 then all the card are shown
*/
require_once '../include/constant.php';
require_once('class_own.php');
require_once ("constant.php");
require_once('class_database.php');

View file

@ -26,7 +26,7 @@
*\see ICard
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once('class_dossier.php');
/*!\brief

View file

@ -180,7 +180,8 @@ margin:1 2 1 2;
</head>
<BODY>';
$my_domain="";
require ('config.inc.php');
require_once '../include/constant.php';
require_once ('config.inc.php');
if ( strlen(domaine) > 0 )
{
$my_domain="Domaine : ".domaine;

View file

@ -17,6 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
require_once '../include/constant.php';
include_once ("ac_common.php");
require_once('constant.php');
@ -41,7 +43,7 @@ if ( isset ($_POST["p_user"] ) )
/*
* Check repository version
*/
if ( $rep->get_value('select val from version') != DBVERSIONREPO)
if ( $rep->get_value('select val from version') != DBVERSIONREPO)
{
echo alert('Version de base de données incorrectes, vous devez mettre à jour');
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=admin/setup.php\">";
@ -51,12 +53,12 @@ if ( isset ($_POST["p_user"] ) )
include_once ("class_user.php");
$User=new User($rep);
$User->Check(false,'LOGIN');
if ($g_captcha == true)
if ($g_captcha == true)
{
include("securimage/securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['captcha_code']);
if ( $valid == false )
if ( $valid == false )
{
echo alert('Code invalide');
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=index.php\">";
@ -74,7 +76,7 @@ else
* Check repository version
*/
if ( $rep->get_value('select val from version') != DBVERSIONREPO)
if ( $rep->get_value('select val from version') != DBVERSIONREPO)
{
echo alert('Version de base de données incorrectes, vous devez mettre à jour');
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"1;url=admin/setup.php\">";

View file

@ -21,6 +21,7 @@
/*! \file
* \brief Search module
*/
require_once '../include/constant.php';
require_once('class_dossier.php');
include_once("ac_common.php");
include_once ("constant.php");

View file

@ -23,7 +23,7 @@
/** \file
* \brief retrieve a document
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once("ac_common.php");
require_once( "class_document.php");

View file

@ -22,7 +22,7 @@
/*! \file
* \brief send the document template
*/
require_once '../include/constant.php';
require_once('class_database.php');
require_once("ac_common.php");

View file

@ -22,6 +22,7 @@
/*!\file
* \brief show an attach of an operation
*/
require_once '../include/constant.php';
include_once ("ac_common.php");
require_once('class_dossier.php');
$gDossier=dossier::id();

View file

@ -22,6 +22,7 @@
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
// $Revision$
require_once '../include/constant.php';
include_once ("ac_common.php");
require_once('class_database.php');
require_once('class_itext.php');

View file

@ -22,7 +22,7 @@
/*! \file
* \brief Page for the personal preference (theme, password,...)
*/
require_once '../include/constant.php';
include_once ("ac_common.php");
require_once('class_database.php');
/* Admin. Dossier */

View file

@ -297,7 +297,7 @@ function html_page_start($p_theme="", $p_script="", $p_script2="")
echo "<HEAD>
<TITLE>$title</TITLE>
<link rel=\"icon\" type=\"image/ico\" href=\"favicon.ico\" />
<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF8\">
<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\" media=\"screen\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\" media=\"print\">" .
$p_script2 . "

View file

@ -69,7 +69,7 @@ Filtre <?php echo HtmlInput::infobulle(26);echo HtmlInput::filter_table("tb_fic
</tr>
<?php if (count($array)==0) : ?>
<h2 class="notice"> Aucun résultat</h2>
<?endif?>
<?php endif?>
<?php for ($i=0;$i<$max;$i++):?>
<tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">

View file

@ -1,4 +1,5 @@
<?php
ini_set("session.auto_start","1");
/*
* This file is part of PhpCompta.
*
@ -39,6 +40,12 @@ if ( strpos($inc_path,";") != 0 ) {
$new_path=$inc_path.':'.$dirname;
$os=1; /* $os is 1 for unix */
}
set_include_path($new_path);
session_start();
/*
* Ini session
*/
global $g_captcha,$g_failed,$g_succeed;
@ -47,9 +54,9 @@ $g_failed="<span style=\"font-size:18px;color:red\">&#x2716;</span>";
$g_succeed="<span style=\"font-size:18px;color:green\">&#x2713;</span>";
/*set to none for production */
/* uncomment for production */
//define ('SVNINFO',5900);
define ('SVNINFO',5900);
$version_phpcompta=SVNINFO;
define ("DEBUG",false);
define ("DEBUG",true);
/* define ('SVNINFO',5015);
* $version_phpcompta=SVNINFO;
* define ("DEBUG",true);

View file

@ -98,14 +98,14 @@ $array=$cn->get_array($sql." ".$order);
<?php echo h($array[$i]['r_phone'])?>
</td>
<td>
<?php
<?php
$js=' onclick="stock_repo_change(\''.dossier::id().'\',\''.$array[$i]['r_id'].'\')"';
echo HtmlInput::button("mod", _("Modifier"), $js);
?>
</td>
</tr>
<?endfor;?>
<?php endfor;?>
</table>
<?php echo HtmlInput::button("show_add_depot_d", "Ajout d'un dépot", "onclick=\"$('add_depot_d').show();\"");?>
<div id="add_depot_d" class="inner_box" style="display:none">

View file

@ -32,7 +32,7 @@
<?php echo HtmlInput::submit("save_action", "Mettre à jour")?>
<?php if (isset($limit)) : ?>
<h2 class="notice">Recherche limitée à <?php echo $limit?> résultats</h2>
<?endif;?>
<?php endif;?>
<table class="result">
@ -60,7 +60,7 @@
<?php $class=($i%2==0)?' class="odd" ':' class="info"'; ?>
<tr <?php echo $class?>>
<td>
<?php
<?php
$ck=new ICheckBox('ag_id[]');
$ck->value=$a_row[$i]['ag_id'];
echo $ck->input();

View file

@ -82,7 +82,7 @@
</td>
</Tr>
</table>
<?if ($p_view != 'READ') echo $str_add_button;?>
<?php if ($p_view != 'READ') echo $str_add_button;?>
</div>
<div style="float:left;width:45%">
@ -135,7 +135,7 @@
<h4 style="display:inline">Opérations concernées</h4>
<ol>
<?php
<?php
for ($o=0;$o<count($operation);$o++)
{
if ( $p_view != 'READ')
@ -163,7 +163,7 @@
<h4 style="display:inline">Actions concernées</h4>
<ol>
<?php
<?php
$base=HtmlInput::request_to_string(array("gDossier","ac","sa","sb","sc","f_id"));
for ($o=0;$o<count($action);$o++)
{
@ -257,7 +257,7 @@ echo '</span>';
<?php if ( $p_base != 'ajax' ) :?>
<input type='button' class="button" class="noprint" value='Montrer articles' id="toggleButton" onclick='toggleShowDetail()'>
<?php endif; ?>
<?php
<?php
/**
* check if there card to show,
*/
@ -266,7 +266,7 @@ for ($i=0;$i<count($aArticle);$i++) :
if ( ($aCard[$i] != 0 && $p_view == 'READ') || $p_view != 'READ'){ $show_row=1;break;}
endfor;
?>
<?php
<?php
/*
* display detail if there card or if we are in UPDATE or NEW mode
*/
@ -297,8 +297,8 @@ endfor;
<th><?php echo _('Montant TVAC')?></th>
</tr>
<?for ($i=0;$i<count($aArticle);$i++): ?>
<?php
<?php for ($i=0;$i<count($aArticle);$i++): ?>
<?php
if ( ($aCard[$i] != 0 && $p_view == 'READ') || $p_view != 'READ'):
$show_row++;
?>
@ -344,7 +344,7 @@ function toggleShowDetail() {
</div>
<?php endif; ?>
</fieldset>
<?endif; ?>
<?php endif; ?>
<?php if ($p_view != 'READ' && $str_select_doc != '') : ?>
<fieldset class="noprint" >

View file

@ -1,4 +1,4 @@
<?php
<<?php
/*
* This file is part of PhpCompta.
@ -42,18 +42,18 @@
<?php echo HtmlInput::hidden('ur_id[]',$array[$i]['ur_id'])?>
<?php echo HtmlInput::hidden('ar_id[]',$array[$i]['r_id'])?>
</td>
<?php
<?php
$color=($array[$i]['ur_right']!='X')?"border:lightgreen 2px solid; ":"border:red 2px solid; ";
?>
<td style="<?php echo $color?>">
<?php
<?php
$isel=new ISelect("right[]");
$isel->value=$aright_value;
$isel->selected=$array[$i]['ur_right'];
echo $isel->input();?>
</td>
</tr>
<?endfor;?>
<?php endfor;?>
</table>
<?php echo HtmlInput::submit("change_stock", "Sauver")?>

View file

@ -42,18 +42,18 @@
<?php echo HtmlInput::hidden('ua_id[]',$array[$i]['ua_id'])?>
<?php echo HtmlInput::hidden('ap_id[]',$array[$i]['p_id'])?>
</td>
<?php
<?php
$color=($array[$i]['ua_right']!='X')?"border:lightgreen 2px solid; ":"border:red 2px solid; ";
?>
<td style="<?php echo $color?>">
<?php
<?php
$isel=new ISelect("right[]");
$isel->value=$aright_value;
$isel->selected=$array[$i]['ua_right'];
echo $isel->input();?>
</td>
</tr>
<?endfor;?>
<?php endfor;?>
</table>
<?php echo HtmlInput::submit("change_profile", "Sauver")?>
</form>