Example #1
0
/**
 * Displays the license (GNU GPL) as step 2, with
 * - an "I accept" button named step3 to proceed to step 3;
 * - a "Back" button named step1 to go back to the first step.
 */
function display_license_agreement()
{
    echo '<div class="RequirementHeading"><h2>' . display_step_sequence() . get_lang('Licence') . '</h2>';
    echo '<p>' . get_lang('LMSLicenseInfo') . '</p>';
    echo '<p><a href="../../documentation/license.html" target="_blank">' . get_lang('PrintVers') . '</a></p>';
    echo '</div>';
    ?>
    <div class="row">
        <div class="col-md-12">
            <pre style="overflow: auto; height: 200px; margin-top: 5px;">
                <?php 
    echo api_htmlentities(@file_get_contents(api_get_path(SYS_PATH) . 'documentation/license.txt'));
    ?>
            </pre>
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="accept" id="accept_licence" value="1" />
                    <?php 
    echo get_lang('IAccept');
    ?>
                </label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <p class="alert alert-info"><?php 
    echo get_lang('LMSMediaLicense');
    ?>
</p>
            <button type="submit" class="btn btn-default" name="step1" value="&lt; <?php 
    echo get_lang('Previous');
    ?>
" >
                <i class="fa fa-backward"> </i> <?php 
    echo get_lang('Previous');
    ?>
            </button>
            <input type="hidden" name="is_executable" id="is_executable" value="-" />
            <button type="submit" class="btn btn-success" name="step3" onclick="javascript: if(!document.getElementById('accept_licence').checked) { alert('<?php 
    echo get_lang('YouMustAcceptLicence');
    ?>
');return false;}" value="<?php 
    echo get_lang('Next');
    ?>
 &gt;" >
                <i class="fa fa-forward"> </i> <?php 
    echo get_lang('Next');
    ?>
            </button>
        </div>
    </div>

    <!-- Contact information form -->
    <div>
        <a href="javascript://" class = "advanced_parameters" >
        <span id="img_plus_and_minus">&nbsp;<img src="<?php 
    echo api_get_path(WEB_IMG_PATH);
    ?>
div_hide.gif" alt="<?php 
    echo get_lang('Hide');
    ?>
" title="<?php 
    echo get_lang('Hide');
    ?>
" style ="vertical-align:middle" />&nbsp;<?php 
    echo get_lang('ContactInformation');
    ?>
</span>
        </a>
    </div>

    <div id="id_contact_form" style="display:block">
        <div class="normal-message"><?php 
    echo get_lang('ContactInformationDescription');
    ?>
</div>
        <div id="contact_registration">
            <p><?php 
    echo get_contact_registration_form();
    ?>
</p><br />
        </div>
    </div>
    <?php 
}
/**
 * Displays the license (GNU GPL) as step 2, with
 * - an "I accept" button named step3 to proceed to step 3;
 * - a "Back" button named step1 to go back to the first step.
 */
function display_license_agreement()
{
    echo '<div class="RequirementHeading"><h2>' . display_step_sequence() . translate('Licence') . '</h2>';
    echo '<p>' . translate('DokeosLicenseInfo') . '</p>';
    echo '<p><a href="../../documentation/license.html" target="_blank">' . translate('PrintVers') . '</a></p>';
    echo '</div>';
    ?>
<table>
    <tr>
        <td>
            <p style="font-size:90%">
                <textarea cols="90" rows="7" class="span6">
                    <?php 
    echo api_htmlentities(@file_get_contents(api_get_path(SYS_PATH) . 'documentation/license.txt'));
    ?>
                </textarea></p>
        </td>
    </tr>
    <tr>
        <td>
            <label class="checkbox">
                <input type="checkbox" name="accept" id="accept_licence" value="1" autofocus="autofocus"/>
                <?php 
    echo translate('IAccept');
    ?>
            </label>
        </td>
    </tr>
    <tr>
        <td><p style="color:#666"><br/><?php 
    echo translate('DokeosArtLicense');
    ?>
</p></td>
    </tr>
    <tr>
        <td>
            <table width="100%">
                <tr>
                    <td></td>
                    <td align="center">
                        <button type="submit" class="btn back" name="step1"
                                value="&lt; <?php 
    echo translate('Previous');
    ?>
"><?php 
    echo translate('Previous');
    ?>
</button>
                        <input type="hidden" name="is_executable" id="is_executable" value="-"/>
                        <button type="submit" class="btn next" name="step3"
                                onclick="javascript: if(!document.getElementById('accept_licence').checked) { alert('<?php 
    echo translate('YouMustAcceptLicence');
    ?>
');return false;}" value="<?php 
    echo translate('Next');
    ?>
 &gt;"><?php 
    echo translate('Next');
    ?>
</button>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>

<!-- Contact information form -->
<div>

    <a href="javascript://" class="advanced_parameters">
        <span id="img_plus_and_minus">&nbsp;<img src="<?php 
    echo api_get_path(WEB_IMG_PATH);
    ?>
div_hide.gif"
                                                 alt="<?php 
    echo translate('Hide');
    ?>
"
                                                 title="<?php 
    echo translate('Hide');
    ?>
" style="vertical-align:middle"/>&nbsp;<?php 
    echo translate('ContactInformation');
    ?>
</span>
    </a>

</div>

<div id="id_contact_form" style="display:block">
    <div class="normal-message"><?php 
    echo translate('ContactInformationDescription');
    ?>
</div>
    <div id="contact_registration">
        <p><?php 
    echo get_contact_registration_form();
    ?>
</p><br/>
    </div>
</div>
<?php 
}