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='<form name="form2" method="post" action="comment.php">


  <p>'
._REF_QUEUE_ACCEPT1.'

    <input name="radiobutton" type="radio" value="ACCEPT1" >

  </p>

  <p>

    '
._REF_QUEUE_ACCEPT2.'

    <input name="radiobutton" type="radio" value="ACCEPT@">

  </p>

  <p>

    '
_REF_QUEUE_REJECT.'

    <input name="radiobutton" type="radio" value="REJECT">

  </p>

  <p>

    check1

    <input type="checkbox" name="checkbox" value="checkbox">

  </p>

  <p>

    check2

    <input type="checkbox" name="checkbox2" value="checkbox">

  </p>

  <p>

    check3

    <input type="checkbox" name="checkbox3" value="checkbox"> 

    <input type="text" name="textfield">

  </p>

  <p>

    check4

    <input type="checkbox" name="checkbox4" value="checkbox"> 

  </p>

  <p>

    '
._REF_QUEUE_RETURN.'

    <input name="radiobutton" type="radio" value="RETURN">

  </p>

</form>

<p>&nbsp;</p> '
;

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
<?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 '<pre>'; print_r( $referee_r ); echo '</pre>'; // !!!!!!!!!! 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 '<form action="'.$action.'" method="post">
          <table><tr>'
;
    if ( 
$withcheck ) {
        
$content.= '<td></td>';
        }
    
$content.= '<td class="head">'._REF_NAME.'</td>
        <td class="head">'
._REF_FIELD.'</td>
        <td class="head">'
._REF_EMAIL.'</td>
            <td class="head" nowrap>'
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= '<br /><small><sup><font color="#AAAA22">'._REF_ASSIGN_JOB.'</font> '._REF_CHAR_PIPE.'
                 <font color="#CC2222">'
._REF_ASSIGN_EXP.'</font> '._REF_CHAR_PIPE.
                 <font color="#22AA22">'
._REF_ASSIGN_FIN.'</font></sup></small>';
        }

    
$content.= '</td></tr>';
    
        
$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 '<table border="0" ><tr>
            <td><b><font color="#AAAA22">'
.$status'assign' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#CC2222">'
.$status'expire' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#22AA22">'
.$status'finish' ].'</font></b></td>
            </tr></table>'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '<tr>';
        if ( 
$withcheck ) {
            
$content.= '<td class="head"><input type="checkbox" name="check[]" value="'.$uid.'"</td>';    
        }
        
$content.= '
                    <td class="'
.$class.'">'.$name.'</td>
                    <td class="'
.$class.'">'.$field.'</td>
            <td class="'
.$class.'">'.$email.'</td>
                    <td class="'
.$class.'">'.$_status.'</td>
            '
;
                
$content.= '</tr>';

        }
           
$content.= '</table><br />'
        if ( 
$withcheck ) {
              
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;
                          
$content.= '<table class="eleHead"><tr>
             <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;

 
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
     
$content.='<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>

          </tr></table>'
;
    

        
               
//$content.= '<input type="hidden" name="sid" value="'.$sid.'">
        //$content.= '    <input type="submit" class="formButton" name="assign1" value="'._REF_BUTTON_ASSIGN.'">';
        
}   
    
$content.= '</form><br />';
    
    return 
$head.$content;

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

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;


    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
$form1 .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>


        </tr></table>
                </form>'
;

$caption '<table>

            <tr class="head"><td>'
._REF_CHANGE.' </td></tr>

        </table>'
;
$combo '<form action="extended_expire.php" method="post">
           <table class="eleHead"><tr>
          <td nowrap><select name="referee">
           <option selected>_________ </option>
           <option  value="A">'
._REF_LIST_ALLA.'</option>
           <option  value="B">'
._REF_LIST_KOL.'</option>
           <option value="C">'
._REF_LIST_REF.'</option>
             </select></td>'
;
 
$combo .='<td nowrap> <input type="submit" class="formButton" name="go" value="'._REF_BUTTON_GO.'" /></td>
          </tr></table>
          </form>'
;
echo 
$caption;
echo 
$combo;
$list1'<h4><font color="red">'._REF_SAVE1.'</font></h4>';

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

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

} elseif (
$_POST['referee']=='B')
{
$form1 '<form action="extended_expire1.php" name="a" method="post">

    <table class="eleHead"><tr>
    <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
$form1 .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>


        </tr></table>
                </form>'
;
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
<?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 '<form action="extended_expire.php" method="post">';

    
    
$form1 .=    '<tr><td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_RETURN.'" /></td>


        </tr></table>
                </form>'
;

    
       
$list'<h4><font color="red">'._REF_SAVE1.'</font></h4>';
$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
<?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 '<pre>'; print_r( $referee_r ); echo '</pre>'; // !!!!!!!!!! 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 '<form action="'.$action.'" method="post">
          <table><tr>'
;
    if ( 
$withcheck ) {
        
$content.= '<td></td>';
        }
    
$content.= '<td class="head">'._REF_NAME.'</td>
        <td class="head">'
._REF_FIELD.'</td>
        <td class="head">'
._REF_EMAIL.'</td>
            <td class="head" nowrap>'
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= '<br /><small><sup><font color="#AAAA22">'._REF_ASSIGN_JOB.'</font> '._REF_CHAR_PIPE.'
                 <font color="#CC2222">'
._REF_ASSIGN_EXP.'</font> '._REF_CHAR_PIPE.
                 <font color="#22AA22">'
._REF_ASSIGN_FIN.'</font></sup></small>';
        }

    
$content.= '</td></tr>';
    
        
$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 '<table border="0" ><tr>
            <td><b><font color="#AAAA22">'
.$status'assign' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#CC2222">'
.$status'expire' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#22AA22">'
.$status'finish' ].'</font></b></td>
            </tr></table>'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '<tr>';
        if ( 
$withcheck ) {
            
$content.= '<td class="head"><input type="checkbox" name="check[]" value="'.$uid.'"</td>';    
        }
        
$content.= '
                    <td class="'
.$class.'">'.$name.'</td>
                    <td class="'
.$class.'">'.$field.'</td>
            <td class="'
.$class.'">'.$email.'</td>
                    <td class="'
.$class.'">'.$_status.'</td>
            '
;
                
$content.= '</tr>';

        }
           
$content.= '</table><br />'
        if ( 
$withcheck ) {
              
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;
                          
$content.= '<table class="eleHead"><tr>
             <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;

 
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
     
$content.='<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>

          </tr></table>'
;
    

        
               
//$content.= '<input type="hidden" name="sid" value="'.$sid.'">
        //$content.= '    <input type="submit" class="formButton" name="assign1" value="'._REF_BUTTON_ASSIGN.'">';
        
}   
    
$content.= '</form><br />';
    
    return 
$head.$content;

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

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;


    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
$form1 .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>


        </tr></table>
                </form>'
;

$caption '<table>

            <tr class="head"><td>'
._REF_CHANGE.' </td></tr>

        </table>'
;
$combo '<form action="extended_expire.php" method="post">
           <table class="eleHead"><tr>
          <td nowrap><select name="referee">
           <option selected>_________ </option>
           <option  value="A">'
._REF_LIST_ALLA.'</option>
           <option  value="B">'
._REF_LIST_KOL.'</option>
           <option value="C">'
._REF_LIST_REF.'</option>
             </select></td>'
;
 
$combo .='<td nowrap> <input type="submit" class="formButton" name="go" value="'._REF_BUTTON_GO.'" /></td>
          </tr></table>
          </form>'
;
echo 
$caption;
echo 
$combo;
$list1'<h4><font color="red">'._REF_SAVE1.'</font></h4>';

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

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

} elseif (
$_POST['referee']=='B')
{
$form1 '<form action="extended_expire.php" name="a" method="post">

    <table class="eleHead"><tr>
    <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
$form1 .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>


        </tr></table>
                </form>'
;
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 <form> that action of that is equal is it problem????????
<?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 ( 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 '<pre>'; print_r( $referee_r ); echo '</pre>'; // !!!!!!!!!! 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 '<form action="'.$action.'" method="post">
          <table><tr>'
;
    if ( 
$withcheck ) {
        
$content.= '<td></td>';
        }
    
$content.= '<td class="head">'._REF_NAME.'</td>
        <td class="head">'
._REF_FIELD.'</td>
        <td class="head">'
._REF_EMAIL.'</td>
            <td class="head" nowrap>'
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= '<br /><small><sup><font color="#AAAA22">'._REF_ASSIGN_JOB.'</font> '._REF_CHAR_PIPE.'
                 <font color="#CC2222">'
._REF_ASSIGN_EXP.'</font> '._REF_CHAR_PIPE.
                 <font color="#22AA22">'
._REF_ASSIGN_FIN.'</font></sup></small>';
        }

    
$content.= '</td></tr>';
    
        
$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 '<table border="0" ><tr>
            <td><b><font color="#AAAA22">'
.$status'assign' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#CC2222">'
.$status'expire' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#22AA22">'
.$status'finish' ].'</font></b></td>
            </tr></table>'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '<tr>';
        if ( 
$withcheck ) {
            
$content.= '<td class="head"><input type="checkbox" name="check[]" value="'.$uid.'"</td>';    
        }
        
$content.= '
                    <td class="'
.$class.'">'.$name.'</td>
                    <td class="'
.$class.'">'.$field.'</td>
            <td class="'
.$class.'">'.$email.'</td>
                    <td class="'
.$class.'">'.$_status.'</td>
            '
;
                
$content.= '</tr>';

        }
           
$content.= '</table><br />'
        if ( 
$withcheck ) {
              
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;
                          
$content.= '<table class="eleHead"><tr>
             <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;

 
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
     
$content.='<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>

          </tr></table>'
;
    

        
               
//$content.= '<input type="hidden" name="sid" value="'.$sid.'">
        //$content.= '    <input type="submit" class="formButton" name="assign1" value="'._REF_BUTTON_ASSIGN.'">';
        
}   
    
$content.= '</form><br />';
    
    return 
$head.$content;

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

include_once ( XOOPS_ROOT_PATH."/header.php" );
$form'<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;



$caption '<table>

            <tr class="head"><td>'
._REF_CHANGE.' </td></tr>

        </table>'
;
$combo '<form action="extended_expire.php" method="post">
           <table class="eleHead"><tr>
          <td nowrap><select name="referee">
           <option selected>_________ </option>
           <option  value="A">'
._REF_LIST_ALLA.'</option>
           <option  value="B">'
._REF_LIST_KOL.'</option>
           <option value="C">'
._REF_LIST_UNIQE.'</option>
             </select></td>'
;
 
$combo .='<td nowrap> <input type="submit" class="formButton" name="go" value="'._REF_BUTTON_GO.'" /></td>
          </tr></table>
          </form>'
;
echo 
$caption;
echo 
$combo;


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

echo 
$form;
echo 
refereeList'referee''assign'$sidTRUE  );
} elseif (
$_POST['referee']=='B')
{
$form1 '<form action="extended_expire.php" method="post">

    <table class="eleHead"><tr>
    <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
$form1 .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>


        </tr></table>
                </form>'
;
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

245 user(s) are online (150 user(s) are browsing Support Forums)


Members: 0


Guests: 245


more...

Donat-O-Meter

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

Latest GitHub Commits