}
echo '
	<script type="text/javascript" src="http://skypecasts.skype.com/i/js/Skypecasts.js"></script>
	<script language="javascript" type="text/javascript">
	//<![CDATA[
	document.write("<style type=\\"text/css\\">");
	document.write("div#skypecasts-block { border: 1px solid #666666; padding: 6px; }");
	document.write("div#skypecasts-block { font-family:arial; font-size: 10px; line-height: 1.5; text-align: center; border: 1px solid #666666; padding: 6px; background-color: #f1f1f1; }");
	document.write("div#skypecasts-block h2 { font-size: 14px; color: #333333; font-weight: bold; }");
	document.write("div#skypecasts-block a, div#skypecasts-block a:hover { color: #006699; text-decoration: none; }");
	document.write("div#skypecasts-block a:hover { text-decoration: underline; }");
	document.write("div#skypecasts-block p { margin: 0 3px; }");
	document.write("div#skypecasts-block p.skypecast-host, div#skypecasts-block p.skypecast-date {  font-size: 9px; color: #999999; }");
	document.write("div#skypecasts-block p.skypecast-date { color: #666666; margin-bottom: 5px; }");
	document.write("div#skypecasts-block p.skypecast-title { font-size: 11px; font-weight: bold; }");
	document.write("div#skypecasts-block hr { background-color: #cccccc; height: 1px; margin: 7px 0; border: none; }");
	document.write("div#skypecasts-block img { border: 1px solid #333333; margin: 7px 0 3px 0; }");
	document.write("</style>");
	//]]></script>

	<div id="skypecasts-block">
	<a target="_blank" href="http://skypecasts.skype.com">
	<img src="pics/skypecast_logo.png" width="146" height="35" style="border: 0;" alt="Skypecasts" />
	</a>
	<hr />

	' . skype_show($skype, $USER, $cm, 'casts') . '

	</div>
	';
exit;
<?php

// Code by Amr Hourani [a.hourani@gmail.com]
require_once "../../config.php";
require_once "lib.php";
$id = required_param('id', PARAM_INT);
// Course Module ID
if (!($cm = get_record("course_modules", "id", $id))) {
    error("Course Module ID was incorrect");
}
if (!($course = get_record("course", "id", $cm->course))) {
    error("Course is misconfigured");
}
require_course_login($course, false, $cm);
if (!($skype = skype_get_skype($cm->instance))) {
    error("Course module is incorrect");
}
$strskype = get_string("modulename", "skype");
$strskypes = get_string("modulenameplural", "skype");
/// Display the skype and possibly results
add_to_log($course->id, "skype", "view", "view.php?id={$cm->id}", $skype->id, $cm->id);
print_header_simple(format_string($skype->name), "", "<a href=\"index.php?id={$course->id}\">{$strskypes}</a> -> " . format_string($skype->name), "", "", true, update_module_button($cm->id, $course->id, $strskype), navmenu($course, $cm));
/// Print the form
if (isadmin()) {
    $isadm = "<br>\n\t\t<b>Notes:</b><br>1- Users with no registered skype IDs in their profiles will not be shown the list above.\n\t\t<br>2- Higher lever users (i.e: admins) will not follow a group, so they will see all users regardless of their group in this course.\n\t\t<hr>";
}
$isadm .= $skype->description . "<hr>";
echo "\n\n\t<script language=\"JavaScript\" type=\"text/javascript\">\n\n\tfunction loopSelected()\n\t{\n\n\t\t// var txtSelectedValuesObj = document.getElementById('txtSelectedValues');\n\t\tvar selectedArray = new Array();\n\t\tvar selObj = document.getElementById('calll');\n\t\tvar i;\n\t\tvar count = 0;\n\t\tfor (i=0; i<selObj.options.length; i++) {\n\t\t\tif (selObj.options[i].selected) {\n\t\t\t\tselectedArray[count] = selObj.options[i].value;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t//txtSelectedValuesObj.value = selectedArray;\n\n\t\tif(count == 0) {\n\t\t\talert(\"" . get_string("choosealert", "skype") . "\");\n\t\t}\n\t\telse {\n\t\t\twindow.open('call.php?id='+selectedArray, 'Skype',\n\t\t'scrollbars=no,menubar=no,resizable=no,toolbar=no,width=500,height=15');\n\t\t}\n\n\n\t\t}\n\n\t</script>\n\n\t<form name=our method=get>\n\t<table border=0 align=center width='90%'>\n\t<tr><td colspan=3>{$isadm}</td></tr>\n\t<tr>\n\t<td valign=top><br />\n\t<select name=calls id = calll multiple size=30 >\n\t" . skype_show($skype, $USER, $cm, "form") . "\n\t</select>\n\t</td>\n\t<td valign=top><br /><input type=button value = \"<< " . get_string("choose", "skype") . "\" onClick=\"loopSelected();\"></td>\n\t<td valign=top>\n\t<!-- hide skypecasts coz skype is no more offering that! \n\t<iframe style=\"border:0px\" frameborder=0 src=\"cast.php?id={$id}\" width='600' height=\"400\">\n\t-->\n\t";
include "note.html";
echo "\n\t<br><br><font size=-2>Note: Skypecasts is no more available by skype.</font></td></tr>\n\n\t</table>\n\t</form>\n\t";
print_footer($course);