Source for file object_config.php

Documentation is available at object_config.php

  1. <?php
  2.     /**
  3.     * Password reset 1.0 configuration form.
  4.     *
  5.     * This is a fragment of HTML which gives the form elements for configuration of a password reset object, v1.0.
  6.     * ONLY the basic form elements should be included.
  7.     * The "form" tags and submit button are already specified outside.
  8.     * The $auth_obj and $sloodleauthid variables will identify the object being configured.
  9.     *
  10.     * @package sloodleregenrol
  11.     * @copyright Copyright (c) 2007-8 Sloodle (various contributors)
  12.     * @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
  13.     *
  14.     * @contributor Peter R. Bloomfield
  15.     *
  16.     */
  17.     
  18.     // IMPORTANT: make sure this is called from within a Sloodle script
  19.     if (!defined('SLOODLE_VERSION')) {
  20.         error('Not called from within a Sloodle script.');
  21.         exit();
  22.     }
  23.     
  24.     // Execute everything within a function to ensure we don't mess up the data in the other file
  25.     sloodle_display_config_form($sloodleauthid$auth_obj);
  26.     
  27.     
  28.     
  29.     function sloodle_display_config_form($sloodleauthid$auth_obj)
  30.     {
  31.     //--------------------------------------------------------
  32.     // SETUP
  33.         
  34.         // No setup to do
  35.         
  36.     //--------------------------------------------------------
  37.     // FORM
  38.     
  39.         // Get the current object configuration
  40.         $settings SloodleController::get_object_configuration($sloodleauthid);
  41.         
  42.         // Setup our default values
  43.         $sloodlerefreshtime = (int)sloodle_get_value($settings'sloodlerefreshtime'600);
  44.  
  45.     
  46.     ///// GENERAL CONFIGURATION /////
  47.         print_box_start('generalbox boxaligncenter');
  48.         echo '<h3>'.get_string('generalconfiguration','sloodle').'</h3>';
  49.         
  50.         // Ask the user for a refresh period (# seconds between automatic updates)
  51.         echo get_string('refreshtimeseconds','sloodle').': ';
  52.         echo '<input type="text" name="sloodlerefreshtime" value="'.$sloodlerefreshtime.'" size="8" maxlength="8" />';
  53.         echo "<br><br>\n";
  54.         
  55.         print_box_end();
  56.         
  57.         
  58.     ///// ACCESS LEVELS /////
  59.         // No access levels needed
  60.         
  61.     }
  62.     
  63. ?>

Documentation generated on Fri, 17 Jul 2009 11:02:17 +0100 by phpDocumentor 1.4.0