require_once "libs/gui_helper.class.php";
session_start();
$no = $_SESSION['no'];
?>
<html>
<body>

<form action="actions/do_save_answers.php" method="POST">

<h2>apakah anda yakin akan menyimpan jawaban untuk no <?php 
echo $no;
?>
 ? </h2>
<h2><?php 
echo $_SESSION['query'];
?>
</h2>

<?php 
echo GuiHelper::submit_button('ya', 'ya');
?>
 atau <?php 
echo GuiHelper::submit_button('tidak', 'tidak');
?>

</form>

</body>
</html>
示例#2
0
echo GuiHelper::link('sini', 'logout.php');
?>

<form action='actions/do_log_answers.php' method='POST'>

<h3>Query:</h3>

<p><?php 
echo GuiHelper::textarea('query', $query);
?>
</p>

<p><?php 
echo GuiHelper::submit_button('try', 'try');
?>
 <?php 
echo GuiHelper::submit_button('save', 'save');
?>
 </p>

</form>

<?php 
get_results($query);
?>


</body>

</html>
示例#3
0
</p>

<form action='actions/do_register.php' method='POST'>

<h2>Silakan isi data terlebih dahulu</h2>

<h3>NRP:</h3>

<p><?php 
echo GuiHelper::text_field('nrp');
?>
</p>

<h3>Asisten:</h3>

<p><?php 
echo GuiHelper::combobox('server', $asisten);
?>
</p>

<p><?php 
echo GuiHelper::submit_button('quiz');
?>
</p>

</form>

</body>

</html>
示例#4
0
 function table_with_form($action = "", $header = array(), $data = array(), $u_id = "u_id")
 {
     $return = "<form action='{$action}' method='POST'>";
     $return .= "<table>";
     $return .= "<tr>";
     foreach ($header as $key => $value) {
         if ($key == $u_id) {
             continue;
         }
         $return .= "<td>" . $key . "</td>";
     }
     $return .= "</tr>";
     foreach ($data as $row) {
         $return .= "<tr>";
         foreach ($header as $key => $value) {
             if ($key == $u_id) {
                 continue;
             }
             if (strtolower($value) == "check") {
                 $return .= "<td>" . GuiHelper::checkbox("check[]", $row[$key], $row[$u_id]) . "</td>";
             }
             if (strtolower($value) == "text") {
                 $return .= "<td>" . $row[$key] . "</td>";
             }
         }
         $return .= "</tr>";
     }
     $return .= "</table>";
     $return .= GuiHelper::submit_button();
     $return .= "</form>";
     return $return;
 }