Constructor : set the label to the column name, the order of the column , set the properties and the permission for updating or deleting row.
Constructor : set the label to the column name, the order of the column , set the properties and the permission for updating or deleting row
<?php
ini_set('disable_functions', 'exit,die,header');
);
);
require_once NOALYSS_INCLUDE."/database/acc_plan_sql.class.php";
require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
echo " Function add_json_param : add param TestAjaxFile";
$manage_table->add_json_param(
"TestAjaxFile",NOALYSS_HOME.
"/../scenario/ajax_manage_table_sql.php");
echo " <br>";
if ( isset(
$r[
'TestAjaxFile']) &&
$r[
'TestAjaxFile'] == NOALYSS_HOME.
"/../scenario/ajax_manage_table_sql.php") { echo
"$g_succeed ok <br>";}
else {echo
"$g_failed not ok";}
echo " <br>";
$manage_table->set_col_option(
"pcm_lib",
'style="color:red;text-align:center"');
$manage_table->set_col_option(
"pcm_val",
"onclick=\"alert('toto')\" style=\"text-decoration:underline\" onmouseover=\"this.style.cursor='pointer'\"");
$manage_table->set_header_option(
"pcm_val",
"onmouseover=\"smoke.alert('Click on Poste for detail',undefined,{duration:500})\"");
function test_visible_update(
Manage_Table_SQL $p_manage_table,$p_property,$p_visible,$p_update) {
echo "$p_property VISIBLE ($p_visible)" .$p_manage_table->get_property_visible($p_property);
if ( $p_manage_table->
get_property_visible($p_property) == $p_visible) echo
"$g_succeed OK";
else echo
" $g_failed FAIL";echo
"<br>";
echo "$p_property UPDATE ($p_update)" .$p_manage_table->get_property_updatable($p_property);
if ( $p_manage_table->
get_property_updatable($p_property) == $p_update) echo
"$g_succeed OK";
else echo
"$g_failed FAIL";echo
"<br>";
}
test_visible_update(
$manage_table,
"parent_accounting", FALSE, FALSE);
test_visible_update(
$manage_table,
"parent_accounting", FALSE, TRUE);
test_visible_update(
$manage_table,
"parent_accounting", TRUE, FALSE);
test_visible_update(
$manage_table,
"parent_accounting", TRUE, TRUE);
echo "<h1>"."Icon MODIFY place"."</h1>";
echo "<h2>"." Mod left"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
echo "<h2>"." Mod right"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
echo "<h2>"." Mod first"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
echo "<h1>"."Icon DELETE place"."</h1>";
echo "<h2>"." Delete left"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
echo "<h2>"." Delete right"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
echo "<h2>"." Custom , by default show the row"."</h2>";
$manage_table->display_table(
"where pcm_val::text >= '400' order by pcm_val::text limit 10");
?>
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
if($gDossier==-1) $gDossierLogInput
this class is above tmp_pcmn_sql and is a view of tmp_pcmn
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
Purpose is to propose a librairy to display a table content and allow to update and delete row ,...
get_property_updatable($p_key)
return True if the column is updatable otherwise false
set_property_updatable($p_key, $p_value)
set a column of the data row updatable or not
get_property_visible($p_key)
return True if the column is visible otherwise false
set_property_visible($p_key, $p_value)
set a column of the data row visible or not