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)) {
$config->auth_dbhost = "localhost";
}
@ -27,20 +27,20 @@
$config->auth_dbpasstype = "plaintext";
}
?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbhost:</TD>
<TD>
<INPUT name=auth_dbhost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbhost?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbhost:</td>
<td>
<input name="auth_dbhost" type="text" size="30" value="<?php echo $config->auth_dbhost?>" />
<?php if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbhost","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtype:</TD>
<TD>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbtype:</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");
foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype;
@ -48,188 +48,188 @@
choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, "");
?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbtype","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbname:</TD>
<TD>
<INPUT name=auth_dbname TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbname?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbname:</td>
<td>
<input name="auth_dbname" type="text" size="30" value="<?php echo $config->auth_dbname?>" />
<?php if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbname","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbuser:</TD>
<TD>
<INPUT name=auth_dbuser TYPE=text SIZE=30 VALUE="<?php echo $config->auth_dbuser?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbuser:</td>
<td>
<input name="auth_dbuser" type="text" size="30" value="<?php echo $config->auth_dbuser?>" />
<?php if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbuser","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpass:</TD>
<TD>
<INPUT name="auth_dbpass" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbpass?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbpass:</td>
<td>
<input name="auth_dbpass" type="text" size="30" value="<?php echo $config->auth_dbpass?>" />
<?php if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbpass","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtable:</TD>
<TD>
<INPUT name="auth_dbtable" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbtable?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbtable:</td>
<td>
<input name="auth_dbtable" type="text" size="30" value="<?php echo $config->auth_dbtable?>" />
<?php if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbtable","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfielduser:</TD>
<TD>
<INPUT name="auth_dbfielduser" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbfielduser?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbfielduser:</td>
<td>
<input name="auth_dbfielduser" type="text" size="30" value="<?php echo $config->auth_dbfielduser?>" />
<?php if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbfielduser","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfieldpass:</TD>
<TD>
<INPUT name="auth_dbfieldpass" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_dbfieldpass?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbfieldpass:</td>
<td>
<input name="auth_dbfieldpass" type="text" size="30" value="<?php echo $config->auth_dbfieldpass?>" />
<?php if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbfieldpass","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpasstype:</TD>
<TD>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbpasstype:</td>
<td>
<?php $passtype["plaintext"] = get_string("plaintext", "auth");
$passtype["md5"] = get_string("md5", "auth");
choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, "");
?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_dbpasstype","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR>
<TD ALIGN=RIGHT><P><?php print_string("firstname") ?>:</TD>
<TD>
<INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_firstname?>">
</TD>
<TD rowspan=12 VALIGN=CENTER>
<tr>
<td align="right"><p><?php print_string("firstname") ?>:</td>
<td>
<input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</td>
<td rowspan="12" valign="center">
<?php print_string("auth_dbextrafields","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("lastname") ?>:</TD>
<TD>
<INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lastname?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("lastname") ?>:</td>
<td>
<input name="auth_user_lastname" type="text" size="30" value="<?php echo $config->auth_user_lastname?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("email") ?>:</TD>
<TD>
<INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_email?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("email") ?>:</td>
<td>
<input name="auth_user_email" type="text" size="30" value="<?php echo $config->auth_user_email?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 1:</TD>
<TD>
<INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone1?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("phone") ?> 1:</td>
<td>
<input name="auth_user_phone1" type="text" size="30" value="<?php echo $config->auth_user_phone1?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("phone") ?> 2:</TD>
<TD>
<INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_phone2?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("phone") ?> 2:</td>
<td>
<input name="auth_user_phone2" type="text" size="30" value="<?php echo $config->auth_user_phone2?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("department") ?>:</TD>
<TD>
<INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_department?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("department") ?>:</td>
<td>
<input name="auth_user_department" type="text" size="30" value="<?php echo $config->auth_user_department?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("address") ?>:</TD>
<TD>
<INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_address?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("address") ?>:</td>
<td>
<input name="auth_user_address" type="text" size="30" value="<?php echo $config->auth_user_address?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("city") ?>:</TD>
<TD>
<INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_city?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("city") ?>:</td>
<td>
<input name="auth_user_city" type="text" size="30" value="<?php echo $config->auth_user_city?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("country") ?>:</TD>
<TD>
<INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_country?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("country") ?>:</td>
<td>
<input name="auth_user_country" type="text" size="30" value="<?php echo $config->auth_user_country?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("description") ?>:</TD>
<TD>
<INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_description?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("description") ?>:</td>
<td>
<input name="auth_user_description" type="text" size="30" value="<?php echo $config->auth_user_description?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("idnumber") ?>:</TD>
<TD>
<INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_idnumber?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("idnumber") ?>:</td>
<td>
<input name="auth_user_idnumber" type="text" size="30" value="<?php echo $config->auth_user_idnumber?>" />
</td>
</tr>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("language") ?>:</TD>
<TD>
<INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?php echo $config->auth_user_lang?>">
</TD>
</TR>
<tr valign="top">
<td align="right"><p><?php print_string("language") ?>:</td>
<td>
<input name="auth_user_lang" type="text" size="30" value="<?php echo $config->auth_user_lang?>" />
</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>
<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>
</td>
</tr>

View file

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

View file

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

View file

@ -1,84 +1,168 @@
<?PHP
if (!isset($config->auth_fchost)) {
$config->auth_fchost = "127.0.0.1";
}
if (!isset($config->auth_fcfppport)) {
$config->auth_fcfppport = "3333";
}
if (!isset($config->auth_fcuserid)) {
$config->auth_fcuserid = "fcMoodle";
}
if (!isset($config->auth_fcpasswd)) {
$config->auth_fcpasswd = "";
}
if (!isset($config->auth_fccreators)) {
$config->auth_fccreators = "";
}
?>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fchost:</TD>
<TD>
<INPUT name=auth_fchost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fchost?>">
<?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD>
<?php print_string("auth_fchost","auth") ?>
</TD>
</TR>
<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") ?>
</TD>
</TR>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcuserid:</TD>
<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>
<?php
if (!isset($config->auth_fchost)) {
$config->auth_fchost = "127.0.0.1";
}
if (!isset($config->auth_fcfppport)) {
$config->auth_fcfppport = "3333";
}
if (!isset($config->auth_fcuserid)) {
$config->auth_fcuserid = "fcMoodle";
}
if (!isset($config->auth_fcpasswd)) {
$config->auth_fcpasswd = "";
}
if (!isset($config->auth_fccreators)) {
$config->auth_fccreators = "";
}
?>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_fchost:</td>
<td>
<input name="auth_fchost" type="text" size="30" value="<?php echo $config->auth_fchost?>" />
<?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
</td>
<td>
<?php print_string("auth_fchost","auth") ?>
</td>
</tr>
<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") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_fcuserid:</td>
<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)) {
$config->auth_imaphost = "127.0.0.1";
}
@ -9,51 +9,51 @@
$config->auth_imapport = "143";
}
?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaphost:</TD>
<TD>
<INPUT name=auth_imaphost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_imaphost?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_imaphost:</td>
<td>
<input name="auth_imaphost" type="text" size="30" value="<?php echo $config->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_multiplehosts","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaptype:</TD>
<TD>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_imaptype:</td>
<td>
<?php $imaptypes = array("imap","imapssl", "imapcert", "imaptls");
foreach($imaptypes as $imaptype) {
$imapoptions[$imaptype] = $imaptype;
}
choose_from_menu($imapoptions, "auth_imaptype", $config->auth_imaptype, "");
?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_imaptype","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imapport:</TD>
<TD>
<INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?php echo $config->auth_imapport?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_imapport:</td>
<td>
<input name="auth_imapport" type="text" size="6" value="<?php echo $config->auth_imapport?>" />
<?php if (isset($err["auth_imapport"])) formerr($err["auth_imapport"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_imapport","auth") ?>
</TD>
</TR>
</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>
<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>
</td>
</tr>

View file

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

View file

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

View file

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

View file

@ -1,11 +1,11 @@
<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>
<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>
</td>
</tr>

View file

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

View file

@ -1,4 +1,4 @@
<?PHP
<?php
if (!isset($config->auth_nntphost)) {
$config->auth_nntphost = "127.0.0.1";
}
@ -7,36 +7,36 @@
}
?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntphost:</TD>
<TD>
<INPUT name="auth_nntphost" TYPE="text" SIZE=30 VALUE="<?php echo $config->auth_nntphost?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_nntphost:</td>
<td>
<input name="auth_nntphost" type="text" size="30" value="<?php echo $config->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_multiplehosts","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntpport:</TD>
<TD>
<INPUT name=auth_nntpport TYPE=text SIZE=6 VALUE="<?php echo $config->auth_nntpport?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_nntpport:</td>
<td>
<input name="auth_nntpport" type="text" size="6" value="<?php echo $config->auth_nntpport?>" />
<?php if (isset($err["auth_nntpport"])) formerr($err["auth_nntpport"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_nntpport","auth") ?>
</TD>
</TR>
</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>
<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>
</td>
</tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
// 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!
function auth_user_login ($username, $password) {

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
if (!isset($config->auth_pop3host)) {
$config->auth_pop3host = "127.0.0.1";
}
@ -12,62 +12,62 @@
$config->auth_pop3mailbox = "INBOX";
}
?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3host:</TD>
<TD>
<INPUT name=auth_pop3host TYPE=text SIZE=30 VALUE="<?php echo $config->auth_pop3host?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_pop3host:</td>
<td>
<input name="auth_pop3host" type="text" size="30" value="<?php echo $config->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_multiplehosts","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3type:</TD>
<TD>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_pop3type:</td>
<td>
<?php $pop3types = array("pop3","pop3cert", "pop3notls");
foreach($pop3types as $pop3type) {
$pop3options[$pop3type] = $pop3type;
}
choose_from_menu($pop3options, "auth_pop3type", $config->auth_pop3type, "");
?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_pop3type","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3port:</TD>
<TD>
<INPUT name=auth_pop3port TYPE=text SIZE=6 VALUE="<?php echo $config->auth_pop3port?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_pop3port:</td>
<td>
<input name="auth_pop3port" type="text" size="6" value="<?php echo $config->auth_pop3port?>" />
<?php if (isset($err["auth_pop3port"])) formerr($err["auth_pop3port"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_pop3port","auth") ?>
</TD>
</TR>
</td>
</tr>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3mailbox:</TD>
<TD>
<INPUT name=auth_pop3mailbox TYPE=text SIZE=6 VALUE="<?php echo $config->auth_pop3mailbox?>">
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_pop3mailbox:</td>
<td>
<input name="auth_pop3mailbox" type="text" size="6" value="<?php echo $config->auth_pop3mailbox?>" />
<?php if (isset($err["auth_pop3mailbox"])) formerr($err["auth_pop3mailbox"]); ?>
</TD>
<TD>
</td>
<td>
<?php print_string("auth_pop3mailbox","auth") ?>
</TD>
</TR>
</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>
<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>
</td>
</tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
// Authentication by looking up a POP3 server
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.
//Define some globals for all the script
@ -47,13 +47,13 @@
//If no course has been selected or cancel button pressed
if (!$id or $cancel) {
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()) {
print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER");
print_simple_box_start("center");
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();
} else {

View file

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

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This page prints the backup todo list to see everything
//Check login
@ -110,9 +110,9 @@
//Now print the Backup Name tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo "<td align=\"right\"><p><b>";
echo get_string("name").":";
echo "</B></td><td>";
echo "</b></td><td>";
echo $backup_name;
echo "</td></tr>";
@ -339,7 +339,7 @@
}
//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");
?>

View file

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

View file

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

View file

@ -83,13 +83,13 @@
?>
<form method="post" action="backup.php" name="form">
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td colspan = 3 align=center><strong><?php print_string("settings") ?></strong></td>
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td colspan = 3 align="center"><strong><?php print_string("settings") ?></strong></td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("includemodules") ?>:</td>
<td nowrap>
<tr valign="top">
<td align="right"><p><?php print_string("includemodules") ?>:</td>
<td nowrap="nowrap">
<?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, "") ?>
</td>
@ -97,8 +97,8 @@
<?php print_string("backupincludemoduleshelp") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("users") ?>:</td>
<tr valign="top">
<td align="right"><p><?php print_string("users") ?>:</td>
<td>
<?php choose_from_menu($courseall_array, "backup_sche_users", $backup_config->backup_sche_users, "") ?>
</td>
@ -106,8 +106,8 @@
<?php print_string("backupusershelp") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("logs") ?>:</td>
<tr valign="top">
<td align="right"><p><?php print_string("logs") ?>:</td>
<td>
<?php choose_from_menu($yesno_array, "backup_sche_logs", $backup_config->backup_sche_logs, "") ?>
</td>
@ -115,8 +115,8 @@
<?php print_string("backuplogshelp") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("userfiles") ?>:</td>
<tr valign="top">
<td align="right"><p><?php print_string("userfiles") ?>:</td>
<td>
<?php choose_from_menu($yesno_array, "backup_sche_userfiles", $backup_config->backup_sche_userfiles, "") ?>
</td>
@ -124,8 +124,8 @@
<?php print_string("backupuserfileshelp") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("coursefiles") ?>:</td>
<tr valign="top">
<td align="right"><p><?php print_string("coursefiles") ?>:</td>
<td>
<?php choose_from_menu($yesno_array, "backup_sche_coursefiles", $backup_config->backup_sche_coursefiles, "") ?>
</td>
@ -133,8 +133,8 @@
<?php print_string("backupcoursefileshelp") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("keep") ?>:</td>
<tr valign="top">
<td align="right"><p><?php print_string("keep") ?>:</td>
<td>
<?php
choose_from_menu($keep_array, "backup_sche_keep", $backup_config->backup_sche_keep, "");
@ -145,16 +145,16 @@
<?php print_string("backupkeephelp") ?>
</td>
</tr>
<tr valign=top>
<td colspan = 3 align=center><strong><?php print_string("schedule") ?></strong></td>
<tr valign="top">
<td colspan = 3 align="center"><strong><?php print_string("schedule") ?></strong></td>
</tr>
<tr valign=top>
<td colspan = 3 align=center>
<tr valign="top">
<td colspan = 3 align="center">
<?php print_string("active") ?>: <?php choose_from_menu($yesno_array, "backup_sche_active", $backup_config->backup_sche_active, "") ?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<td colspan="3" align="center">
<?php
//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
@ -189,18 +189,18 @@
?>
</td>
</tr>
<tr valign=top>
<td colspan = 3 align=center>
<tr valign="top">
<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)) ?>
</td>
</tr>
<tr valign=top>
<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") ?>
<tr valign="top">
<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") ?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>

View file

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

View file

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

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This script is used to configure and execute the restore proccess.
//Define some globals for all the script
@ -53,7 +53,7 @@
//If no file has been selected from the FileManager, inform and end
if (!$file) {
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_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer();
@ -63,7 +63,7 @@
//If cancel has been selected, inform and end
if ($cancel) {
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_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer();

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This page receive all the restore_form data. Then, if existing course
//has been selected, shows a list of courses to select one.
//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 ($courses = get_courses("all","c.fullname")) {
print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER");
print_simple_box_start("center");
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();
} else {
@ -183,12 +183,12 @@
if ($show_continue_button) {
//Print the continue button to execute the restore NOW !!!!
//All is prepared !!!
echo "<CENTER>";
echo "<center>";
$hidden["launch"] = "execute";
$hidden["file"] = $file;
$hidden["id"] = $id;
print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post");
echo "</CENTER>";
echo "</center>";
} else {
//Show error
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
//with the parameters suplied. Whe finished, delete temporary
//data from backup_tables and temp directory
@ -47,7 +47,7 @@
}
//Start the main table
echo "<table cellpadding=5>";
echo "<table cellpadding=\"5\">";
echo "<tr><td>";
//Start the main ul
@ -132,7 +132,7 @@
//Now create users as needed
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)) {
notify("Could not restore users.");
}
@ -168,7 +168,7 @@
if ($counter % 10 == 0) {
echo ".";
if ($counter % 200 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -187,7 +187,7 @@
//Now create categories and questions as needed (STEP1)
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)) {
notify("Could not restore categories and questions!");
}
@ -195,7 +195,7 @@
//Now create user_files as needed
if ($status and ($restore->user_files)) {
echo "<li>".get_string("copyinguserfiles")."<br>";
echo "<li>".get_string("copyinguserfiles")."<br />";
if (!$status = restore_user_files($restore)) {
notify("Could not restore user files!");
}
@ -210,7 +210,7 @@
//Now create course files as needed
if ($status and ($restore->course_files)) {
echo "<li>".get_string("copyingcoursefiles")."<br>";
echo "<li>".get_string("copyingcoursefiles")."<br />";
if (!$status = restore_course_files($restore)) {
notify("Could not restore course files!");
}
@ -320,7 +320,7 @@
}
//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);
?>

View file

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

View file

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

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//Functions used in restore
//This function unzips a zip file in the same directory that it is
@ -155,14 +155,14 @@
$post->message = addslashes($result);
$status = update_record("forum_posts",$post);
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
if (($i+1) % 5 == 0) {
echo ".";
if (($i+1) % 100 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -198,14 +198,14 @@
$resource->alltext = addslashes($result);
$status = update_record("resource",$resource);
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
if (($i+1) % 5 == 0) {
echo ".";
if (($i+1) % 100 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -899,17 +899,17 @@
//Here, if create_preferences, do it as necessary
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
$data = backup_getid($restore->backup_unique_code,"user",$userid);
$newid = $data->new_id;
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) {
//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
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
$user_preference->userid = $newid;
$status = insert_record("user_preferences",$user_preference);
@ -1162,7 +1162,7 @@
if (($i+1) % 50 == 0) {
echo ".";
if (($i+1) % 1000 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -1299,7 +1299,7 @@
$result = str_replace($search,$replace,$content);
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
return $result;
@ -1351,7 +1351,7 @@
if ($counter % 2 == 0) {
echo ".";
if ($counter % 40 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -1404,7 +1404,7 @@
if ($counter % 2 == 0) {
echo ".";
if ($counter % 40 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -1521,14 +1521,14 @@
//We have to recode the userid field
$user = backup_getid($restore->backup_unique_code,"user",$dblog->userid);
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;
}
//We have to recode the cmid field (if module isn't "course" or "user")
if ($dblog->module != "course" and $dblog->module != "user") {
$cm = backup_getid($restore->backup_unique_code,"course_modules",$dblog->cmid);
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;
} else {
$dblog->cmid = 0;
@ -1553,7 +1553,7 @@
if ($counter % 10 == 0) {
echo ".";
if ($counter % 200 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -1575,7 +1575,7 @@
$status = true;
$toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug
//echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug
//Depending of the action, we recode different things
switch ($log->action) {
@ -1687,16 +1687,16 @@
$toinsert = true;
break;
default:
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br>"; //Debug
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
break;
}
//echo "After transformations<br>"; //Debug
//echo "After transformations<br />"; //Debug
//print_object($log); //Debug
//Now if $toinsert is set, insert the record
if ($toinsert) {
//echo "Inserting record<br>"; //Debug
//echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log);
}
return $status;
@ -1708,7 +1708,7 @@
$status = true;
$toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug
//echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug
//Depending of the action, we recode different things
switch ($log->action) {
@ -1748,16 +1748,16 @@
}
break;
default:
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br>"; //Debug
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
break;
}
//echo "After transformations<br>"; //Debug
//echo "After transformations<br />"; //Debug
//print_object($log); //Debug
//Now if $toinsert is set, insert the record
if ($toinsert) {
//echo "Inserting record<br>"; //Debug
//echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log);
}
return $status;
@ -1769,7 +1769,7 @@
$status = true;
$toinsert = false;
//echo "<hr>Before transformations<br>"; //Debug
//echo "<hr />Before transformations<br />"; //Debug
//print_object($log); //Debug
//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
//Now if $toinsert is set, insert the record
if ($toinsert) {
//echo "Inserting record<br>"; //Debug
//echo "Inserting record<br />"; //Debug
$status = insert_record("log",$log);
}
return $status;
@ -1877,7 +1877,7 @@
//Check if we are into INFO zone
//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")
@ -1891,7 +1891,7 @@
//Check if we are into COURSE_HEADER zone
//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")
@ -1905,7 +1905,7 @@
//Check if we are into SECTIONS zone
//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")
@ -1916,7 +1916,7 @@
//Check if we are into USERS zone
//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")
@ -1934,7 +1934,7 @@
//Check if we are into QUESTION_CATEGORIES zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -1962,7 +1962,7 @@
//Check if we are into SCALES zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -1989,7 +1989,7 @@
//Check if we are into GROUPS zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2017,7 +2017,7 @@
//Check if we are into EVENTS zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2045,7 +2045,7 @@
//Check if we are into MODULES zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2073,7 +2073,7 @@
//Check if we are into LOGS zone
//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 (isset($this->tree[4]) and isset($this->tree[3])) {
@ -2094,7 +2094,7 @@
//Output something to avoid browser timeouts...
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")
@ -2102,8 +2102,8 @@
//Check if we are into INFO zone
if ($this->tree[2] == "INFO") {
//if (trim($this->content)) //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 "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
//Dependig of different combinations, do different things
if ($this->level == 3) {
switch ($tagName) {
@ -2181,8 +2181,8 @@
//Check if we are into COURSE_HEADER zone
if ($this->tree[3] == "HEADER") {
//if (trim($this->content)) //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 "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
//Dependig of different combinations, do different things
if ($this->level == 4) {
switch ($tagName) {
@ -2309,8 +2309,8 @@
//Check if we are into SECTIONS zone
if ($this->tree[3] == "SECTIONS") {
//if (trim($this->content)) //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 "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
//Dependig of different combinations, do different things
if ($this->level == 4) {
switch ($tagName) {
@ -2408,8 +2408,8 @@
//Check if we are into USERS zone
if ($this->tree[3] == "USERS") {
//if (trim($this->content)) //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 "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
//Dependig of different combinations, do different things
if ($this->level == 4) {
switch ($tagName) {
@ -2424,7 +2424,7 @@
if ($this->counter % 10 == 0) {
echo ".";
if ($this->counter % 200 == 0) {
echo "<br>";
echo "<br />";
}
backup_flush(300);
}
@ -2627,8 +2627,8 @@
//Check if we are into QUESTION_CATEGORIES zone
if ($this->tree[3] == "QUESTION_CATEGORIES") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2677,8 +2677,8 @@
//Check if we are into SCALES zone
if ($this->tree[3] == "SCALES") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2727,8 +2727,8 @@
//Check if we are into GROUPS zone
if ($this->tree[3] == "GROUPS") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2777,8 +2777,8 @@
//Check if we are into EVENTS zone
if ($this->tree[3] == "EVENTS") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2827,8 +2827,8 @@
//Check if we are into MODULES zone
if ($this->tree[3] == "MODULES") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2883,8 +2883,8 @@
//Check if we are into LOGS zone
if ($this->tree[3] == "LOGS") {
//if (trim($this->content)) //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 "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
//Acumulate data to info (content + close tag)
//Reconvert: strip htmlchars again and trim to generate xml data
if (!isset($this->temp)) {
@ -2944,8 +2944,8 @@
//This is the endTag default handler we use when todo is undefined
function endElement($parser, $tagName) {
if (trim($this->content)) //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 "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
//Clear things
$this->tree[$this->level] = "";

View file

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