<form method="post" action="module.php" id="form">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
</div>

<table cellpadding="9" cellspacing="0" >
<tr valign="top">
    <td align="right">resource_framesize:</td>
    <td>
    <input name="resource_framesize" type="text" size="5" value="<?php p($CFG->resource_framesize) ?>" />
    </td>
    <td>
    <?php print_string("configframesize", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_websearch:</td>
    <td>
    <input name="resource_websearch" type="text" size="30" value="<?php p($CFG->resource_websearch) ?>" />
    </td>
    <td>
    <?php print_string("configwebsearch", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_defaulturl:</td>
    <td>
    <input name="resource_defaulturl" type="text" size="30" value="<?php p($CFG->resource_defaulturl) ?>" />
    </td>
    <td>
    <?php print_string("configdefaulturl", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_secretphrase:</td>
    <td>
    <input name="resource_secretphrase" type="text" size="30" value="<?php p($CFG->resource_secretphrase) ?>" />
    </td>
    <td>
    <?php print_string("configsecretphrase", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_allowlocalfiles:</td>
    <td>
    <?php
        unset($choices);
        $choices["0"] = get_string("no");
        $choices["1"] = get_string("yes");
        choose_from_menu ($choices, "resource_allowlocalfiles", $CFG->resource_allowlocalfiles, "");
    ?>
    </td>
    <td>
    <?php print_string("configallowlocalfiles", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_popup:</td>
    <td>
    <?php
        unset($choices);
        $choices[""] = get_string("no");
        $choices["checked"] = get_string("yes");
        choose_from_menu ($choices, "resource_popup", $CFG->resource_popup, "");
    ?>
    </td>
    <td>
    <?php print_string("configpopup", "resource") ?>
    </td>
</tr>
<?php foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) {
          $defaultvalue = "resource_popup$optionname";
          echo "<tr valign=\"top\">";
          echo "<td align=\"right\">$defaultvalue:</td>";
          echo "<td>";
          if ($optionname == "height" or $optionname == "width") {
              echo "<input name=\"$defaultvalue\" type=\"text\" size=\"5\" value=\"".$CFG->$defaultvalue."\" />";
          } else {
              choose_from_menu ($choices, $defaultvalue, $CFG->$defaultvalue, "");
          }
          echo "</td>";
          echo "<td>";
          print_string("configpopup$optionname", "resource");
          echo "</td>";
          echo "</tr>";
      }
?>
<tr valign="top">
    <td align="right">resource_autofilerename:</td>
    <td>
    <?php
        unset($choices);
        $choices["0"] = get_string("no");
        $choices["1"] = get_string("yes");
        choose_from_menu ($choices, "resource_autofilerename", $CFG->resource_autofilerename, "");
    ?>
    </td>
    <td>
    <?php print_string("configautofilerenamesettings", "resource") ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">resource_blockdeletingfile:</td>
    <td>
    <?php
        unset($choices);
        $choices["0"] = get_string("no");
        $choices["1"] = get_string("yes");
        choose_from_menu ($choices, "resource_blockdeletingfile", $CFG->resource_blockdeletingfile, "");
    ?>
    </td>
    <td>
    <?php print_string("configblockdeletingfilesettings", "resource") ?>
    </td>
</tr>
<tr>
    <td colspan="3" align="center">
        <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>

</form>
