some fixes for XHTML compliance

This commit is contained in:
gustav_delius 2004-09-12 01:34:24 +00:00
parent 0cdd138180
commit 7ef0797dea
31 changed files with 867 additions and 756 deletions

View file

@ -1,4 +1,4 @@
<?PHP <?php
if (!isset($config->auth_dbhost)) { if (!isset($config->auth_dbhost)) {
$config->auth_dbhost = "localhost"; $config->auth_dbhost = "localhost";
} }
@ -27,20 +27,20 @@
$config->auth_dbpasstype = "plaintext"; $config->auth_dbpasstype = "plaintext";
} }
?> ?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbhost:</TD> <td align="right"><p>auth_dbhost:</td>
<TD> <td>
<INPUT name=auth_dbhost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbhost?>"> <input name="auth_dbhost" type="text" size="30" value="<?php echo $config->auth_dbhost?>" />
<?php if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?> <?php if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbhost","auth") ?> <?php print_string("auth_dbhost","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtype:</TD> <td align="right"><p>auth_dbtype:</td>
<TD> <td>
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp"); <?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
foreach ($dbtypes as $dbtype) { foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype; $dboptions[$dbtype] = $dbtype;
@ -48,188 +48,188 @@
choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, ""); choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, "");
?> ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbtype","auth") ?> <?php print_string("auth_dbtype","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbname:</TD> <td align="right"><p>auth_dbname:</td>
<TD> <td>
<INPUT name=auth_dbname TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbname?>"> <input name="auth_dbname" type="text" size="30" value="<?php echo $config->auth_dbname?>" />
<?php if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?> <?php if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbname","auth") ?> <?php print_string("auth_dbname","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbuser:</TD> <td align="right"><p>auth_dbuser:</td>
<TD> <td>
<INPUT name=auth_dbuser TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbuser?>"> <input name="auth_dbuser" type="text" size="30" value="<?php echo $config->auth_dbuser?>" />
<?php if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?> <?php if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbuser","auth") ?> <?php print_string("auth_dbuser","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpass:</TD> <td align="right"><p>auth_dbpass:</td>
<TD> <td>
<INPUT name="auth_dbpass" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbpass?>"> <input name="auth_dbpass" type="text" size="30" value="<?php echo $config->auth_dbpass?>" />
<?php if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?> <?php if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbpass","auth") ?> <?php print_string("auth_dbpass","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtable:</TD> <td align="right"><p>auth_dbtable:</td>
<TD> <td>
<INPUT name="auth_dbtable" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbtable?>"> <input name="auth_dbtable" type="text" size="30" value="<?php echo $config->auth_dbtable?>" />
<?php if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?> <?php if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbtable","auth") ?> <?php print_string("auth_dbtable","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfielduser:</TD> <td align="right"><p>auth_dbfielduser:</td>
<TD> <td>
<INPUT name="auth_dbfielduser" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbfielduser?>"> <input name="auth_dbfielduser" type="text" size="30" value="<?php echo $config->auth_dbfielduser?>" />
<?php if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?> <?php if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbfielduser","auth") ?> <?php print_string("auth_dbfielduser","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfieldpass:</TD> <td align="right"><p>auth_dbfieldpass:</td>
<TD> <td>
<INPUT name="auth_dbfieldpass" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbfieldpass?>"> <input name="auth_dbfieldpass" type="text" size="30" value="<?php echo $config->auth_dbfieldpass?>" />
<?php if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?> <?php if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbfieldpass","auth") ?> <?php print_string("auth_dbfieldpass","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpasstype:</TD> <td align="right"><p>auth_dbpasstype:</td>
<TD> <td>
<?php $passtype["plaintext"] = get_string("plaintext", "auth"); <?php $passtype["plaintext"] = get_string("plaintext", "auth");
$passtype["md5"] = get_string("md5", "auth"); $passtype["md5"] = get_string("md5", "auth");
choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, ""); choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, "");
?> ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_dbpasstype","auth") ?> <?php print_string("auth_dbpasstype","auth") ?>
</TD> </td>
</TR> </tr>
<TR> <tr>
<TD ALIGN=RIGHT><P><?php print_string("firstname") ?>:</TD> <td align="right"><p><?php print_string("firstname") ?>:</td>
<TD> <td>
<INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_firstname?>"> <input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</TD> </td>
<TD rowspan=12 VALIGN=CENTER> <td rowspan="12" valign="center">
<?php print_string("auth_dbextrafields","auth") ?> <?php print_string("auth_dbextrafields","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("lastname") ?>:</TD> <td align="right"><p><?php print_string("lastname") ?>:</td>
<TD> <td>
<INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lastname?>"> <input name="auth_user_lastname" type="text" size="30" value="<?php echo $config->auth_user_lastname?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("email") ?>:</TD> <td align="right"><p><?php print_string("email") ?>:</td>
<TD> <td>
<INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_email?>"> <input name="auth_user_email" type="text" size="30" value="<?php echo $config->auth_user_email?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 1:</TD> <td align="right"><p><?php print_string("phone") ?> 1:</td>
<TD> <td>
<INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone1?>"> <input name="auth_user_phone1" type="text" size="30" value="<?php echo $config->auth_user_phone1?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 2:</TD> <td align="right"><p><?php print_string("phone") ?> 2:</td>
<TD> <td>
<INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone2?>"> <input name="auth_user_phone2" type="text" size="30" value="<?php echo $config->auth_user_phone2?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("department") ?>:</TD> <td align="right"><p><?php print_string("department") ?>:</td>
<TD> <td>
<INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_department?>"> <input name="auth_user_department" type="text" size="30" value="<?php echo $config->auth_user_department?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("address") ?>:</TD> <td align="right"><p><?php print_string("address") ?>:</td>
<TD> <td>
<INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_address?>"> <input name="auth_user_address" type="text" size="30" value="<?php echo $config->auth_user_address?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("city") ?>:</TD> <td align="right"><p><?php print_string("city") ?>:</td>
<TD> <td>
<INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_city?>"> <input name="auth_user_city" type="text" size="30" value="<?php echo $config->auth_user_city?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("country") ?>:</TD> <td align="right"><p><?php print_string("country") ?>:</td>
<TD> <td>
<INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_country?>"> <input name="auth_user_country" type="text" size="30" value="<?php echo $config->auth_user_country?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("description") ?>:</TD> <td align="right"><p><?php print_string("description") ?>:</td>
<TD> <td>
<INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_description?>"> <input name="auth_user_description" type="text" size="30" value="<?php echo $config->auth_user_description?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("idnumber") ?>:</TD> <td align="right"><p><?php print_string("idnumber") ?>:</td>
<TD> <td>
<INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_idnumber?>"> <input name="auth_user_idnumber" type="text" size="30" value="<?php echo $config->auth_user_idnumber?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("language") ?>:</TD> <td align="right"><p><?php print_string("language") ?>:</td>
<TD> <td>
<INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lang?>"> <input name="auth_user_lang" type="text" size="30" value="<?php echo $config->auth_user_lang?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// Authentication by looking up an external database table // Authentication by looking up an external database table

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// Standard authentication function // Standard authentication function
function auth_user_login ($username, $password) { function auth_user_login ($username, $password) {

View file

@ -1,84 +1,168 @@
<?PHP <?php
if (!isset($config->auth_fchost)) {
$config->auth_fchost = "127.0.0.1"; if (!isset($config->auth_fchost)) {
}
if (!isset($config->auth_fcfppport)) { $config->auth_fchost = "127.0.0.1";
$config->auth_fcfppport = "3333";
} }
if (!isset($config->auth_fcuserid)) {
$config->auth_fcuserid = "fcMoodle"; if (!isset($config->auth_fcfppport)) {
}
if (!isset($config->auth_fcpasswd)) { $config->auth_fcfppport = "3333";
$config->auth_fcpasswd = "";
} }
if (!isset($config->auth_fccreators)) {
$config->auth_fccreators = ""; if (!isset($config->auth_fcuserid)) {
}
?> $config->auth_fcuserid = "fcMoodle";
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> }
<TD ALIGN=RIGHT><P>auth_fchost:</TD>
<TD> if (!isset($config->auth_fcpasswd)) {
<INPUT name=auth_fchost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fchost?>">
<?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?> $config->auth_fcpasswd = "";
</TD>
<TD> }
<?php print_string("auth_fchost","auth") ?>
</TD> if (!isset($config->auth_fccreators)) {
</TR>
$config->auth_fccreators = "";
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcfppport:</TD> }
<TD>
<INPUT name=auth_fcfppport TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fcfppport?>"> ?>
<?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD>
<?php print_string("auth_fcfppport","auth") ?> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
</TD>
</TR> <td align="right"><p>auth_fchost:</td>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <td>
<TD ALIGN=RIGHT><P>auth_fcuserid:</TD>
<TD> <input name="auth_fchost" type="text" size="30" value="<?php echo $config->auth_fchost?>" />
<INPUT name=auth_fcuserid TYPE=text SIZE=30 MAXLENGTH=15 VALUE="<?php echo $config->auth_fcuserid?>">
<?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?> <?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD> </td>
<?php print_string("auth_fcuserid","auth") ?>
</TD> <td>
</TR>
<?php print_string("auth_fchost","auth") ?>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcpasswd:</TD> </td>
<TD>
<INPUT name=auth_fcpasswd TYPE=password SIZE=30 MAXLENGTH=12 VALUE="<?php echo $config->auth_fcpasswd?>"> </tr>
<?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
</TD>
<TD>
<?php print_string("auth_fcpasswd","auth") ?> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
</TD>
</TR> <td align="right"><p>auth_fcfppport:</td>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <td>
<TD ALIGN=RIGHT><P>auth_fccreators:</TD>
<TD> <input name="auth_fcfppport" type="text" size="30" value="<?php echo $config->auth_fcfppport?>" />
<INPUT name=auth_fccreators TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fccreators?>">
<?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?> <?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD> </td>
<?php print_string("auth_fccreators","auth") ?>
</TD> <td>
</TR>
<?php print_string("auth_fcfppport","auth") ?>
<TR VALIGN=TOP> </td>
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD>
<TD> </tr>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<?php print_string("authinstructions","auth") ?> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<?php helpbutton("text", get_string("helptext")) ?>
</TD> <td align="right"><p>auth_fcuserid:</td>
</TR>
<td>
<input name="auth_fcuserid" type="text" size="30" maxlength="15" value="<?php echo $config->auth_fcuserid?>" />
<?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?>
</td>
<td>
<?php print_string("auth_fcuserid","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_fcpasswd:</td>
<td>
<input name="auth_fcpasswd" type="password" size="30" maxlength="12" value="<?php echo $config->auth_fcpasswd?>" />
<?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
</td>
<td>
<?php print_string("auth_fcpasswd","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_fccreators:</td>
<td>
<input name="auth_fccreators" type="text" size="30" value="<?php echo $config->auth_fccreators?>" />
<?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?>
</td>
<td>
<?php print_string("auth_fccreators","auth") ?>
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<td>
<textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</td>
<td>
<?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?>
</td>
</tr>

View file

@ -1,4 +1,4 @@
<?PHP <?php
if (!isset($config->auth_imaphost)) { if (!isset($config->auth_imaphost)) {
$config->auth_imaphost = "127.0.0.1"; $config->auth_imaphost = "127.0.0.1";
} }
@ -9,51 +9,51 @@
$config->auth_imapport = "143"; $config->auth_imapport = "143";
} }
?> ?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaphost:</TD> <td align="right"><p>auth_imaphost:</td>
<TD> <td>
<INPUT name=auth_imaphost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_imaphost?>"> <input name="auth_imaphost" type="text" size="30" value="<?php echo $config->auth_imaphost?>" />
<?php if (isset($err["auth_imaphost"])) formerr($err["auth_imaphost"]); ?> <?php if (isset($err["auth_imaphost"])) formerr($err["auth_imaphost"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_imaphost","auth") ?> <?php print_string("auth_imaphost","auth") ?>
<?php print_string("auth_multiplehosts","auth") ?> <?php print_string("auth_multiplehosts","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaptype:</TD> <td align="right"><p>auth_imaptype:</td>
<TD> <td>
<?php $imaptypes = array("imap","imapssl", "imapcert", "imaptls"); <?php $imaptypes = array("imap","imapssl", "imapcert", "imaptls");
foreach($imaptypes as $imaptype) { foreach($imaptypes as $imaptype) {
$imapoptions[$imaptype] = $imaptype; $imapoptions[$imaptype] = $imaptype;
} }
choose_from_menu($imapoptions, "auth_imaptype", $config->auth_imaptype, ""); choose_from_menu($imapoptions, "auth_imaptype", $config->auth_imaptype, "");
?> ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_imaptype","auth") ?> <?php print_string("auth_imaptype","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imapport:</TD> <td align="right"><p>auth_imapport:</td>
<TD> <td>
<INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?php echo $config->auth_imapport?>"> <input name="auth_imapport" type="text" size="6" value="<?php echo $config->auth_imapport?>" />
<?php if (isset($err["auth_imapport"])) formerr($err["auth_imapport"]); ?> <?php if (isset($err["auth_imapport"])) formerr($err["auth_imapport"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_imapport","auth") ?> <?php print_string("auth_imapport","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// Authentication by looking up an IMAP server // Authentication by looking up an IMAP server
function auth_user_login ($username, $password) { function auth_user_login ($username, $password) {

View file

@ -1,4 +1,4 @@
<?PHP <?php
if (!isset($config->ldap_host_url)) { if (!isset($config->ldap_host_url)) {
$config->ldap_host_url = ""; $config->ldap_host_url = "";
} }
@ -37,231 +37,231 @@
} }
?> ?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_host_url:</TD> <td align="right"><p>ldap_host_url:</td>
<TD> <td>
<INPUT name=ldap_host_url TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_host_url?>"> <input name="ldap_host_url" type="text" size="30" value="<?php echo $config->ldap_host_url?>" />
<?php if (isset($err["ldap_host_url"])) formerr($err["ldap_host_url"]); ?> <?php if (isset($err["ldap_host_url"])) formerr($err["ldap_host_url"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_host_url","auth") ?> <?php print_string("auth_ldap_host_url","auth") ?>
</TD> </td>
</TR> </tr>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_version:</TD> <td align="right"><p>ldap_version:</td>
<TD> <td>
<?php <?php
$versions[2] = "2"; $versions[2] = "2";
$versions[3] = "3"; $versions[3] = "3";
choose_from_menu($versions, "ldap_version", $config->ldap_version, ""); choose_from_menu($versions, "ldap_version", $config->ldap_version, "");
if (isset($err["ldap_version"])) formerr($err["ldap_version"]); if (isset($err["ldap_version"])) formerr($err["ldap_version"]);
?> ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_version","auth") ?> <?php print_string("auth_ldap_version","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_contexts:</TD> <td align="right"><p>ldap_contexts:</td>
<TD> <td>
<INPUT name=ldap_contexts TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_contexts?>"> <input name="ldap_contexts" type="text" size="30" value="<?php echo $config->ldap_contexts?>" />
<?php if (isset($err["ldap_contexts"])) formerr($err["ldap_contexts"]); ?> <?php if (isset($err["ldap_contexts"])) formerr($err["ldap_contexts"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_contexts","auth") ?> <?php print_string("auth_ldap_contexts","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_user_attribute:</TD> <td align="right"><p>ldap_user_attribute:</td>
<TD> <td>
<INPUT name=ldap_user_attribute TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_user_attribute?>"> <input name="ldap_user_attribute" type="text" size="30" value="<?php echo $config->ldap_user_attribute?>" />
<?php if (isset($err["ldap_user_attribute"])) formerr($err["ldap_user_attribute"]); ?> <?php if (isset($err["ldap_user_attribute"])) formerr($err["ldap_user_attribute"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_user_attribute","auth") ?> <?php print_string("auth_ldap_user_attribute","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_objectclass:</TD> <td align="right"><p>ldap_objectclass:</td>
<TD> <td>
<INPUT name=ldap_objectclass TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_objectclass?>"> <input name="ldap_objectclass" type="text" size="30" value="<?php echo $config->ldap_objectclass?>" />
<?php if (isset($err["ldap_objectclass"])) formerr($err["ldap_objectclass"]); ?> <?php if (isset($err["ldap_objectclass"])) formerr($err["ldap_objectclass"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_objectclass","auth") ?> <?php print_string("auth_ldap_objectclass","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_search_sub:</TD> <td align="right"><p>ldap_search_sub:</td>
<TD> <td>
<INPUT name=ldap_search_sub TYPE=text SIZE=1 VALUE="<?php echo $config->ldap_search_sub?>"> <input name="ldap_search_sub" type="text" size="1" value="<?php echo $config->ldap_search_sub?>" />
<?php if (isset($err["ldap_search_sub"])) formerr($err["ldap_search_sub"]); ?> <?php if (isset($err["ldap_search_sub"])) formerr($err["ldap_search_sub"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_ldap_search_sub","auth") ?> <?php print_string("auth_ldap_search_sub","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_bind_dn:</TD> <td align="right"><p>ldap_bind_dn:</td>
<TD> <td>
<INPUT name=ldap_bind_dn TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_bind_dn?>"> <input name="ldap_bind_dn" type="text" size="30" value="<?php echo $config->ldap_bind_dn?>" />
<?php if (isset($err["ldap_bind_dn"])) formerr($err["ldap_bind_dn"]); ?> <?php if (isset($err["ldap_bind_dn"])) formerr($err["ldap_bind_dn"]); ?>
</TD><TD> </td><td>
<?php print_string("auth_ldap_bind_dn","auth") ?> <?php print_string("auth_ldap_bind_dn","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_bind_pw:</TD> <td align="right"><p>ldap_bind_pw:</td>
<TD> <td>
<INPUT name=ldap_bind_pw TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_bind_pw?>"> <input name="ldap_bind_pw" type="text" size="30" value="<?php echo $config->ldap_bind_pw?>" />
<?php if (isset($err["ldap_bind_pw"])) formerr($err["ldap_bind_pw"]); ?> <?php if (isset($err["ldap_bind_pw"])) formerr($err["ldap_bind_pw"]); ?>
</TD><TD> </td><td>
<?php print_string("auth_ldap_bind_pw","auth") ?> <?php print_string("auth_ldap_bind_pw","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_memberattribute:</TD> <td align="right"><p>ldap_memberattribute:</td>
<TD> <td>
<INPUT name=ldap_memberattribute TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_memberattribute?>"> <input name="ldap_memberattribute" type="text" size="30" value="<?php echo $config->ldap_memberattribute?>" />
<?php if (isset($err["ldap_memberattribute"])) formerr($err["ldap_memberattribute"]); ?> <?php if (isset($err["ldap_memberattribute"])) formerr($err["ldap_memberattribute"]); ?>
</TD><TD> </td><td>
<?php print_string("auth_ldap_memberattribute","auth") ?> <?php print_string("auth_ldap_memberattribute","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_creators:</TD> <td align="right"><p>ldap_creators:</td>
<TD> <td>
<INPUT name=ldap_creators TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_creators?>"> <input name="ldap_creators" type="text" size="30" value="<?php echo $config->ldap_creators?>" />
<?php if (isset($err["ldap_creators"])) formerr($err["ldap_creators"]); ?> <?php if (isset($err["ldap_creators"])) formerr($err["ldap_creators"]); ?>
</TD><TD> </td><td>
<?php print_string("auth_ldap_creators","auth") ?> <?php print_string("auth_ldap_creators","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_create_context:</TD> <td align="right"><p>ldap_create_context:</td>
<TD> <td>
<INPUT name=ldap_create_context TYPE=text SIZE=30 VALUE="<?php echo $config->ldap_create_context?>"> <input name="ldap_create_context" type="text" size="30" value="<?php echo $config->ldap_create_context?>" />
<?php if (isset($err["ldap_create_context"])) formerr($err["ldap_create_context"]); ?> <?php if (isset($err["ldap_create_context"])) formerr($err["ldap_create_context"]); ?>
</TD><TD> </td><td>
<?php print_string("auth_ldap_create_context","auth") ?> <?php print_string("auth_ldap_create_context","auth") ?>
</TD> </td>
</TR> </tr>
<TR> <tr>
<TD ALIGN=RIGHT><P><?php print_string("firstname") ?>:</TD> <td align="right"><p><?php print_string("firstname") ?>:</td>
<TD> <td>
<INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_firstname?>"> <input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</TD> </td>
<TD rowspan=12 VALIGN=CENTER> <td rowspan="12" valign="center">
<?php print_string("auth_ldapextrafields","auth") ?> <?php print_string("auth_ldapextrafields","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("lastname") ?>:</TD> <td align="right"><p><?php print_string("lastname") ?>:</td>
<TD> <td>
<INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lastname?>"> <input name="auth_user_lastname" type="text" size="30" value="<?php echo $config->auth_user_lastname?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("email") ?>:</TD> <td align="right"><p><?php print_string("email") ?>:</td>
<TD> <td>
<INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_email?>"> <input name="auth_user_email" type="text" size="30" value="<?php echo $config->auth_user_email?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 1:</TD> <td align="right"><p><?php print_string("phone") ?> 1:</td>
<TD> <td>
<INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone1?>"> <input name="auth_user_phone1" type="text" size="30" value="<?php echo $config->auth_user_phone1?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 2:</TD> <td align="right"><p><?php print_string("phone") ?> 2:</td>
<TD> <td>
<INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone2?>"> <input name="auth_user_phone2" type="text" size="30" value="<?php echo $config->auth_user_phone2?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("department") ?>:</TD> <td align="right"><p><?php print_string("department") ?>:</td>
<TD> <td>
<INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_department?>"> <input name="auth_user_department" type="text" size="30" value="<?php echo $config->auth_user_department?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("address") ?>:</TD> <td align="right"><p><?php print_string("address") ?>:</td>
<TD> <td>
<INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_address?>"> <input name="auth_user_address" type="text" size="30" value="<?php echo $config->auth_user_address?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("city") ?>:</TD> <td align="right"><p><?php print_string("city") ?>:</td>
<TD> <td>
<INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_city?>"> <input name="auth_user_city" type="text" size="30" value="<?php echo $config->auth_user_city?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("country") ?>:</TD> <td align="right"><p><?php print_string("country") ?>:</td>
<TD> <td>
<INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_country?>"> <input name="auth_user_country" type="text" size="30" value="<?php echo $config->auth_user_country?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("description") ?>:</TD> <td align="right"><p><?php print_string("description") ?>:</td>
<TD> <td>
<INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_description?>"> <input name="auth_user_description" type="text" size="30" value="<?php echo $config->auth_user_description?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("idnumber") ?>:</TD> <td align="right"><p><?php print_string("idnumber") ?>:</td>
<TD> <td>
<INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_idnumber?>"> <input name="auth_user_idnumber" type="text" size="30" value="<?php echo $config->auth_user_idnumber?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("language") ?>:</TD> <td align="right"><p><?php print_string("language") ?>:</td>
<TD> <td>
<INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lang?>"> <input name="auth_user_lang" type="text" size="30" value="<?php echo $config->auth_user_lang?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("guid") ?>:</TD> <td align="right"><p><?php print_string("guid") ?>:</td>
<TD> <td>
<INPUT name="auth_user_guid" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_guid?>"> <input name="auth_user_guid" type="text" size="30" value="<?php echo $config->auth_user_guid?>" />
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
//CHANGELOG: //CHANGELOG:
//15.08.2004 Added support for user syncronization //15.08.2004 Added support for user syncronization
//24.02.2003 Added support for coursecreators //24.02.2003 Added support for coursecreators

View file

@ -1,11 +1,11 @@
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// manual method - Just does a simple check against the database // manual method - Just does a simple check against the database
function auth_user_login ($username, $password) { function auth_user_login ($username, $password) {

View file

@ -1,4 +1,4 @@
<?PHP <?php
if (!isset($config->auth_nntphost)) { if (!isset($config->auth_nntphost)) {
$config->auth_nntphost = "127.0.0.1"; $config->auth_nntphost = "127.0.0.1";
} }
@ -7,36 +7,36 @@
} }
?> ?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntphost:</TD> <td align="right"><p>auth_nntphost:</td>
<TD> <td>
<INPUT name="auth_nntphost" TYPE="text" SIZE=30 VALUE="<?php echo $config->auth_nntphost?>"> <input name="auth_nntphost" type="text" size="30" value="<?php echo $config->auth_nntphost?>" />
<?php if (isset($err["auth_nntphost"])) formerr($err["auth_nntphost"]); ?> <?php if (isset($err["auth_nntphost"])) formerr($err["auth_nntphost"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_nntphost","auth") ?> <?php print_string("auth_nntphost","auth") ?>
<?php print_string("auth_multiplehosts","auth") ?> <?php print_string("auth_multiplehosts","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntpport:</TD> <td align="right"><p>auth_nntpport:</td>
<TD> <td>
<INPUT name=auth_nntpport TYPE=text SIZE=6 VALUE="<?php echo $config->auth_nntpport?>"> <input name="auth_nntpport" type="text" size="6" value="<?php echo $config->auth_nntpport?>" />
<?php if (isset($err["auth_nntpport"])) formerr($err["auth_nntpport"]); ?> <?php if (isset($err["auth_nntpport"])) formerr($err["auth_nntpport"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_nntpport","auth") ?> <?php print_string("auth_nntpport","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// Authentication by looking up an NNTP server // Authentication by looking up an NNTP server

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// No authentication at all. This method approves everything! // No authentication at all. This method approves everything!
function auth_user_login ($username, $password) { function auth_user_login ($username, $password) {

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
if (!isset($config->auth_pop3host)) { if (!isset($config->auth_pop3host)) {
$config->auth_pop3host = "127.0.0.1"; $config->auth_pop3host = "127.0.0.1";
} }
@ -12,62 +12,62 @@
$config->auth_pop3mailbox = "INBOX"; $config->auth_pop3mailbox = "INBOX";
} }
?> ?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3host:</TD> <td align="right"><p>auth_pop3host:</td>
<TD> <td>
<INPUT name=auth_pop3host TYPE=text SIZE=30 VALUE="<?php echo $config->auth_pop3host?>"> <input name="auth_pop3host" type="text" size="30" value="<?php echo $config->auth_pop3host?>" />
<?php if (isset($err["auth_pop3host"])) formerr($err["auth_pop3host"]); ?> <?php if (isset($err["auth_pop3host"])) formerr($err["auth_pop3host"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_pop3host","auth") ?> <?php print_string("auth_pop3host","auth") ?>
<?php print_string("auth_multiplehosts","auth") ?> <?php print_string("auth_multiplehosts","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3type:</TD> <td align="right"><p>auth_pop3type:</td>
<TD> <td>
<?php $pop3types = array("pop3","pop3cert", "pop3notls"); <?php $pop3types = array("pop3","pop3cert", "pop3notls");
foreach($pop3types as $pop3type) { foreach($pop3types as $pop3type) {
$pop3options[$pop3type] = $pop3type; $pop3options[$pop3type] = $pop3type;
} }
choose_from_menu($pop3options, "auth_pop3type", $config->auth_pop3type, ""); choose_from_menu($pop3options, "auth_pop3type", $config->auth_pop3type, "");
?> ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_pop3type","auth") ?> <?php print_string("auth_pop3type","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3port:</TD> <td align="right"><p>auth_pop3port:</td>
<TD> <td>
<INPUT name=auth_pop3port TYPE=text SIZE=6 VALUE="<?php echo $config->auth_pop3port?>"> <input name="auth_pop3port" type="text" size="6" value="<?php echo $config->auth_pop3port?>" />
<?php if (isset($err["auth_pop3port"])) formerr($err["auth_pop3port"]); ?> <?php if (isset($err["auth_pop3port"])) formerr($err["auth_pop3port"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_pop3port","auth") ?> <?php print_string("auth_pop3port","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>"> <tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3mailbox:</TD> <td align="right"><p>auth_pop3mailbox:</td>
<TD> <td>
<INPUT name=auth_pop3mailbox TYPE=text SIZE=6 VALUE="<?php echo $config->auth_pop3mailbox?>"> <input name="auth_pop3mailbox" type="text" size="6" value="<?php echo $config->auth_pop3mailbox?>" />
<?php if (isset($err["auth_pop3mailbox"])) formerr($err["auth_pop3mailbox"]); ?> <?php if (isset($err["auth_pop3mailbox"])) formerr($err["auth_pop3mailbox"]); ?>
</TD> </td>
<TD> <td>
<?php print_string("auth_pop3mailbox","auth") ?> <?php print_string("auth_pop3mailbox","auth") ?>
</TD> </td>
</TR> </tr>
<TR VALIGN=TOP> <tr valign="top">
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD> <td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<TD> <td>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA> <textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</TD> </td>
<TD> <td>
<?php print_string("authinstructions","auth") ?> <?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?> <?php helpbutton("text", get_string("helptext")) ?>
</TD> </td>
</TR> </tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
// Authentication by looking up a POP3 server // Authentication by looking up a POP3 server
function auth_user_login ($username, $password) { function auth_user_login ($username, $password) {

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This script is used to configure and execute the backup proccess. //This script is used to configure and execute the backup proccess.
//Define some globals for all the script //Define some globals for all the script
@ -47,13 +47,13 @@
//If no course has been selected or cancel button pressed //If no course has been selected or cancel button pressed
if (!$id or $cancel) { if (!$id or $cancel) {
print_header("$site->shortname: $strcoursebackup", $site->fullname, print_header("$site->shortname: $strcoursebackup", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcoursebackup"); "<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> $strcoursebackup");
if ($courses = get_courses()) { if ($courses = get_courses()) {
print_heading(get_string("choosecourse")); print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER"); print_simple_box_start("center");
foreach ($courses as $course) { foreach ($courses as $course) {
echo "<A HREF=\"backup.php?id=$course->id\">$course->fullname ($course->shortname)</A><BR>"; echo "<a href=\"backup.php?id=$course->id\">$course->fullname ($course->shortname)</a><br />";
} }
print_simple_box_end(); print_simple_box_end();
} else { } else {

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page prints the backup todo list to see everything //This page prints the backup todo list to see everything
//Check login //Check login
@ -74,14 +74,14 @@
?> ?>
<form name="form" method="post" action="<?php echo $ME ?>"> <form name="form" method="post" action="<?php echo $ME ?>">
<table cellpadding=5> <table cellpadding="5">
<?php <?php
//Now print the Backup Name tr //Now print the Backup Name tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("name").":"; echo get_string("name").":";
echo "</B></td><td>"; echo "</b></td><td>";
//Calculate the backup string //Calculate the backup string
//Calculate the backup word //Calculate the backup word
@ -131,7 +131,7 @@
//Now print the To Do list //Now print the To Do list
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\" align=\"center\"><P><B>"; echo "<td colspan=\"2\" align=\"center\"><p><b>";
//Here we check if backup_users = None. Then, we switch off every module //Here we check if backup_users = None. Then, we switch off every module
//user info, user_files, logs and exercises and workshop backups. A Warning is showed to //user info, user_files, logs and exercises and workshop backups. A Warning is showed to
@ -162,7 +162,7 @@
echo "</td></tr>"; echo "</td></tr>";
//This is tha align to every ingo table //This is tha align to every ingo table
$table->align = array ("LEFT","RIGHT"); $table->align = array ("left","right");
if ($allmods = get_records("modules") ) { if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) { foreach ($allmods as $mod) {
@ -181,7 +181,7 @@
if ($$var == 1) { if ($$var == 1) {
//Print the full tr //Print the full tr
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\"><P><B>"; echo "<td colspan=\"2\"><p><b>";
//Print the mod name //Print the mod name
echo "<li>".get_string("include")." ".get_string("modulenameplural",$modname)." "; echo "<li>".get_string("include")." ".get_string("modulenameplural",$modname)." ";
//Now look for user-data status //Now look for user-data status
@ -189,7 +189,7 @@
$backup_user_options[1] = get_string("withuserdata"); $backup_user_options[1] = get_string("withuserdata");
$var = "backup_user_info_".$modname; $var = "backup_user_info_".$modname;
//Print the user info //Print the user info
echo $backup_user_options[$$var]."<P>"; echo $backup_user_options[$$var]."<p>";
//Call the check function to show more info //Call the check function to show more info
$modcheckbackup = $modname."_check_backup_mods"; $modcheckbackup = $modname."_check_backup_mods";
$table->data = $modcheckbackup($id,$$var,$backup_unique_code); $table->data = $modcheckbackup($id,$$var,$backup_unique_code);
@ -203,11 +203,11 @@
//Now print the Users tr //Now print the Users tr
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\"><P><B>"; echo "<td colspan=\"2\"><p><b>";
$user_options[0] = get_string("includeallusers"); $user_options[0] = get_string("includeallusers");
$user_options[1] = get_string("includecourseusers"); $user_options[1] = get_string("includecourseusers");
$user_options[2] = get_string("includenoneusers"); $user_options[2] = get_string("includenoneusers");
echo "<li>".$user_options[$backup_users]."<P>"; echo "<li>".$user_options[$backup_users]."<p>";
//Add as hidden name //Add as hidden name
echo "<input type=\"hidden\" name=\"backup_users\" value=\"".$backup_users."\">"; echo "<input type=\"hidden\" name=\"backup_users\" value=\"".$backup_users."\">";
//Print info //Print info
@ -218,8 +218,8 @@
//Now print the Logs tr conditionally //Now print the Logs tr conditionally
if ($backup_logs) { if ($backup_logs) {
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\"><P><B>"; echo "<td colspan=\"2\"><p><b>";
echo "<li>".get_string("includelogentries")."<P>"; echo "<li>".get_string("includelogentries")."<p>";
//Print info //Print info
$table->data = log_check_backup($id); $table->data = log_check_backup($id);
print_table($table); print_table($table);
@ -231,8 +231,8 @@
//Now print the User Files tr conditionally //Now print the User Files tr conditionally
if ($backup_user_files) { if ($backup_user_files) {
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\"><P><B>"; echo "<td colspan=\"2\"><p><b>";
echo "<li>".get_string("includeuserfiles")."<P>"; echo "<li>".get_string("includeuserfiles")."<p>";
//Print info //Print info
$table->data = user_files_check_backup($id,$backup_unique_code); $table->data = user_files_check_backup($id,$backup_unique_code);
print_table($table); print_table($table);
@ -244,8 +244,8 @@
//Now print the Course Files tr conditionally //Now print the Course Files tr conditionally
if ($backup_course_files) { if ($backup_course_files) {
echo "<tr>"; echo "<tr>";
echo "<td colspan=\"2\"><P><B>"; echo "<td colspan=\"2\"><p><b>";
echo "<li>".get_string("includecoursefiles")."<P>"; echo "<li>".get_string("includecoursefiles")."<p>";
//Print info //Print info
$table->data = course_files_check_backup($id,$backup_unique_code); $table->data = course_files_check_backup($id,$backup_unique_code);
print_table($table); print_table($table);
@ -256,11 +256,11 @@
} }
?> ?>
</table> </table>
<BR> <br />
<CENTER> <center>
<input type="hidden" name=id value="<?php p($id) ?>"> <input type="hidden" name="id" value="<?php p($id) ?>">
<input type="hidden" name=launch value="execute"> <input type="hidden" name="launch" value="execute">
<input type="submit" value="<?php print_string("continue") ?>"> <input type="submit" value="<?php print_string("continue") ?>">
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
</CENTER> </center>
</FORM> </form>

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page prints the backup todo list to see everything //This page prints the backup todo list to see everything
//Check login //Check login
@ -110,9 +110,9 @@
//Now print the Backup Name tr //Now print the Backup Name tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("name").":"; echo get_string("name").":";
echo "</B></td><td>"; echo "</b></td><td>";
echo $backup_name; echo $backup_name;
echo "</td></tr>"; echo "</td></tr>";
@ -339,7 +339,7 @@
} }
//Print final message //Print final message
print_simple_box(get_string("backupfinished"),"CENTER"); print_simple_box(get_string("backupfinished"),"center");
print_continue("$CFG->wwwroot/files/index.php?id=".$preferences->backup_course."&wdir=/backupdata"); print_continue("$CFG->wwwroot/files/index.php?id=".$preferences->backup_course."&wdir=/backupdata");
?> ?>

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page prints the backup form to select everything //This page prints the backup form to select everything
//Check login //Check login
@ -74,7 +74,7 @@
?> ?>
<form name="form" method="post" action="<?php echo $ME ?>"> <form name="form" method="post" action="<?php echo $ME ?>">
<table cellpadding=5> <table cellpadding="5">
<?php <?php
if ($allmods = get_records("modules") ) { if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) { foreach ($allmods as $mod) {
@ -85,7 +85,7 @@
if (isset($$var) && $$var) { if (isset($$var) && $$var) {
//Print the full tr //Print the full tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("include")." ". get_string("modulenameplural",$modname).":"; echo get_string("include")." ". get_string("modulenameplural",$modname).":";
echo "</td><td>"; echo "</td><td>";
$backup_options[0] = get_string("no"); $backup_options[0] = get_string("no");
@ -104,7 +104,7 @@
//Now print the Users tr //Now print the Users tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("users").":"; echo get_string("users").":";
echo "</td><td>"; echo "</td><td>";
$user_options[0] = get_string("all"); $user_options[0] = get_string("all");
@ -115,7 +115,7 @@
//Now print the Logs tr //Now print the Logs tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("logs").":"; echo get_string("logs").":";
echo "</td><td>"; echo "</td><td>";
$log_options[0] = get_string("no"); $log_options[0] = get_string("no");
@ -125,7 +125,7 @@
//Now print the User Files tr //Now print the User Files tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string ("userfiles").":"; echo get_string ("userfiles").":";
echo "</td><td>"; echo "</td><td>";
$user_file_options[0] = get_string("no"); $user_file_options[0] = get_string("no");
@ -135,7 +135,7 @@
//Now print the Course Files tr //Now print the Course Files tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string ("coursefiles").":"; echo get_string ("coursefiles").":";
echo "</td><td>"; echo "</td><td>";
$course_file_options[0] = get_string("no"); $course_file_options[0] = get_string("no");
@ -145,11 +145,11 @@
} }
?> ?>
</table> </table>
<BR> <br />
<CENTER> <center>
<input type="hidden" name=id value="<?php p($id) ?>"> <input type="hidden" name="id" value="<?php p($id) ?>">
<input type="hidden" name=launch value="check"> <input type="hidden" name="launch" value="check">
<input type="submit" value="<?php print_string("continue") ?>"> <input type="submit" value="<?php print_string("continue") ?>">
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
</CENTER> </center>
</FORM> </form>

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This file contains all the code needed to execute scheduled backups //This file contains all the code needed to execute scheduled backups
//This function is executed via moodle cron //This function is executed via moodle cron

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This file contains all the function needed in the backup utility //This file contains all the function needed in the backup utility
//except the mod-related funtions that are into every backuplib.php inside //except the mod-related funtions that are into every backuplib.php inside
//every mod directory //every mod directory
@ -852,7 +852,7 @@
if ($counter % 10 == 0) { if ($counter % 10 == 0) {
echo "."; echo ".";
if ($counter % 200 == 0) { if ($counter % 200 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -921,7 +921,7 @@
if ($counter % 10 == 0) { if ($counter % 10 == 0) {
echo "."; echo ".";
if ($counter % 200 == 0) { if ($counter % 200 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -1171,7 +1171,7 @@
} }
if ($result != $content && $CFG->debug>7) { //Debug if ($result != $content && $CFG->debug>7) { //Debug
echo "<br><hr>".$content."<br>changed to<br>".$result."<hr><br>"; //Debug echo "<br /><hr />".$content."<br />changed to<br />".$result."<hr /><br />"; //Debug
} //Debug } //Debug
return $result; return $result;
@ -1268,7 +1268,7 @@
$filelist = list_directories_and_files ($basedir); $filelist = list_directories_and_files ($basedir);
if (empty($CFG->zip)) { // Use built-in php-based zip function if (empty($CFG->zip)) { // Use built-in php-based zip function
//echo "<br>Using pclzip"; //Debug //echo "<br />Using pclzip"; //Debug
$files = array(); $files = array();
foreach ($filelist as $file) { foreach ($filelist as $file) {
//If directory, append "/" //If directory, append "/"
@ -1277,7 +1277,7 @@
// $file = $file."/"; // $file = $file."/";
//} //}
//Include into array //Include into array
//echo "<br>Adding file/dir ".$file; //Debug //echo "<br />Adding file/dir ".$file; //Debug
$files[] = $basedir."/".$file; $files[] = $basedir."/".$file;
} }
include_once("$CFG->dirroot/lib/pclzip/pclzip.lib.php"); include_once("$CFG->dirroot/lib/pclzip/pclzip.lib.php");
@ -1292,18 +1292,18 @@
//PclTraceDisplay(); //Debug //PclTraceDisplay(); //Debug
//PclTraceOff(); //Debug //PclTraceOff(); //Debug
} else { // Use external zip program } else { // Use external zip program
//echo "<br>Using external zip"; //Debug //echo "<br />Using external zip"; //Debug
$files = ""; $files = "";
foreach ($filelist as $file) { foreach ($filelist as $file) {
$files .= basename($file); $files .= basename($file);
$files .= " "; $files .= " ";
} }
$command = "cd $basedir ; $CFG->zip -r $name $files"; $command = "cd $basedir ; $CFG->zip -r $name $files";
//echo "<br>Executing command: ".$command; //Debug //echo "<br />Executing command: ".$command; //Debug
$status = Exec($command); $status = Exec($command);
} }
//echo "<br>Status: ".$status; //Debug //echo "<br />Status: ".$status; //Debug
return $status; return $status;
} }
@ -1328,9 +1328,9 @@
//Define zip destination (course dir) //Define zip destination (course dir)
$to_zip_file = $CFG->dataroot."/".$preferences->backup_course; $to_zip_file = $CFG->dataroot."/".$preferences->backup_course;
//echo "<p>From: ".$from_zip_file."<br>"; //Debug //echo "<p>From: ".$from_zip_file."<br />"; //Debug
//echo "<p>Checking: ".$to_zip_file."<br>"; //Debug //echo "<p>Checking: ".$to_zip_file."<br />"; //Debug
//Checks course dir exists //Checks course dir exists
$status = check_dir_exists($to_zip_file,true); $status = check_dir_exists($to_zip_file,true);
@ -1338,7 +1338,7 @@
//Define zip destination (backup dir) //Define zip destination (backup dir)
$to_zip_file = $to_zip_file."/backupdata"; $to_zip_file = $to_zip_file."/backupdata";
//echo "<p>Checking: ".$to_zip_file."<br>"; //Debug //echo "<p>Checking: ".$to_zip_file."<br />"; //Debug
//Checks backup dir exists //Checks backup dir exists
$status = check_dir_exists($to_zip_file,true); $status = check_dir_exists($to_zip_file,true);
@ -1347,7 +1347,7 @@
$to_zip_file = $to_zip_file."/".$preferences->backup_name; $to_zip_file = $to_zip_file."/".$preferences->backup_name;
} }
//echo "<p>To: ".$to_zip_file."<br>"; //Debug //echo "<p>To: ".$to_zip_file."<br />"; //Debug
//Copy zip file //Copy zip file
if ($status) { if ($status) {

View file

@ -83,13 +83,13 @@
?> ?>
<form method="post" action="backup.php" name="form"> <form method="post" action="backup.php" name="form">
<table cellpadding=9 cellspacing=0 > <table cellpadding="9" cellspacing="0" >
<tr valign=top> <tr valign="top">
<td colspan = 3 align=center><strong><?php print_string("settings") ?></strong></td> <td colspan = 3 align="center"><strong><?php print_string("settings") ?></strong></td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("includemodules") ?>:</td> <td align="right"><p><?php print_string("includemodules") ?>:</td>
<td nowrap> <td nowrap="nowrap">
<?php choose_from_menu($yesno_array, "backup_sche_modules", $backup_config->backup_sche_modules, "") ?> <?php choose_from_menu($yesno_array, "backup_sche_modules", $backup_config->backup_sche_modules, "") ?>
<?php choose_from_menu($withwithout_array, "backup_sche_withuserdata", $backup_config->backup_sche_withuserdata, "") ?> <?php choose_from_menu($withwithout_array, "backup_sche_withuserdata", $backup_config->backup_sche_withuserdata, "") ?>
</td> </td>
@ -97,8 +97,8 @@
<?php print_string("backupincludemoduleshelp") ?> <?php print_string("backupincludemoduleshelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("users") ?>:</td> <td align="right"><p><?php print_string("users") ?>:</td>
<td> <td>
<?php choose_from_menu($courseall_array, "backup_sche_users", $backup_config->backup_sche_users, "") ?> <?php choose_from_menu($courseall_array, "backup_sche_users", $backup_config->backup_sche_users, "") ?>
</td> </td>
@ -106,8 +106,8 @@
<?php print_string("backupusershelp") ?> <?php print_string("backupusershelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("logs") ?>:</td> <td align="right"><p><?php print_string("logs") ?>:</td>
<td> <td>
<?php choose_from_menu($yesno_array, "backup_sche_logs", $backup_config->backup_sche_logs, "") ?> <?php choose_from_menu($yesno_array, "backup_sche_logs", $backup_config->backup_sche_logs, "") ?>
</td> </td>
@ -115,8 +115,8 @@
<?php print_string("backuplogshelp") ?> <?php print_string("backuplogshelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("userfiles") ?>:</td> <td align="right"><p><?php print_string("userfiles") ?>:</td>
<td> <td>
<?php choose_from_menu($yesno_array, "backup_sche_userfiles", $backup_config->backup_sche_userfiles, "") ?> <?php choose_from_menu($yesno_array, "backup_sche_userfiles", $backup_config->backup_sche_userfiles, "") ?>
</td> </td>
@ -124,8 +124,8 @@
<?php print_string("backupuserfileshelp") ?> <?php print_string("backupuserfileshelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("coursefiles") ?>:</td> <td align="right"><p><?php print_string("coursefiles") ?>:</td>
<td> <td>
<?php choose_from_menu($yesno_array, "backup_sche_coursefiles", $backup_config->backup_sche_coursefiles, "") ?> <?php choose_from_menu($yesno_array, "backup_sche_coursefiles", $backup_config->backup_sche_coursefiles, "") ?>
</td> </td>
@ -133,8 +133,8 @@
<?php print_string("backupcoursefileshelp") ?> <?php print_string("backupcoursefileshelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><?php print_string("keep") ?>:</td> <td align="right"><p><?php print_string("keep") ?>:</td>
<td> <td>
<?php <?php
choose_from_menu($keep_array, "backup_sche_keep", $backup_config->backup_sche_keep, ""); choose_from_menu($keep_array, "backup_sche_keep", $backup_config->backup_sche_keep, "");
@ -145,16 +145,16 @@
<?php print_string("backupkeephelp") ?> <?php print_string("backupkeephelp") ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td colspan = 3 align=center><strong><?php print_string("schedule") ?></strong></td> <td colspan = 3 align="center"><strong><?php print_string("schedule") ?></strong></td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td colspan = 3 align=center> <td colspan = 3 align="center">
<?php print_string("active") ?>: <?php choose_from_menu($yesno_array, "backup_sche_active", $backup_config->backup_sche_active, "") ?> <?php print_string("active") ?>: <?php choose_from_menu($yesno_array, "backup_sche_active", $backup_config->backup_sche_active, "") ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan=3 align=center> <td colspan="3" align="center">
<?php <?php
//Get first day of week from languaje files //Get first day of week from languaje files
//after searching the web I haven't find a sytem to retrieve it in php from locale info //after searching the web I haven't find a sytem to retrieve it in php from locale info
@ -189,18 +189,18 @@
?> ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td colspan = 3 align=center> <td colspan = 3 align="center">
<?php print_string("executeat") ?>: <?php print_time_selector("backup_sche_hour","backup_sche_minute",make_timestamp(2000,1,1,$backup_config->backup_sche_hour,$backup_config->backup_sche_minute)) ?> <?php print_string("executeat") ?>: <?php print_time_selector("backup_sche_hour","backup_sche_minute",make_timestamp(2000,1,1,$backup_config->backup_sche_hour,$backup_config->backup_sche_minute)) ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td colspan = 3 align=center> <td colspan = 3 align="center">
<?php print_string("saveto") ?>: <input name="backup_sche_destination" type="text" size="40" value="<?php p($backup_config->backup_sche_destination) ?>"><?php helpbutton("directorypaths", strip_tags(get_string("directorypaths"))) ?><br><?php if (!empty($sche_destination_error)) { formerr($sche_destination_error); echo "<br>"; } ?><?php print_string("backupsavetohelp") ?> <?php print_string("saveto") ?>: <input name="backup_sche_destination" type="text" size="40" value="<?php p($backup_config->backup_sche_destination) ?>"><?php helpbutton("directorypaths", strip_tags(get_string("directorypaths"))) ?><br /><?php if (!empty($sche_destination_error)) { formerr($sche_destination_error); echo "<br />"; } ?><?php print_string("backupsavetohelp") ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan=3 align=center> <td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>"></td> <input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr> </tr>
</table> </table>

View file

@ -282,7 +282,7 @@
global $CFG; global $CFG;
if (is_file($from_file)) { if (is_file($from_file)) {
//echo "<br>Copying ".$from_file." to ".$to_file; //Debug //echo "<br />Copying ".$from_file." to ".$to_file; //Debug
//$perms=fileperms($from_file); //$perms=fileperms($from_file);
//return copy($from_file,$to_file) && chmod($to_file,$perms); //return copy($from_file,$to_file) && chmod($to_file,$perms);
umask(0000); umask(0000);
@ -292,7 +292,7 @@
return backup_copy_dir($from_file,$to_file); return backup_copy_dir($from_file,$to_file);
} }
else{ else{
//echo "<br>Error: not file or dir ".$from_file; //Debug //echo "<br />Error: not file or dir ".$from_file; //Debug
return false; return false;
} }
} }
@ -302,7 +302,7 @@
global $CFG; global $CFG;
if (!is_dir($to_file)) { if (!is_dir($to_file)) {
//echo "<br>Creating ".$to_file; //Debug //echo "<br />Creating ".$to_file; //Debug
umask(0000); umask(0000);
$status = mkdir($to_file,$CFG->directorypermissions); $status = mkdir($to_file,$CFG->directorypermissions);
} }

View file

@ -50,28 +50,28 @@
if (!$courses) { if (!$courses) {
notify("No logs found!"); notify("No logs found!");
} else { } else {
echo "<table border=0 align=center cellpadding=3 cellspacing=3>"; echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
//Print table header //Print table header
echo "<tr nowrap>"; echo "<tr nowrap=\"nowrap\">";
echo "<td nowrap align=center><font size=3>$strcourse</font></td>"; echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strcourse</font></td>";
echo "<td nowrap align=center colspan=3><font size=3>$strtimetaken</font></td>"; echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\"><font size=\"3\">$strtimetaken</font></td>";
echo "<td nowrap align=center><font size=3>$strstatus</font></td>"; echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strstatus</font></td>";
echo "<td nowrap align=center><font size=3>$strnext</font></td>"; echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strnext</font></td>";
foreach ($courses as $course) { foreach ($courses as $course) {
//Get the course shortname //Get the course shortname
$coursename = get_field ("course","fullname","id",$course->courseid); $coursename = get_field ("course","fullname","id",$course->courseid);
if ($coursename) { if ($coursename) {
echo "<tr nowrap>"; echo "<tr nowrap=\"nowrap\">";
echo "<td nowrap><font size=2><a href=\"log.php?courseid=$course->courseid\">".$coursename."</a></td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\"><a href=\"log.php?courseid=$course->courseid\">".$coursename."</a></td>";
echo "<td nowrap><font size=2>".userdate($course->laststarttime,$strftimedatetime)."</td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->laststarttime,$strftimedatetime)."</td>";
echo "<td nowrap><font size=2> - </td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\"> - </td>";
echo "<td nowrap><font size=2>".userdate($course->lastendtime,$strftimedatetime)."</td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->lastendtime,$strftimedatetime)."</td>";
if (!$course->laststatus) { if (!$course->laststatus) {
echo "<td nowrap align=center><font size=2 color=red>".$strerror."</td>"; echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strerror."</td>";
} else { } else {
echo "<td nowrap align=center><font size=2 color=green>".$strok."</td>"; echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strok."</td>";
} }
echo "<td nowrap><font size=2>".userdate($course->nextstarttime,$strftimedatetime)."</td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->nextstarttime,$strftimedatetime)."</td>";
echo "</tr>"; echo "</tr>";
} }
} }
@ -104,10 +104,10 @@
if (!$executions) { if (!$executions) {
notify("No logs found!"); notify("No logs found!");
} else { } else {
echo "<table border=0 align=center cellpadding=3 cellspacing=3>"; echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
foreach($executions as $execution) { foreach($executions as $execution) {
echo "<tr nowrap>"; echo "<tr nowrap=\"nowrap\">";
echo "<td nowrap align=center colspan=3>"; echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center"); print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";
@ -118,11 +118,11 @@
ORDER BY time"); ORDER BY time");
if ($logs) { if ($logs) {
foreach ($logs as $log) { foreach ($logs as $log) {
echo "<tr nowrap>"; echo "<tr nowrap=\"nowrap\">";
echo "<td nowrap><font size=2>".userdate($log->time,$strftimetime)."</font></td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($log->time,$strftimetime)."</font></td>";
$log->info = str_replace("- ERROR!!","- <font color=red>ERROR!!</font>",$log->info); $log->info = str_replace("- ERROR!!","- <font color=\"red\">ERROR!!</font>",$log->info);
$log->info = str_replace("- OK","- <font color=green>OK</font>",$log->info); $log->info = str_replace("- OK","- <font color=\"green\">OK</font>",$log->info);
echo "<td nowrap><font size=2>".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>"; echo "<td nowrap=\"nowrap\"><font size=\"2\">".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>";
echo "</tr>"; echo "</tr>";
} }
} }

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This script is used to configure and execute the restore proccess. //This script is used to configure and execute the restore proccess.
//Define some globals for all the script //Define some globals for all the script
@ -53,7 +53,7 @@
//If no file has been selected from the FileManager, inform and end //If no file has been selected from the FileManager, inform and end
if (!$file) { if (!$file) {
print_header("$site->shortname: $strcourserestore", $site->fullname, print_header("$site->shortname: $strcourserestore", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcourserestore"); "<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> $strcourserestore");
print_heading(get_string("nofilesselected")); print_heading(get_string("nofilesselected"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php"); print_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer(); print_footer();
@ -63,7 +63,7 @@
//If cancel has been selected, inform and end //If cancel has been selected, inform and end
if ($cancel) { if ($cancel) {
print_header("$site->shortname: $strcourserestore", $site->fullname, print_header("$site->shortname: $strcourserestore", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcourserestore"); "<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> $strcourserestore");
print_heading(get_string("restorecancelled")); print_heading(get_string("restorecancelled"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php"); print_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer(); print_footer();

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page receive all the restore_form data. Then, if existing course //This page receive all the restore_form data. Then, if existing course
//has been selected, shows a list of courses to select one. //has been selected, shows a list of courses to select one.
//It cheks that the parammeter from restore_form are coherent. //It cheks that the parammeter from restore_form are coherent.
@ -150,9 +150,9 @@
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and (isadmin())) { if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and (isadmin())) {
if ($courses = get_courses("all","c.fullname")) { if ($courses = get_courses("all","c.fullname")) {
print_heading(get_string("choosecourse")); print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER"); print_simple_box_start("center");
foreach ($courses as $course) { foreach ($courses as $course) {
echo "<A HREF=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">$course->fullname ($course->shortname)</A><BR>"; echo "<a href=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">$course->fullname ($course->shortname)</a><br />";
} }
print_simple_box_end(); print_simple_box_end();
} else { } else {
@ -183,12 +183,12 @@
if ($show_continue_button) { if ($show_continue_button) {
//Print the continue button to execute the restore NOW !!!! //Print the continue button to execute the restore NOW !!!!
//All is prepared !!! //All is prepared !!!
echo "<CENTER>"; echo "<center>";
$hidden["launch"] = "execute"; $hidden["launch"] = "execute";
$hidden["file"] = $file; $hidden["file"] = $file;
$hidden["id"] = $id; $hidden["id"] = $id;
print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post"); print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post");
echo "</CENTER>"; echo "</center>";
} else { } else {
//Show error //Show error
error ("Something was wrong checking restore preferences"); error ("Something was wrong checking restore preferences");

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page receives the required info and executes the restore //This page receives the required info and executes the restore
//with the parameters suplied. Whe finished, delete temporary //with the parameters suplied. Whe finished, delete temporary
//data from backup_tables and temp directory //data from backup_tables and temp directory
@ -47,7 +47,7 @@
} }
//Start the main table //Start the main table
echo "<table cellpadding=5>"; echo "<table cellpadding=\"5\">";
echo "<tr><td>"; echo "<tr><td>";
//Start the main ul //Start the main ul
@ -132,7 +132,7 @@
//Now create users as needed //Now create users as needed
if ($status and ($restore->users == 0 or $restore->users == 1)) { if ($status and ($restore->users == 0 or $restore->users == 1)) {
echo "<li>".get_string("creatingusers")."<br>"; echo "<li>".get_string("creatingusers")."<br />";
if (!$status = restore_create_users($restore,$xml_file)) { if (!$status = restore_create_users($restore,$xml_file)) {
notify("Could not restore users."); notify("Could not restore users.");
} }
@ -168,7 +168,7 @@
if ($counter % 10 == 0) { if ($counter % 10 == 0) {
echo "."; echo ".";
if ($counter % 200 == 0) { if ($counter % 200 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -187,7 +187,7 @@
//Now create categories and questions as needed (STEP1) //Now create categories and questions as needed (STEP1)
if ($status and ($restore->mods['quiz']->restore)) { if ($status and ($restore->mods['quiz']->restore)) {
echo "<li>".get_string("creatingcategoriesandquestions")."<br>"; echo "<li>".get_string("creatingcategoriesandquestions")."<br />";
if (!$status = restore_create_questions($restore,$xml_file)) { if (!$status = restore_create_questions($restore,$xml_file)) {
notify("Could not restore categories and questions!"); notify("Could not restore categories and questions!");
} }
@ -195,7 +195,7 @@
//Now create user_files as needed //Now create user_files as needed
if ($status and ($restore->user_files)) { if ($status and ($restore->user_files)) {
echo "<li>".get_string("copyinguserfiles")."<br>"; echo "<li>".get_string("copyinguserfiles")."<br />";
if (!$status = restore_user_files($restore)) { if (!$status = restore_user_files($restore)) {
notify("Could not restore user files!"); notify("Could not restore user files!");
} }
@ -210,7 +210,7 @@
//Now create course files as needed //Now create course files as needed
if ($status and ($restore->course_files)) { if ($status and ($restore->course_files)) {
echo "<li>".get_string("copyingcoursefiles")."<br>"; echo "<li>".get_string("copyingcoursefiles")."<br />";
if (!$status = restore_course_files($restore)) { if (!$status = restore_course_files($restore)) {
notify("Could not restore course files!"); notify("Could not restore course files!");
} }
@ -320,7 +320,7 @@
} }
//Print final message //Print final message
print_simple_box(get_string("restorefinished"),"CENTER"); print_simple_box(get_string("restorefinished"),"center");
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id); print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
?> ?>

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//This page prints the restore form to select everything yo want //This page prints the restore form to select everything yo want
//to restore. Form is dinamically buid, depending of "info" object //to restore. Form is dinamically buid, depending of "info" object
//that contains the backup contents and depending of every mod //that contains the backup contents and depending of every mod
@ -98,7 +98,7 @@
?> ?>
<SCRIPT LANGUAGE="JavaScript"> <script language="JavaScript">
<!-- <!--
function selectItemInMenuByName(formId, menuName, selectIndex ) { function selectItemInMenuByName(formId, menuName, selectIndex ) {
myForm = document.getElementById(formId) myForm = document.getElementById(formId)
@ -114,13 +114,13 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
</script> </script>
<form name="form1" id="form1" method="post" action="<?php echo $ME ?>"> <form name="form1" id="form1" method="post" action="<?php echo $ME ?>">
<table cellpadding=5> <table cellpadding="5">
<?php <?php
//First, course destination //First, course destination
//Print the full tr //Print the full tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><b>"; echo "<td align=\"right\"><p><b>";
echo get_string("restoreto").":</b>"; echo get_string("restoreto").":</b>";
echo "</td><td>"; echo "</td><td>";
if (isteacheredit($id) and !isadmin()) { if (isteacheredit($id) and !isadmin()) {
@ -162,7 +162,7 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
if (isset($info->mods[$modname]) && $info->mods[$modname]->backup == "true") { if (isset($info->mods[$modname]) && $info->mods[$modname]->backup == "true") {
//Print the full tr //Print the full tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("include")." ". get_string("modulenameplural",$modname).":"; echo get_string("include")." ". get_string("modulenameplural",$modname).":";
echo "</td><td>"; echo "</td><td>";
$restore_options[0] = get_string("no"); $restore_options[0] = get_string("no");
@ -201,7 +201,7 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
//Now print the Users tr //Now print the Users tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("users").":"; echo get_string("users").":";
echo "</td><td>"; echo "</td><td>";
//If some user is present in the backup file //If some user is present in the backup file
@ -222,7 +222,7 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
//Now print the Logs tr //Now print the Logs tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string("logs").":"; echo get_string("logs").":";
echo "</td><td>"; echo "</td><td>";
//If logs are in the backup file, show menu, else fixed to no //If logs are in the backup file, show menu, else fixed to no
@ -238,7 +238,7 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
//Now print the User Files tr //Now print the User Files tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string ("userfiles").":"; echo get_string ("userfiles").":";
echo "</td><td>"; echo "</td><td>";
//If user files are in the backup file, show menu, else fixed to no //If user files are in the backup file, show menu, else fixed to no
@ -254,7 +254,7 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
//Now print the Course Files tr //Now print the Course Files tr
echo "<tr>"; echo "<tr>";
echo "<td align=\"right\"><P><B>"; echo "<td align=\"right\"><p><b>";
echo get_string ("coursefiles").":"; echo get_string ("coursefiles").":";
echo "</td><td>"; echo "</td><td>";
//If course files are in the backup file, show menu, else fixed to no //If course files are in the backup file, show menu, else fixed to no
@ -272,11 +272,11 @@ function selectItemInMenuByName(formId, menuName, selectIndex ) {
} }
?> ?>
</table> </table>
<BR> <br />
<CENTER> <center>
<input type="hidden" name=id value="<?php p($id) ?>"> <input type="hidden" name="id" value="<?php p($id) ?>">
<input type="hidden" name=launch value="check"> <input type="hidden" name="launch" value="check">
<input type="submit" value="<?php print_string("continue") ?>"> <input type="submit" value="<?php print_string("continue") ?>">
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
</CENTER> </center>
</FORM> </form>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$ <?php // $Id$
//This page copies th zip to the temp directory, //This page copies th zip to the temp directory,
//unzip it, check that it is a valid backup file //unzip it, check that it is a valid backup file
//inform about its contents and fill all the necesary //inform about its contents and fill all the necesary
@ -32,7 +32,7 @@
$file = $CFG->dataroot."/".$file; $file = $CFG->dataroot."/".$file;
//Start the main table //Start the main table
echo "<table cellpadding=5>"; echo "<table cellpadding=\"5\">";
echo "<tr><td>"; echo "<tr><td>";
//Start the mail ul //Start the mail ul
@ -138,13 +138,13 @@
//Finally, a little form to continue //Finally, a little form to continue
//with some hidden fields //with some hidden fields
if ($status) { if ($status) {
echo "<br><CENTER>"; echo "<br /><center>";
$hidden["backup_unique_code"] = $backup_unique_code; $hidden["backup_unique_code"] = $backup_unique_code;
$hidden["launch"] = "form"; $hidden["launch"] = "form";
$hidden["file"] = $file; $hidden["file"] = $file;
$hidden["id"] = $id; $hidden["id"] = $id;
print_single_button("restore.php", $hidden, get_string("continue"),"post"); print_single_button("restore.php", $hidden, get_string("continue"),"post");
echo "</CENTER>"; echo "</center>";
} }
if (!$status) { if (!$status) {

View file

@ -1,4 +1,4 @@
<?PHP //$Id$ <?php //$Id$
//Functions used in restore //Functions used in restore
//This function unzips a zip file in the same directory that it is //This function unzips a zip file in the same directory that it is
@ -155,14 +155,14 @@
$post->message = addslashes($result); $post->message = addslashes($result);
$status = update_record("forum_posts",$post); $status = update_record("forum_posts",$post);
if ($CFG->debug>7) { if ($CFG->debug>7) {
echo "<br><hr>".$content."<br>changed to</br>".$result."<hr><br>"; echo "<br /><hr />".$content."<br />changed to</br>".$result."<hr /><br />";
} }
} }
//Do some output //Do some output
if (($i+1) % 5 == 0) { if (($i+1) % 5 == 0) {
echo "."; echo ".";
if (($i+1) % 100 == 0) { if (($i+1) % 100 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -198,14 +198,14 @@
$resource->alltext = addslashes($result); $resource->alltext = addslashes($result);
$status = update_record("resource",$resource); $status = update_record("resource",$resource);
if ($CFG->debug>7) { if ($CFG->debug>7) {
echo "<br><hr>".$content."<br>changed to</br>".$result."<hr><br>"; echo "<br /><hr />".$content."<br />changed to</br>".$result."<hr /><br />";
} }
} }
//Do some output //Do some output
if (($i+1) % 5 == 0) { if (($i+1) % 5 == 0) {
echo "."; echo ".";
if (($i+1) % 100 == 0) { if (($i+1) % 100 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -899,17 +899,17 @@
//Here, if create_preferences, do it as necessary //Here, if create_preferences, do it as necessary
if ($create_preferences) { if ($create_preferences) {
//echo "Checking for preferences of user ".$user->username."<br>"; //Debug //echo "Checking for preferences of user ".$user->username."<br />"; //Debug
//Get user new id from backup_ids //Get user new id from backup_ids
$data = backup_getid($restore->backup_unique_code,"user",$userid); $data = backup_getid($restore->backup_unique_code,"user",$userid);
$newid = $data->new_id; $newid = $data->new_id;
if (isset($user->user_preferences)) { if (isset($user->user_preferences)) {
//echo "Preferences exist in backup file<br>"; //Debug //echo "Preferences exist in backup file<br />"; //Debug
foreach($user->user_preferences as $user_preference) { foreach($user->user_preferences as $user_preference) {
//echo $user_preference->name." = ".$user_preference->value."<br>"; //Debug //echo $user_preference->name." = ".$user_preference->value."<br />"; //Debug
//We check if that user_preference exists in DB //We check if that user_preference exists in DB
if (!record_exists("user_preferences","userid",$newid,"name",$user_preference->name)) { if (!record_exists("user_preferences","userid",$newid,"name",$user_preference->name)) {
//echo "Creating it<br>"; //Debug //echo "Creating it<br />"; //Debug
//Prepare the record and insert it //Prepare the record and insert it
$user_preference->userid = $newid; $user_preference->userid = $newid;
$status = insert_record("user_preferences",$user_preference); $status = insert_record("user_preferences",$user_preference);
@ -1162,7 +1162,7 @@
if (($i+1) % 50 == 0) { if (($i+1) % 50 == 0) {
echo "."; echo ".";
if (($i+1) % 1000 == 0) { if (($i+1) % 1000 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -1299,7 +1299,7 @@
$result = str_replace($search,$replace,$content); $result = str_replace($search,$replace,$content);
if ($result != $content && $CFG->debug>7) { //Debug if ($result != $content && $CFG->debug>7) { //Debug
echo "<br><hr>".$content."<br>changed to<br>".$result."<hr><br>"; //Debug echo "<br /><hr />".$content."<br />changed to<br />".$result."<hr /><br />"; //Debug
} //Debug } //Debug
return $result; return $result;
@ -1351,7 +1351,7 @@
if ($counter % 2 == 0) { if ($counter % 2 == 0) {
echo "."; echo ".";
if ($counter % 40 == 0) { if ($counter % 40 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -1404,7 +1404,7 @@
if ($counter % 2 == 0) { if ($counter % 2 == 0) {
echo "."; echo ".";
if ($counter % 40 == 0) { if ($counter % 40 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -1521,14 +1521,14 @@
//We have to recode the userid field //We have to recode the userid field
$user = backup_getid($restore->backup_unique_code,"user",$dblog->userid); $user = backup_getid($restore->backup_unique_code,"user",$dblog->userid);
if ($user) { if ($user) {
//echo "User ".$dblog->userid." to user ".$user->new_id."<br>"; //Debug //echo "User ".$dblog->userid." to user ".$user->new_id."<br />"; //Debug
$dblog->userid = $user->new_id; $dblog->userid = $user->new_id;
} }
//We have to recode the cmid field (if module isn't "course" or "user") //We have to recode the cmid field (if module isn't "course" or "user")
if ($dblog->module != "course" and $dblog->module != "user") { if ($dblog->module != "course" and $dblog->module != "user") {
$cm = backup_getid($restore->backup_unique_code,"course_modules",$dblog->cmid); $cm = backup_getid($restore->backup_unique_code,"course_modules",$dblog->cmid);
if ($cm) { if ($cm) {
//echo "Module ".$dblog->cmid." to module ".$cm->new_id."<br>"; //Debug //echo "Module ".$dblog->cmid." to module ".$cm->new_id."<br />"; //Debug
$dblog->cmid = $cm->new_id; $dblog->cmid = $cm->new_id;
} else { } else {
$dblog->cmid = 0; $dblog->cmid = 0;
@ -1553,7 +1553,7 @@
if ($counter % 10 == 0) { if ($counter % 10 == 0) {
echo "."; echo ".";
if ($counter % 200 == 0) { if ($counter % 200 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -1575,7 +1575,7 @@
$status = true; $status = true;
$toinsert = false; $toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug //echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Depending of the action, we recode different things //Depending of the action, we recode different things
switch ($log->action) { switch ($log->action) {
@ -1687,16 +1687,16 @@
$toinsert = true; $toinsert = true;
break; break;
default: default:
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br>"; //Debug echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
break; break;
} }
//echo "After transformations<br>"; //Debug //echo "After transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Now if $toinsert is set, insert the record //Now if $toinsert is set, insert the record
if ($toinsert) { if ($toinsert) {
//echo "Inserting record<br>"; //Debug //echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log); $status = insert_record("log",$log);
} }
return $status; return $status;
@ -1708,7 +1708,7 @@
$status = true; $status = true;
$toinsert = false; $toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug //echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Depending of the action, we recode different things //Depending of the action, we recode different things
switch ($log->action) { switch ($log->action) {
@ -1748,16 +1748,16 @@
} }
break; break;
default: default:
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br>"; //Debug echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
break; break;
} }
//echo "After transformations<br>"; //Debug //echo "After transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Now if $toinsert is set, insert the record //Now if $toinsert is set, insert the record
if ($toinsert) { if ($toinsert) {
//echo "Inserting record<br>"; //Debug //echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log); $status = insert_record("log",$log);
} }
return $status; return $status;
@ -1769,7 +1769,7 @@
$status = true; $status = true;
$toinsert = false; $toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug //echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Now we see if the required function in the module exists //Now we see if the required function in the module exists
@ -1783,12 +1783,12 @@
} }
} }
//echo "After transformations<br>"; //Debug //echo "After transformations<br />"; //Debug
//print_object($log); //Debug //print_object($log); //Debug
//Now if $toinsert is set, insert the record //Now if $toinsert is set, insert the record
if ($toinsert) { if ($toinsert) {
//echo "Inserting record<br>"; //Debug //echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log); $status = insert_record("log",$log);
} }
return $status; return $status;
@ -1877,7 +1877,7 @@
//Check if we are into INFO zone //Check if we are into INFO zone
//if ($this->tree[2] == "INFO") //Debug //if ($this->tree[2] == "INFO") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
} }
//This is the startTag handler we use where we are reading the course header zone (todo="COURSE_HEADER") //This is the startTag handler we use where we are reading the course header zone (todo="COURSE_HEADER")
@ -1891,7 +1891,7 @@
//Check if we are into COURSE_HEADER zone //Check if we are into COURSE_HEADER zone
//if ($this->tree[3] == "HEADER") //Debug //if ($this->tree[3] == "HEADER") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
} }
//This is the startTag handler we use where we are reading the sections zone (todo="SECTIONS") //This is the startTag handler we use where we are reading the sections zone (todo="SECTIONS")
@ -1905,7 +1905,7 @@
//Check if we are into SECTIONS zone //Check if we are into SECTIONS zone
//if ($this->tree[3] == "SECTIONS") //Debug //if ($this->tree[3] == "SECTIONS") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
} }
//This is the startTag handler we use where we are reading the user zone (todo="USERS") //This is the startTag handler we use where we are reading the user zone (todo="USERS")
@ -1916,7 +1916,7 @@
//Check if we are into USERS zone //Check if we are into USERS zone
//if ($this->tree[3] == "USERS") //Debug //if ($this->tree[3] == "USERS") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
} }
//This is the startTag handler we use where we are reading the questions zone (todo="QUESTIONS") //This is the startTag handler we use where we are reading the questions zone (todo="QUESTIONS")
@ -1934,7 +1934,7 @@
//Check if we are into QUESTION_CATEGORIES zone //Check if we are into QUESTION_CATEGORIES zone
//if ($this->tree[3] == "QUESTION_CATEGORIES") //Debug //if ($this->tree[3] == "QUESTION_CATEGORIES") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a QUESTION_CATEGORY tag under a QUESTION_CATEGORIES zone, accumule it //If we are under a QUESTION_CATEGORY tag under a QUESTION_CATEGORIES zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -1962,7 +1962,7 @@
//Check if we are into SCALES zone //Check if we are into SCALES zone
//if ($this->tree[3] == "SCALES") //Debug //if ($this->tree[3] == "SCALES") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a SCALE tag under a SCALES zone, accumule it //If we are under a SCALE tag under a SCALES zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -1989,7 +1989,7 @@
//Check if we are into GROUPS zone //Check if we are into GROUPS zone
//if ($this->tree[3] == "GROUPS") //Debug //if ($this->tree[3] == "GROUPS") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a GROUP tag under a GROUPS zone, accumule it //If we are under a GROUP tag under a GROUPS zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2017,7 +2017,7 @@
//Check if we are into EVENTS zone //Check if we are into EVENTS zone
//if ($this->tree[3] == "EVENTS") //Debug //if ($this->tree[3] == "EVENTS") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a EVENT tag under a EVENTS zone, accumule it //If we are under a EVENT tag under a EVENTS zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2045,7 +2045,7 @@
//Check if we are into MODULES zone //Check if we are into MODULES zone
//if ($this->tree[3] == "MODULES") //Debug //if ($this->tree[3] == "MODULES") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a MOD tag under a MODULES zone, accumule it //If we are under a MOD tag under a MODULES zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2073,7 +2073,7 @@
//Check if we are into LOGS zone //Check if we are into LOGS zone
//if ($this->tree[3] == "LOGS") //Debug //if ($this->tree[3] == "LOGS") //Debug
// echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug // echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
//If we are under a LOG tag under a LOGS zone, accumule it //If we are under a LOG tag under a LOGS zone, accumule it
if (isset($this->tree[4]) and isset($this->tree[3])) { if (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2094,7 +2094,7 @@
//Output something to avoid browser timeouts... //Output something to avoid browser timeouts...
backup_flush(); backup_flush();
echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br>\n"; //Debug echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
} }
//This is the endTag handler we use where we are reading the info zone (todo="INFO") //This is the endTag handler we use where we are reading the info zone (todo="INFO")
@ -2102,8 +2102,8 @@
//Check if we are into INFO zone //Check if we are into INFO zone
if ($this->tree[2] == "INFO") { if ($this->tree[2] == "INFO") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Dependig of different combinations, do different things //Dependig of different combinations, do different things
if ($this->level == 3) { if ($this->level == 3) {
switch ($tagName) { switch ($tagName) {
@ -2181,8 +2181,8 @@
//Check if we are into COURSE_HEADER zone //Check if we are into COURSE_HEADER zone
if ($this->tree[3] == "HEADER") { if ($this->tree[3] == "HEADER") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Dependig of different combinations, do different things //Dependig of different combinations, do different things
if ($this->level == 4) { if ($this->level == 4) {
switch ($tagName) { switch ($tagName) {
@ -2309,8 +2309,8 @@
//Check if we are into SECTIONS zone //Check if we are into SECTIONS zone
if ($this->tree[3] == "SECTIONS") { if ($this->tree[3] == "SECTIONS") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Dependig of different combinations, do different things //Dependig of different combinations, do different things
if ($this->level == 4) { if ($this->level == 4) {
switch ($tagName) { switch ($tagName) {
@ -2408,8 +2408,8 @@
//Check if we are into USERS zone //Check if we are into USERS zone
if ($this->tree[3] == "USERS") { if ($this->tree[3] == "USERS") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Dependig of different combinations, do different things //Dependig of different combinations, do different things
if ($this->level == 4) { if ($this->level == 4) {
switch ($tagName) { switch ($tagName) {
@ -2424,7 +2424,7 @@
if ($this->counter % 10 == 0) { if ($this->counter % 10 == 0) {
echo "."; echo ".";
if ($this->counter % 200 == 0) { if ($this->counter % 200 == 0) {
echo "<br>"; echo "<br />";
} }
backup_flush(300); backup_flush(300);
} }
@ -2627,8 +2627,8 @@
//Check if we are into QUESTION_CATEGORIES zone //Check if we are into QUESTION_CATEGORIES zone
if ($this->tree[3] == "QUESTION_CATEGORIES") { if ($this->tree[3] == "QUESTION_CATEGORIES") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2677,8 +2677,8 @@
//Check if we are into SCALES zone //Check if we are into SCALES zone
if ($this->tree[3] == "SCALES") { if ($this->tree[3] == "SCALES") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2727,8 +2727,8 @@
//Check if we are into GROUPS zone //Check if we are into GROUPS zone
if ($this->tree[3] == "GROUPS") { if ($this->tree[3] == "GROUPS") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2777,8 +2777,8 @@
//Check if we are into EVENTS zone //Check if we are into EVENTS zone
if ($this->tree[3] == "EVENTS") { if ($this->tree[3] == "EVENTS") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2827,8 +2827,8 @@
//Check if we are into MODULES zone //Check if we are into MODULES zone
if ($this->tree[3] == "MODULES") { if ($this->tree[3] == "MODULES") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2883,8 +2883,8 @@
//Check if we are into LOGS zone //Check if we are into LOGS zone
if ($this->tree[3] == "LOGS") { if ($this->tree[3] == "LOGS") {
//if (trim($this->content)) //Debug //if (trim($this->content)) //Debug
// echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug // echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
//echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug //echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Acumulate data to info (content + close tag) //Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data //Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) { if (!isset($this->temp)) {
@ -2944,8 +2944,8 @@
//This is the endTag default handler we use when todo is undefined //This is the endTag default handler we use when todo is undefined
function endElement($parser, $tagName) { function endElement($parser, $tagName) {
if (trim($this->content)) //Debug if (trim($this->content)) //Debug
echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br>\n"; //Debug echo "C".str_repeat("&nbsp;",($this->level+2)*2).$this->getContents()."<br />\n"; //Debug
echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br>\n"; //Debug echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;/".$tagName."&gt;<br />\n"; //Debug
//Clear things //Clear things
$this->tree[$this->level] = ""; $this->tree[$this->level] = "";

View file

@ -1,27 +1,54 @@
<p style="text-align: center;"><?php print_string('confirmeventdelete', 'calendar'); ?></p> <p style="text-align: center;"><?php print_string('confirmeventdelete', 'calendar'); ?></p>
<div style="text-align: center; width: 100%;">
<table style="margin: auto;" > <div style="text-align: center; width: 100%;">
<tr>
<td> <table style="margin: auto;" >
<form method="get" action="event.php" name="delete">
<input type="submit" value=" <?php print_string('ok') ?> "> <tr>
<input type="hidden" name="id" value="<?php echo $event->id?>" />
<input type="hidden" name="action" value="delete" /> <td>
<input type="hidden" name="m" value="<?php echo $m; ?>" />
<input type="hidden" name="d" value="<?php echo $d; ?>" /> <form method="get" action="event.php" name="delete">
<input type="hidden" name="y" value="<?php echo $y; ?>" />
<input type="hidden" name="confirm" value="1" /> <input type="submit" value=" <?php print_string('ok') ?> " />
</form>
</td> <input type="hidden" name="id" value="<?php echo $event->id?>" />
<td>
<form method="get" action="view.php" name="cancel"> <input type="hidden" name="action" value="delete" />
<input type="submit" value=" <?php print_string('cancel') ?> ">
<input type="hidden" name="view" value="day" /> <input type="hidden" name="m" value="<?php echo $m; ?>" />
<input type="hidden" name="cal_m" value="<?php echo $m; ?>" />
<input type="hidden" name="cal_d" value="<?php echo $d; ?>" /> <input type="hidden" name="d" value="<?php echo $d; ?>" />
<input type="hidden" name="cal_y" value="<?php echo $y; ?>" />
</form> <input type="hidden" name="y" value="<?php echo $y; ?>" />
</td>
</tr> <input type="hidden" name="confirm" value="1" />
</table>
</div> </form>
</td>
<td>
<form method="get" action="view.php" name="cancel">
<input type="submit" value=" <?php print_string('cancel') ?> ">
<input type="hidden" name="view" value="day" />
<input type="hidden" name="cal_m" value="<?php echo $m; ?>" />
<input type="hidden" name="cal_d" value="<?php echo $d; ?>" />
<input type="hidden" name="cal_y" value="<?php echo $y; ?>" />
</form>
</td>
</tr>
</table>
</div>