31
neda_barna
Re: radio button
  • 2007/9/30 8:20

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


i want write this with java script
that when clci on the radiobutton that have checkbox
show me 4 checkbox
but if i dont select another radio button dont show me checkbox



32
neda_barna
Re: radio button
  • 2007/9/30 4:32

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


thx
when i use this
can i use addelement for show this
or i must use echo for show this



33
neda_barna
Re: radio button
  • 2007/9/29 10:59

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


yes
you are right
i cant write this with XOOPS form
then write this with html
$vote1_content='


  

'._REF_QUEUE_ACCEPT1.'

    

  



  



    '._REF_QUEUE_ACCEPT2.'

    

  



  



    '_REF_QUEUE_REJECT.'

    

  



  



    check1

    

  



  



    check2

    

  



  



    check3

     

    

  



  



    check4

     

  



  



    '._REF_QUEUE_RETURN.'

    

  





 

 '
;

but i dont know how can use database
please tell me
what field of data base want
it want 4 field of table for radiobutton
or it want 1 field that type of this become enum(accept1,accept2,reject,return)
please help me



34
neda_barna
Re: radio button
  • 2007/9/29 9:54

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


this program become solved
but i have new problem
i want 4 radio button
that every radio button become in a side line
like this
O hello
O goodbye
O x
O y
and i want have 4 checkbox
under the radio x
what must i do
O hello
O good bye
O x
{3 chack box}
O y
please help me
i hurry up



35
neda_barna
Re: radio button
  • 2007/9/29 4:03

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


$ism_paper=$record->getVar'ism_paper' );
 
$radio1_ele = new XoopsFormRadio(_REF_ISM_PAPER,'ism_paper',$ism_paper,1);
       
$list = array ();
       
$list ["1"] = "test 1";
       
$list ["2"] = "test 2";
       
$list ["3"] = "test 3";
       
$list ["4"] = "test 4";
       
$list ["5"] = "test 5";
       
$radio1_ele->addOptionArray ($list);
       
$form->addElement$radio1_ele );

i think it is true
but i want have a function that make a radio like this
$radio1_ele->addOptionArray (function);
that i dont make a $list = array ();
$list ["1"] = "test 1";
$list ["2"] = "test 2";
$list ["3"] = "test 3";
$list ["4"] = "test 4";
$list ["5"] = "test 5";

i make this in function
please tell me what must i do



36
neda_barna
Re: radio button
  • 2007/9/27 6:35

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


$radio1_ele = new XoopsFormRadio(_REF_ISM_PAPER,'ism_paper',$ism_paper);

is it true or no



37
neda_barna
radio button
  • 2007/9/27 5:58

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


i want a 8 radiob button like this
excellent good bad ...
1-referee O O 0 0
and i want write in query if selected one of the option
please tell me how can make radio button like that
how can write query when selected
and type of field in mysql
thx



38
neda_barna
Re: combo box
  • 2007/9/25 10:20

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


in part 1 :if ($_POST['referee']=='A')
i call a function then i have 1 form for combo box and 1 form for function

in part 2 :if ($_POST['referee']=='B')
i have 2 form 1 form for combo box and 1 form for textbox and button

now if i write code of part 2 in another file my program
working but in main file it dosent working
now if my code become like this it workin
extended_expire.php
include_once ( "header.php" );
include_once ( 
XOOPS_ROOT_PATH."/class/xoopsformloader.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/journal_referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_paper.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_record.php" );
include_once ( 
REFER_ROOT_PATH."/class/list.php" );
//include_once ( XOOPS_ROOT_PATH."/class/xoopsobject.php" );
//------------------Function referrlist

    
function refereeList$case$case_next NULL$sid NULL$withcheck FALSE  ){
    
    global 
$query$order$start$limit;

        
  
$referee_r JournalReferee::getAll$queryTRUE$order$limit$start );
    
//echo '
'; print_r( $referee_r ); echo '
'; // !!!!!!!!!! DEBUG !!!!!!!!!!!!!
    
    
$action ='extended_expire.php';
        
//$action = 'referee.php?case='.$case_next.'&case_pre='.$case.'&order='.$order.'"';
    //if ( $sid ) { $action.= '&sid='.$sid; }
 
    
$total JournalReferee::getCountAll$query ); // DEBUG!!
    //$total = count( JournalReferee::getAll( $query, FALSE ) );
    

 

        
$content '.$action.'" method="post">
          ';
    if ( 
$withcheck ) {
        
$content.= '';
        }
    
$content.= ''._REF_NAME.'
        '
._REF_FIELD.'
        '
._REF_EMAIL.'
            '
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= ''._REF_ASSIGN_JOB.' '._REF_CHAR_PIPE.'
                 '
._REF_ASSIGN_EXP.' '._REF_CHAR_PIPE.
                 '
._REF_ASSIGN_FIN.'
';
        }

    
$content.= '';
    
        
$class 'even';

        foreach ( 
$referee_r as $referee ) {

                
$uid $referee->getVar'uid' );
                
$name $referee->getVar'name' );
                
$email $referee->getVar'email' );
                
$status $referee->getStatus();
        
        
$field substr_words$referee->getVar'bio' ), );

        if ( 
) {
                } elseif ( 
) {
        } elseif ( 
) {
        } else {
            
$_status '
            
            
            
            
'.$status'assign' ].' '._REF_CHAR_PIPE. '.$status'expire' ].' '._REF_CHAR_PIPE. '.$status'finish' ].'
'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '';
        if ( 
$withcheck ) {
            
$content.= '.$uid.'"';    
        }
        
$content.= '
                    .$class.'">'.$name.'
                    .$class.'">'.$field.'
            .$class.'">'.$email.'
                    .$class.'">'.$_status.'
            '
;
                
$content.= '';

        }
           
$content.= ''
        if ( 
$withcheck ) {
              
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;
                          
$content.= '
              '
._REF_EXP.': 

    '
;

 
    
//$form.=    '  ';
    
     
$content.=' ._REF_SAVE.'" />

          '
;
    

        
               
//$content.= '
        //$content.= '    ';
        
}   
    
$content.= '';
    
    return 
$head.$content;

}
//----------------------------End Function

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;


    
//$form.=    '  ';
    
$form1 .=    ' ._REF_SAVE.'" />


        
                '
;

$caption '

            

        
'._REF_CHANGE.
'
;
$combo '
           
          
           _________ 
           '
._REF_LIST_ALLA.'
           '
._REF_LIST_KOL.'
           '
._REF_LIST_REF.'
             '
;
 
$combo .=' ._REF_BUTTON_GO.'" />
          
          '
;
echo 
$caption;
echo 
$combo;
$list1'

'._REF_SAVE1.'

'
;

if (
$_POST['referee']=='A')
{

echo 
$form;
echo 
refereeList'referee''assign'$sidTRUE  );

} elseif (
$_POST['referee']=='B')
{
$form1 '

    
     '
._REF_EXP.': 

    '
;
    
//$form.=    '  ';
    
$form1 .=    ' ._REF_SAVE.'" />


        
                '
;
echo 
$form1;


}



elseif (
$_POST['referee']=='C')
{







}

//-------------------------------------
foreach ($_POST['check'] as $chk)
{
$word=$_POST['key'];
$word1=$word 86400;
$query1="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE uid='$chk'  ";
$res=$xoopsDB->query($query1);
if(
$res){

echo 
$list1;
}
}




//------------------------------
//-------------------combo box
/**if ($_POST['referee']=='A')
{
//do something
} elseif ($_POST['referee']=='B')
{
//do something
} elseif ($_POST['referee']=='C')
{
//do something
}**/    
include_once ( XOOPS_ROOT_PATH."/footer.php" );
?>


extended_expire1.php
include_once ( "header.php" );
include_once ( 
XOOPS_ROOT_PATH."/header.php" );
include_once ( 
XOOPS_ROOT_PATH."/class/xoopsformloader.php" );
//include_once ( REFER_ROOT_PATH."/class/referee_paper.php" );
 
$form1 '';

    
    
$form1 .=    ' ._REF_RETURN.'" />


        
                '
;

    
       
$list'

'._REF_SAVE1.'

'
;
$word=$_POST['key'];
$word1=$word 86400;
// $xoopsDB->query("UPDATE ".$xoopsDB->prefix ( refree )." SET exp_date = exp_date +$word1 ");
$query="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE 1";
$res=$xoopsDB->query($query);
if(
$res){
echo 
$list;
echo 
$form1;

    

include_once ( 
XOOPS_ROOT_PATH."/footer.php" );
?>

it work

but if my code become like this
segment of if ($_POST['referee']=='B')
dont work
include_once ( "header.php" );
include_once ( 
XOOPS_ROOT_PATH."/class/xoopsformloader.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/journal_referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_paper.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_record.php" );
include_once ( 
REFER_ROOT_PATH."/class/list.php" );
//include_once ( XOOPS_ROOT_PATH."/class/xoopsobject.php" );
//------------------Function referrlist

    
function refereeList$case$case_next NULL$sid NULL$withcheck FALSE  ){
    
    global 
$query$order$start$limit;

        
  
$referee_r JournalReferee::getAll$queryTRUE$order$limit$start );
    
//echo '
'; print_r( $referee_r ); echo '
'; // !!!!!!!!!! DEBUG !!!!!!!!!!!!!
    
    
$action ='extended_expire.php';
        
//$action = 'referee.php?case='.$case_next.'&case_pre='.$case.'&order='.$order.'"';
    //if ( $sid ) { $action.= '&sid='.$sid; }
 
    
$total JournalReferee::getCountAll$query ); // DEBUG!!
    //$total = count( JournalReferee::getAll( $query, FALSE ) );
    

 

        
$content '.$action.'" method="post">
          ';
    if ( 
$withcheck ) {
        
$content.= '';
        }
    
$content.= ''._REF_NAME.'
        '
._REF_FIELD.'
        '
._REF_EMAIL.'
            '
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= ''._REF_ASSIGN_JOB.' '._REF_CHAR_PIPE.'
                 '
._REF_ASSIGN_EXP.' '._REF_CHAR_PIPE.
                 '
._REF_ASSIGN_FIN.'
';
        }

    
$content.= '';
    
        
$class 'even';

        foreach ( 
$referee_r as $referee ) {

                
$uid $referee->getVar'uid' );
                
$name $referee->getVar'name' );
                
$email $referee->getVar'email' );
                
$status $referee->getStatus();
        
        
$field substr_words$referee->getVar'bio' ), );

        if ( 
) {
                } elseif ( 
) {
        } elseif ( 
) {
        } else {
            
$_status '
            
            
            
            
'.$status'assign' ].' '._REF_CHAR_PIPE. '.$status'expire' ].' '._REF_CHAR_PIPE. '.$status'finish' ].'
'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '';
        if ( 
$withcheck ) {
            
$content.= '.$uid.'"';    
        }
        
$content.= '
                    .$class.'">'.$name.'
                    .$class.'">'.$field.'
            .$class.'">'.$email.'
                    .$class.'">'.$_status.'
            '
;
                
$content.= '';

        }
           
$content.= ''
        if ( 
$withcheck ) {
              
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;
                          
$content.= '
              '
._REF_EXP.': 

    '
;

 
    
//$form.=    '  ';
    
     
$content.=' ._REF_SAVE.'" />

          '
;
    

        
               
//$content.= '
        //$content.= '    ';
        
}   
    
$content.= '';
    
    return 
$head.$content;

}
//----------------------------End Function

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;


    
//$form.=    '  ';
    
$form1 .=    ' ._REF_SAVE.'" />


        
                '
;

$caption '

            

        
'._REF_CHANGE.
'
;
$combo '
           
          
           _________ 
           '
._REF_LIST_ALLA.'
           '
._REF_LIST_KOL.'
           '
._REF_LIST_REF.'
             '
;
 
$combo .=' ._REF_BUTTON_GO.'" />
          
          '
;
echo 
$caption;
echo 
$combo;
$list1'

'._REF_SAVE1.'

'
;

if (
$_POST['referee']=='A')
{

echo 
$form;
echo 
refereeList'referee''assign'$sidTRUE  );

} elseif (
$_POST['referee']=='B')
{
$form1 '

    
     '
._REF_EXP.': 

    '
;
    
//$form.=    '  ';
    
$form1 .=    ' ._REF_SAVE.'" />


        
                '
;
echo 
$form1;

$word=$_POST['key'];
$word1=$word 86400;
// $xoopsDB->query("UPDATE ".$xoopsDB->prefix ( refree )." SET exp_date = exp_date +$word1 ");
$query1="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE 1";
$res=$xoopsDB->query($query);
if(
$res){

echo 
$list1;

}  
}



elseif (
$_POST['referee']=='C')
{







}

//-------------------------------------
foreach ($_POST['check'] as $chk)
{
$word=$_POST['key'];
$word1=$word 86400;
$query1="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE uid='$chk'  ";
$res=$xoopsDB->query($query1);
if(
$res){

echo 
$list1;
}
}




//------------------------------
//-------------------combo box
/**if ($_POST['referee']=='A')
{
//do something
} elseif ($_POST['referee']=='B')
{
//do something
} elseif ($_POST['referee']=='C')
{
//do something
}**/    
include_once ( XOOPS_ROOT_PATH."/footer.php" );
?>



39
neda_barna
Re: combo box
  • 2007/9/25 4:53

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


ok i send for u
this is my code
i have 1 problem
please see a segment that elseif ($_POST['referee']=='B')
because my actin is expire_date it dosent work
why??
if we have 2
that action of that is equal is it problem????????
include_once ( "header.php" );
include_once ( 
XOOPS_ROOT_PATH."/class/xoopsformloader.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/journal_referee.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_paper.php" );
include_once ( 
REFER_ROOT_PATH."/class/referee_record.php" );
//include_once ( XOOPS_ROOT_PATH."/class/xoopsobject.php" );
//------------------Function referrlist

    
function refereeList$case$case_next NULL$sid NULL$withcheck FALSE  ){
    
    global 
$query$order$start$limit;

        
  
$referee_r JournalReferee::getAll$queryTRUE$order$limit$start );
    
//echo '
'; print_r( $referee_r ); echo '
'; // !!!!!!!!!! DEBUG !!!!!!!!!!!!!
    
    
$action ='extended_expire.php';
        
//$action = 'referee.php?case='.$case_next.'&case_pre='.$case.'&order='.$order.'"';
    //if ( $sid ) { $action.= '&sid='.$sid; }
 
    
$total JournalReferee::getCountAll$query ); // DEBUG!!
    //$total = count( JournalReferee::getAll( $query, FALSE ) );
    

 

        
$content '.$action.'" method="post">
          ';
    if ( 
$withcheck ) {
        
$content.= '';
        }
    
$content.= ''._REF_NAME.'
        '
._REF_FIELD.'
        '
._REF_EMAIL.'
            '
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= ''._REF_ASSIGN_JOB.' '._REF_CHAR_PIPE.'
                 '
._REF_ASSIGN_EXP.' '._REF_CHAR_PIPE.
                 '
._REF_ASSIGN_FIN.'
';
        }

    
$content.= '';
    
        
$class 'even';

        foreach ( 
$referee_r as $referee ) {

                
$uid $referee->getVar'uid' );
                
$name $referee->getVar'name' );
                
$email $referee->getVar'email' );
                
$status $referee->getStatus();
        
        
$field substr_words$referee->getVar'bio' ), );

        if ( 
) {
                } elseif ( 
) {
        } elseif ( 
) {
        } else {
            
$_status '
            
            
            
            
'.$status'assign' ].' '._REF_CHAR_PIPE. '.$status'expire' ].' '._REF_CHAR_PIPE. '.$status'finish' ].'
'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '';
        if ( 
$withcheck ) {
            
$content.= '.$uid.'"';    
        }
        
$content.= '
                    .$class.'">'.$name.'
                    .$class.'">'.$field.'
            .$class.'">'.$email.'
                    .$class.'">'.$_status.'
            '
;
                
$content.= '';

        }
           
$content.= ''
        if ( 
$withcheck ) {
              
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;
                          
$content.= '
              '
._REF_EXP.': 

    '
;

 
    
//$form.=    '  ';
    
     
$content.=' ._REF_SAVE.'" />

          '
;
    

        
               
//$content.= '
        //$content.= '    ';
        
}   
    
$content.= '';
    
    return 
$head.$content;

}
//----------------------------End Function

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'
             '
._REF_ASSIGN_ALLLIST.'
               '
;



$caption '

            

        
'._REF_CHANGE.
'
;
$combo '
           
          
           _________ 
           '
._REF_LIST_ALLA.'
           '
._REF_LIST_KOL.'
           '
._REF_LIST_UNIQE.'
             '
;
 
$combo .=' ._REF_BUTTON_GO.'" />
          
          '
;
echo 
$caption;
echo 
$combo;


if (
$_POST['referee']=='A')
{

echo 
$form;
echo 
refereeList'referee''assign'$sidTRUE  );
} elseif (
$_POST['referee']=='B')
{
$form1 '

    
     '
._REF_EXP.': 

    '
;
    
//$form.=    '  ';
    
$form1 .=    ' ._REF_SAVE.'" />


        
                '
;
echo 
$form1;
$word=$_POST['key'];
$word1=$word 86400;
// $xoopsDB->query("UPDATE ".$xoopsDB->prefix ( refree )." SET exp_date = exp_date +$word1 ");
$query="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE 1";
$xoopsDB->query($query);
if(
$xoopsDB->query($query)){
echo 
"Data was correctly inserted into DB!";
}  
}
//-------------------------------------
foreach ($_POST['check'] as $chk)
{
$word=$_POST['key'];
$word1=$word 86400;
$query="UPDATE ".$xoopsDB->prefix referee )." SET exp_date = exp_date + '$word1' WHERE uid='$chk'  ";
$res=$xoopsDB->query($query);
if(
$res){
echo 
"Data was correctly inserted into DB!";
}
}




//------------------------------
//-------------------combo box
/**if ($_POST['referee']=='A')
{
//do something
} elseif ($_POST['referee']=='B')
{
//do something
} elseif ($_POST['referee']=='C')
{
//do something
}**/    
include_once ( XOOPS_ROOT_PATH."/footer.php" );
?>



40
neda_barna
Re: combo box
  • 2007/9/24 11:03

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


this problem solved
thx for your guide




TopTop
« 1 2 3 (4) 5 6 7 »



Login

Who's Online

133 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 133


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits