Ojala me puedan ayudar con samba quiero implementar hide/show label y special_listbox.
estuve revisando quickcad.php de freedom y virtual.php de webadmin y e terminado algo confundido.
pagina a implementar.
sambashare.php
- File:
<?php
include_once("/var/htdocs/framework/framework.php");
$SAMBALNG = language("/var/language/samba/samba");
$html = new html();
$win = new window_simple_config();
$win->reload_command="/etc/init.d/samba restart";
$win->icon="../samba/icons/share.png";
$win->widths=array(35,85,85,85,140);
$win->file="/etc/brazilfw/samba/share.cfg";
$win->file_format="active,folder,public,write,users";
$win->caption="Samba ".$SAMBALNG["SAMBA08"];
$win->headers=array($BFWLNG["BFW0092"],$SAMBALNG["SAMBA08"],$SAMBALNG["SAMBA11"],$SAMBALNG["SAMBA05"],$BFWLNG['BFW0366']);
$win->label($BFWLNG["BFW0092"],yesno("active"),$SAMBALNG["SAMBA09"],0);
$win->label($SAMBALNG["SAMBA08"],text("folder",160,NULL,30,true),$SAMBALNG["SAMBA10"],1);
$win->label($SAMBALNG["SAMBA21"],combobox("public",100,array("yes","no"),array($SAMBALNG["SAMBA23"],$SAMBALNG["SAMBA24"])),$SAMBALNG["SAMBA12"],2);
$win->label($SAMBALNG["SAMBA22"],combobox("write",130,array("yes","no"),array($SAMBALNG["SAMBA25"],$SAMBALNG["SAMBA26"])),$SAMBALNG["SAMBA13"],3);
$win->label($BFWLNG['BFW0366'],text("users",160,NULL,100,false),$SAMBALNG["SAMBA14"]."<br>Ej1: 'user1,user3,user4'<br>Ej2: 'user7'",4);
$html->initialize();
$win->show();
$html->finalize();
?>
*al final de cada label e colocado un número.
lo que intento lograr.
HIDE/SHOW
considerando file_format="active,folder,public,write,users";
si label 2 (public-> yes) => hide label 4 y show label 3
si label 2 (public-> no) => hide label 3 y show label 4
special_listbox
En label 4 pueda usar la información de usuario /etc/brazilfw/samba/user.cfg para agregar usuarios.
muy agradecido.