Skip to content
Snippets Groups Projects
Commit 67117f91 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #5628 compatibility with oracle

parent 2d683459
No related branches found
No related tags found
No related merge requests found
<?php <?php
/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
/*Récupération de status*/ /*Récupération de status*/
require_once 'core/class/class_manage_status.php'; require_once 'core/class/class_manage_status.php';
if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."apps".DIRECTORY_SEPARATOR."maarch_entreprise" if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."apps".DIRECTORY_SEPARATOR."maarch_entreprise"
...@@ -19,21 +27,8 @@ if ($xmlconfig <> false) { ...@@ -19,21 +27,8 @@ if ($xmlconfig <> false) {
} }
$status_obj = new manage_status(); $status_obj = new manage_status();
$db = new Database();
$status_tab = array();
$i=0; $i=0;
$status_query = "SELECT DISTINCT ON (img_filename) img_filename, id FROM status WHERE img_filename <> '' and img_filename <> 'Y' ";
$stmt = $db->query($status_query);
while ($line = $stmt->fetchObject()) {
array_push(
$status_tab,
array(
'IMG_FILENAME' => $line->img_filename,
'ID' => $line->id
)
);
}
/* Affichage */ /* Affichage */
if ($mode == 'list') { if ($mode == 'list') {
$list = new list_show(); $list = new list_show();
...@@ -172,20 +167,20 @@ if ($mode == 'up') { ...@@ -172,20 +167,20 @@ if ($mode == 'up') {
<ul style=" width: auto;text-align: left;float: left;margin-left: 40px;height: auto;overflow: auto;"> <ul style=" width: auto;text-align: left;float: left;margin-left: 40px;height: auto;overflow: auto;">
<?php <?php
$nb_status=count($status_img); $nb_status=count($status_img);
for ($i=0;$i<count($status_img);$i++) { ?> for ($i=0;$i<$nb_status;$i++) { ?>
<li style="display:inline-block;width:50px;padding:5px;" title="fm <?php functions::xecho($status_img[$i]);?>" onclick="check_status('<?php functions::xecho($nb_status);?>', '<?php functions::xecho($i);?>')"> <li style="display:inline-block;width:50px;padding:5px;" title="fm <?php functions::xecho($status_img[$i]);?>" onclick="check_status('<?php functions::xecho($nb_status);?>', '<?php functions::xecho($i);?>')">
<input type="radio" style="visibility:hidden;" id="radio_<?php functions::xecho($i);?>" class="check" name="img_related" value="<?php functions::xecho($status_img[$i])?>" <input type="radio" style="visibility:hidden;" id="radio_<?php functions::xecho($i);?>" class="check" name="img_related" value="<?php functions::xecho($status_img[$i])?>"
<?php if ($_SESSION['m_admin']['status']['img_filename'] == $status_img[$i]) { ?> checked="checked" <?php } ?> onload="check_status('<?php functions::xecho($nb_status);?>', '<?php functions::xecho($i);?>')" /><?php <?php if ($_SESSION['m_admin']['status']['img_filename'] == $status_img[$i]) { ?> checked="checked" <?php } ?> onload="check_status('<?php functions::xecho($nb_status);?>', '<?php functions::xecho($i);?>')" /><?php
$img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;'></i></label>"; $img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;'></i></label>";
if ($_SESSION['m_admin']['status']['img_filename'] == $status_img[$i]) { if ($_SESSION['m_admin']['status']['img_filename'] == $status_img[$i]) {
$img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;color:#009dc5;'></i></label>"; $img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;color:#009dc5;'></i></label>";
}else{ }else{
$img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;'></i></label>"; $img = "<label for='".$status_img[$i]."' ><i id='img_".$i."' class = 'fm ".$status_img[$i]."' style='font-size:20px;'></i></label>";
} }
echo $img; echo $img;
echo "</li>"; echo "</li>";
} ?> } ?>
</ul> </ul>
</div> </div>
......
<?php <?php
/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
core_tools::load_lang(); core_tools::load_lang();
$core_tools = new core_tools(); $core_tools = new core_tools();
$core_tools->test_admin('admin_status', 'apps'); $core_tools->test_admin('admin_status', 'apps');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment