$sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.' WHERE original_name="'.Database::escape_string($original_name).'" ';
$sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.' WHERE english_name="'.Database::escape_string($english_name).'" ';
$sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.' WHERE original_name="'.Database::escape_string($original_name).'" ';
$sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.' WHERE english_name="'.Database::escape_string($english_name).'" ';
//$sql_isocode='SELECT count(*) AS count_isocode FROM '.$tbl_admin_languages.' WHERE isocode="'.Database::escape_string($isocode).'" ';
echo "<br/>\n<b>phpCAS error</b>: <fontcolor=\"FF0000\"><b>".__CLASS__."::".$function.'(): '.htmlentities($msg)."</b></font> in <b>".$file."</b> on line <b>".$line."</b><br/>\n";
echo "<br/>\n<b>phpCAS error</b>: <fontcolor=\"FF0000\"><b>".__CLASS__."::".$function.'(): '.htmlentities($msg)."</b></font> in <b>".$file."</b> on line <b>".$line."</b><br/>\n";
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (gettype($lang) != 'string') {
self::error('type mismatched for parameter $lang (should be `string\')');
@ -703,7 +703,7 @@ class phpCAS
{
global $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (gettype($header) != 'string') {
self::error('type mismatched for parameter $header (should be `string\')');
@ -720,7 +720,7 @@ class phpCAS
{
global $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (gettype($footer) != 'string') {
self::error('type mismatched for parameter $footer (should be `string\')');
@ -750,13 +750,13 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if ($PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
self::error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
}
if (gettype($format) != 'string') {
self::error('type mismatched for parameter $format (should be `string\')');
@ -796,13 +796,13 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if ($PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
self::error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
}
if (gettype($user) != 'string') {
self::error('type mismatched for parameter $user (should be `string\')');
@ -857,16 +857,16 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
self::error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
}
if (gettype($url) != 'string') {
self::error('type mismatched for parameter $url (should be `string\')');
@ -901,16 +901,16 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
self::error('this method should only be called after '.__CLASS__.'::proxy()');
self::error('this method should only be called after '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
self::error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
}
if (gettype($url) != 'string') {
self::error('type mismatched for parameter $url (should be `string\')');
@ -947,7 +947,7 @@ class phpCAS
{
global $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (gettype($n) != 'integer') {
self::error('type mismatched for parameter $header (should be `string\')');
@ -965,7 +965,7 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
$auth = $PHPCAS_CLIENT->checkAuthentication();
@ -976,7 +976,7 @@ class phpCAS
'done' => true,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__.'::'.__FUNCTION__,
'method' => __CLASS__.'::'.__FUNCTION__,
'result' => $auth
);
self::traceEnd($auth);
@ -994,7 +994,7 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
$auth = $PHPCAS_CLIENT->forceAuthentication();
@ -1005,7 +1005,7 @@ class phpCAS
'done' => true,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__.'::'.__FUNCTION__,
'method' => __CLASS__.'::'.__FUNCTION__,
'result' => $auth
);
@ -1013,7 +1013,7 @@ class phpCAS
self::trace('user is not authenticated, redirecting to the CAS server');
$PHPCAS_CLIENT->forceAuthentication();
} else {
self::trace('no need to authenticate (user `'.self::getUser().'\' is already authenticated)');
self::trace('no need to authenticate (user `'.self::getUser().'\' is already authenticated)');
}
self::traceEnd();
@ -1029,7 +1029,7 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before'.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before'.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
// store where the authentication has been checked and the result
@ -1038,7 +1038,7 @@ class phpCAS
'done' => true,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__.'::'.__FUNCTION__,
'method' => __CLASS__.'::'.__FUNCTION__,
'result' => $auth
);
@ -1051,7 +1051,7 @@ class phpCAS
*/
public function authenticate()
{
self::error('this method is deprecated. You should use '.__CLASS__.'::forceAuthentication() instead');
self::error('this method is deprecated. You should use '.__CLASS__.'::forceAuthentication() instead');
}
/**
@ -1066,7 +1066,7 @@ class phpCAS
self::traceBegin();
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
// call the isAuthenticated method of the global $PHPCAS_CLIENT object
@ -1078,7 +1078,7 @@ class phpCAS
'done' => true,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__.'::'.__FUNCTION__,
'method' => __CLASS__.'::'.__FUNCTION__,
'result' => $auth
);
self::traceEnd($auth);
@ -1095,7 +1095,7 @@ class phpCAS
{
global $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
self::error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
}
return $PHPCAS_CLIENT->getUser();
}
@ -1133,13 +1133,13 @@ class phpCAS
{
global $PHPCAS_CLIENT, $PHPCAS_AUTH_CHECK_CALL;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
self::error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
self::error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
self::error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
}
return $PHPCAS_CLIENT->getAttributes();
}
@ -1151,7 +1151,7 @@ class phpCAS
{
global $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
self::error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
<?phpechoDisplay::display_icon('delete.png',get_lang('Delete'),array('onclick'=>"javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"),ENT_QUOTES,api_get_system_encoding()))."')) return false;"),22)?>
<?phpechoDisplay::display_icon('delete.png',get_lang('Delete'),array('onclick'=>"javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"),ENT_QUOTES,api_get_system_encoding()))."')) return false;"),22)?>
</a>
<?php}
$counter++;
@ -116,35 +116,35 @@ if (!empty($user_course_categories)) {
<divstyle="float:left;width:110px;">
<?php
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {