Developers:HOWTO utf8 1.3.3

From OCS Inventory NG
Jump to: navigation, search

OCS Inventory - Patch your GUI to UTF8

Tx to Dominique for this patch!

preferences.php

ligne 22:

define("UTF8_DEGREE", 1 );	

ligne 791:

else if(!$toutAffiche)
{
 if (UTF8_DEGREE==1)
  echo utf8_decode($item[$chmp]);
 else
  echo $item[$chmp];
}


all_soft.php

ligne 10

if ($_POST['RESET']){ 
 unset($_POST['search']);
 unset($_POST['NBRE']);
}
require_once("preferences.php");
if (UTF8_DEGREE==1)

$_POST['search']=utf8_encode($_POST['search']);


ligne 159

$data[$i][$entete[0]]=$deb.$item ->name.$fin;
if (UTF8_DEGREE==1)
  $data[$i][$entete[0]]=utf8_decode($data[$i][$entete[0]]);

ligne 177

if (UTF8_DEGREE==1)
$value_search=utf8_decode($_POST['search']);
else
$value_search=$_POST['search'];

ligne 187

echo "<br><div align=center><table bgcolor='#66CCCC'><tr><td colspan=2 align=center >FILTRES</td>
 </tr><tr><td align=right>".$l->g(382).": <input type='input' name='search' value='".$value_search."'>


groups.php

ligne 163

if (UTF8_DEGREE==1)
$data[$i][$entete[1]]=utf8_decode($item ->description); 
else
$data[$i][$entete[1]]=$item ->description;

multicritere.php

ligne 13

include('security.php');
require_once("preferences.php");

ligne 141

		// ORIGINE $_SESSION["softs"][] = array( $_POST["act_".$i], urldecode($_POST["chm_".$i]), 
                //$_POST["ega_".$i],strtr($_POST["val_".$i],"\"","'"), strtr($_POST["val2_".$i],"\"","'"), $_POST["valreg_".$i] );
		{
			
			if (UTF8_DEGREE==1)
			{
				$_POST["val_".$i]=utf8_encode($_POST["val_".$i]);
				$_POST["val2_".$i]=utf8_encode($_POST["val2_".$i]);
				$_POST["valreg_".$i]=utf8_encode($_POST["valreg_".$i]);
			}
			
			$_SESSION["softs"][] = array( $_POST["act_".$i], urldecode($_POST["chm_".$i]), $_POST["ega_".$i],
			strtr($_POST["val_".$i],"\"","'"), strtr($_POST["val2_".$i],"\"","'"), $_POST["valreg_".$i] );
		}