Example #1
0
    echo $k;
    ?>
_year>
	<option value=""></option>
    <?php 
    print_years();
    ?>
	</select> </TD>
    <TD align="center">
    <SELECT name=Reason<?php 
    echo $k;
    ?>
>
    <option value="4" selected> 4 </option>
    <?php 
    print_opts($reasons);
    ?>
    </SELECT>
    <img src="./images/b_help.png" style="cursor: default" onclick="window.open('./prophylactic_reasons.php?field=Reason<?php 
    echo $k;
    ?>
&Note=extra_notes_<?php 
    echo $k;
    ?>
', 'Λόγοι', 'width=450,height=300,status=yes');"/>
    </TD>
	</TR>
	<TR id="extra_notes_<?php 
    echo $k;
    ?>
" style="display: none;">
Example #2
0
    <option value=""></option>
    <?php 
print_options(12);
?>
	</select>&nbsp;
    Έτος: <select name=EndDate_year>
    <option value=""></option>
    <?php 
print_years2();
?>
    <option value=""></option>
	</select> </TD>
    <TD align="center" valign="top"><select name=Reason>
    <option value="0" selected>0</option>
    <?php 
print_opts($reasons - 1);
?>
    </select>
    <img src="./images/b_help.png" style="cursor: pointer" onclick="window.open('./hcv_other_reasons.php?field=Reason', 'Λόγοι', 'width=450,height=300,status=yes');"/>
    </TD>
	</TR>
<?php 
mysql_free_result($results);
?>
 
</TABLE>
<INPUT TYPE="SUBMIT" VALUE="Αποθήκευση Δεδομένων">
</FORM>
<hr>
<a name="view"><h3>Καταχωρημένες Θεραπείες &nbsp; <a href="#top"><small>Επιστροφή</small></a> </h3></a>
<div>
Example #3
0
function check_testcase($e, $v, $b)
{
    if (!$v && !$e && !$b) {
        echo "Need to specify which type of test to generate\n";
        print_opts();
    }
}
Example #4
0
/**
 * Function print_opts
 * To Print deep Parent-Child array into Select's Options
 * @param $ar = Array to print (must already be processed from 'array_recursive_tree' function)
 * @param $sep = separator for childern (ignore as its auto generated)
*/
function print_opts($ar, $sep = '', $ignore_key = 0)
{
    if (!is_array($ar) || count($ar) < 0) {
        return false;
    }
    foreach ($ar as $v) {
        //var_dump($v, '<br /><br />');
        if (isset($v['title'])) {
            if ($v['id'] != $ignore_key) {
                echo "<option value=\"{$v['id']}\">{$sep}{$v['title']}</option>";
            }
            //echo "<br /><br />"; //debug
        }
        if (is_array($v)) {
            foreach ($v as $k2 => $v2) {
                if (is_numeric($k2)) {
                    //var_dump($v2, '<br /><br />');
                    print_opts(array(0 => $v2), $sep . '&raquo;&nbsp;', $ignore_key);
                }
            }
        }
    }
}