// ... print the header and...
print_header_simple("$dialogue->name", "",
- "<A HREF=index.php?id=$course->id>$strdialogues</A> ->
- <A HREF=\"view.php?id=$cm->id\">$dialogue->name</A>",
+ "<a href=\"index.php?id=$course->id\">$strdialogues</a> ->
+ <a hre=\"view.php?id=$cm->id\">$dialogue->name</a>",
"", "", true);
$pane=$_GET['pane'];
add_to_log($course->id, "dialogue", "closed", "view.php?id=$cm->id", "$conversationid");
- redirect("view.php?id=$cm->id&pane=$pane", get_string("dialogueclosed", "dialogue"));
+ redirect("view.php?id=$cm->id&pane=$pane", get_string("dialogueclosed", "dialogue"));
}
}
$pane = $_GET['pane'];
notice_yesno(get_string("confirmclosure", "dialogue", fullname($user)),
- "dialogues.php?action=closeconversation&id=$cm->id&cid=$conversation->id&pane=$pane",
- "view.php?id=$cm->id&pane=$pane");
+ "dialogues.php?action=closeconversation&id=$cm->id&cid=$conversation->id&pane=$pane",
+ "view.php?id=$cm->id&pane=$pane");
}
/****************** get subject ************************************/
error("Confirm Close: conversation id missing");
}
print_heading(get_string("addsubject", "dialogue"));
- echo "<form name=\"getsubjectform\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"updatesubject\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[id]\">\n";
- echo "<input type=\"hidden\" name=\"cid\" value=\"$_GET[cid]\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"$_GET[pane]\">\n";
- echo "<center><table border=\"1\" width=\"60%\">\n";
+ echo "<form name=\"getsubjectform\" method=\"post\" action=\"dialogues.php\"/>\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"updatesubject\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[id]\"/>\n";
+ echo "<input type=\"hidden\" name=\"cid\" value=\"$_GET[cid]\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"$_GET[pane]\"/>\n";
+ echo "<table align=\"center\"border=\"1\" width=\"60%\">\n";
echo "<tr><td align=\"right\"><b>".get_string("subject", "dialogue")."</b></td>";
echo "<td><input type=\"text\" size=\"50\" maxsize=\"100\" name=\"subject\"
value=\"\"></td></tr>\n";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"".
get_string("addsubject", "dialogue")."\"></td></tr>\n";
- echo "</table></center></form>\n";
+ echo "</table></form>\n";
}
}
}
}
- redirect("view.php?id=$cm->id&pane={$_POST['pane']}", get_string("numberofentriesadded",
+ redirect("view.php?id=$cm->id&pane={$_POST['pane']}", get_string("numberofentriesadded",
"dialogue", $n));
}
/****************** list closed conversations *********************************/
elseif ($action == 'listclosed') {
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
error("Print Dialogue: can not get conversation record");
}
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
error("Show Dialogue: can not get conversation record");
}
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
}
if (!$_POST['subject']) {
- redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("nosubject", "dialogue"));
+ redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("nosubject", "dialogue"));
} elseif (!set_field("dialogue_conversations", "subject", $_POST['subject'], "id", $_POST['cid'])) {
error("Update subject: could not update conversation record");
}
- redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("subjectadded", "dialogue"));
+ redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("subjectadded", "dialogue"));
}
}
natcasesort($names);
- print_simple_box_start();
+ print_simple_box_start("center");
$table->head = array (get_string("dialoguewith", "dialogue"), get_string("subject", "dialogue"),
get_string("numberofentries", "dialogue"), get_string("lastentry", "dialogue"),
get_string("status", "dialogue"));
} else {
$status = get_string("open", "dialogue");
}
- $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=showdialogues&cid=$conversation->id\">".
+ $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=showdialogues&cid=$conversation->id\">".
"$name</a>", $conversation->subject, $byuser." ".get_string("of", "dialogue")." ".$total,
userdate($conversation->timemodified), $status);
}
}
natcasesort($names);
- print_simple_box_start();
+ print_simple_box_start("center");
$table->head = array (get_string("dialoguewith", "dialogue"), get_string("subject", "dialogue"),
get_string("numberofentries", "dialogue"), get_string("lastentry", "dialogue"),
get_string("status", "dialogue"));
} else {
$status = get_string("notyetseen", "dialogue");
}
- $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=printdialogue&cid=$conversation->id\">".
+ $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=printdialogue&cid=$conversation->id\">".
"$name</a>", $conversation->subject, $byuser." ".get_string("of", "dialogue")." ".$total,
userdate($conversation->timemodified), $status);
}
$showbutton = false;
echo "<form name=\"replies\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"1\">\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"1\"/>\n";
// list the conversations requiring a resonse from this user in full
if ($conversations = dialogue_get_conversations($dialogue, $USER, "lastid != $USER->id AND closed = 0")) {
error("List conversations self: could not set seenon");
}
}
- echo "<center><table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
width=\"100%\">\n";
- echo "<tr><TD BGCOLOR=\"$THEME->cellheading2\" valign=\"top\">\n";
+ echo "<tr><td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
if ($conversation->userid == $USER->id) {
if (!$otheruser = get_record("user", "id", $conversation->recipientid)) {
error("User not found");
echo "<div align=\"right\">\n";
if (!$conversation->subject) {
// conversation does not have a subject, show add subject link
- echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
get_string("addsubject", "dialogue")."</a>\n";
helpbutton("addsubject", get_string("addsubject", "dialogue"), "dialogue");
echo " | ";
}
if (dialogue_count_entries($dialogue, $conversation)) {
- echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=1\">".
+ echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=1\">".
get_string("close", "dialogue")."</a>\n";
helpbutton("closedialogue", get_string("close", "dialogue"), "dialogue");
}
// use a cumbersome name on the textarea is just historical :-)
print_textarea($usehtmleditor, 20, 75, 630, 300, "reply$conversation->id");
echo "</td></tr>";
- echo "</table></center><br />\n";
+ echo "</table><br />\n";
}
print_simple_box_end();
use_html_editor();
if ($showbutton) {
echo "<hr />\n";
- echo "<br /><input type=\"submit\" value=\"".get_string("addmynewentries", "dialogue")."\">\n";
+ echo "<p align=\"center\"><input type=\"submit\" value=\"".get_string("addmynewentries", "dialogue").
+ "\"/></p>\n";
}
echo "</form>\n";
}
$showbutton = false;
echo "<form name=\"replies\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"2\">\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"2\"/>\n";
$showbutton = true;
print_simple_box_start("center", "", $THEME->cellcontent2);
- echo "<center><table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
width=\"100%\">\n";
echo "<tr><td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
if ($conversation->userid == $USER->id) {
echo "<div align=\"right\">\n";
if (!$conversation->subject) {
// conversation does not have a subject, show add subject link
- echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
get_string("addsubject", "dialogue")."</a>\n";
helpbutton("addsubject", get_string("addsubject", "dialogue"), "dialogue");
echo " | ";
}
- echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=2\">".
get_string("close", "dialogue")."</a>\n";
helpbutton("closedialogue", get_string("close", "dialogue"), "dialogue");
echo "</div></td></tr>\n";
print_textarea($usehtmleditor, 20, 75, 630, 300, "reply$conversation->id");
use_html_editor();
echo "</td></tr>";
- echo "</table></center><br />\n";
+ echo "</table><br />\n";
print_simple_box_end();
if ($showbutton) {
echo "<hr />\n";
$timenow = time();
print_simple_box_start("center");
- echo "<center><TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=4 width=\"100%\">\n";
+ echo "<table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\" width=\"100%\">\n";
echo "<tr>";
echo "<td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
}
}
}
- echo "</TABLE></center><BR CLEAR=ALL>\n";
+ echo "</table><br />\n";
print_simple_box_end();
- print_continue("view.php?id=$cm->id&pane=3");
+ print_continue("view.php?id=$cm->id&pane=3");
}
}
}
print_simple_box_start("center");
- echo "<center><TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=4 width=\"100%\">\n";
-
- echo "<TR>";
- echo "<TD BGCOLOR=\"$THEME->cellheading2\" VALIGN=TOP>\n";
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ width=\"100%\">\n";
+ echo "<tr>";
+ echo "<td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
// print_user_picture($otheruser->id, $course->id, $otheruser->picture);
echo "<b>".get_string("dialoguewith", "dialogue",
fullname($otheruser))."</b></td>";
}
}
- echo "</TABLE></center><BR CLEAR=ALL>\n";
+ echo "</table><br />\n";
print_simple_box_end();
}
}
- print_continue("view.php?id=$cm->id&pane=3");
+ print_continue("view.php?id=$cm->id&pane=3");
}
}
}
$tabs->names[3] = get_string("pane3", "dialogue", $countclosed);
}
- $tabs->urls[0] = "view.php?id=$cm->id&pane=0";
- $tabs->urls[1] = "view.php?id=$cm->id&pane=1";
- $tabs->urls[2] = "view.php?id=$cm->id&pane=2";
- $tabs->urls[3] = "view.php?id=$cm->id&pane=3";
+ $tabs->urls[0] = "view.php?id=$cm->id&pane=0";
+ $tabs->urls[1] = "view.php?id=$cm->id&pane=1";
+ $tabs->urls[2] = "view.php?id=$cm->id&pane=2";
+ $tabs->urls[3] = "view.php?id=$cm->id&pane=3";
$tabs->highlight = $pane;
dialogue_print_tabbed_heading($tabs);
- echo "<br/><center>\n";
+ echo "<br />\n";
switch ($pane) {
if ($names = dialogue_get_available_users($dialogue)) {
print_simple_box_start("center");
- echo "<center>";
echo "<form name=\"startform\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"id\"value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"openconversation\">\n";
- echo "<table border=\"0\"><tr>\n";
+ echo "<input type=\"hidden\" name=\"id\"value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"openconversation\"/>\n";
+ echo "<table align=\"center\" border=\"0\"><tr>\n";
echo "<td align=\"right\"><b>".get_string("openadialoguewith", "dialogue").
" : </b></td>\n";
echo "<td>";
use_html_editor();
echo "</td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"".
- get_string("opendialogue","dialogue")."\"></td></tr>\n";
+ get_string("opendialogue","dialogue")."\"/></td></tr>\n";
echo "</table></form>\n";
- echo "</center>";
print_simple_box_end();
} else {
print_heading(get_string("noavailablepeople", "dialogue"));