<?php
$dbase =      "hardweb";
$dbuser =     "hardweb";

$script_name = getenv('SCRIPT_NAME');

$author = 0;	

$katedra = 105;	/* KOS id katedry pocitacu */

$t_hours = array(" 6:45", " 7:30", " 8:15", " 9:15","10:00", "11:00","11:45", 
                         "12:45","13:30","14:30","15:15","16:15","17:00",
                         "18:00","18:45");


define ("COURSES_DIR","/data/hardweb/courses");
define ("COURSES_URL","/courses");
define ("ARCHIVES_DIR","/data/hardweb/archives");
define ("ARCHIVES_URL","/archives");

function getCourseDir ($course) {
    return COURSES_DIR."/".$course;
}
function getCourseURL ($course) {
    return COURSES_URL."/".$course;
}
// ------------ course classes --------------------------------
define ("SERVICE_CCL",2);		// anything maintained by service
define ("HARDWEB_CCL",1);		// hardware course

// ----------- relevant methods from httpd.h ------------------ 

define ("ACCESS_GET",		1<<0);		// RFC2068 HTTP
define ("ACCESS_PUT",		1<<1);		//    "
define ("ACCESS_POST",		1<<2);		//    "
define ("ACCESS_DELETE",	1<<3);		//    "
define ("ACCESS_PATCH",		1<<7);		//    "
define ("ACCESS_PROPFIND",	1<<8);		// RFC2518 DAV (get (member) properties)
define ("ACCESS_PROPPATCH",	1<<9);		// RFC2518 DAV (set (member) properties)
define ("ACCESS_MKCOL",		1<<10);		// RFC2518 DAV (make collection)
define ("ACCESS_COPY",		1<<11);		// RFC2518 DAV
define ("ACCESS_MOVE",		1<<12);		// RFC2518 DAV
define ("ACCESS_LOCK",		1<<13);		//    "
define ("ACCESS_UNLOCK",	1<<14);		//    "

// ------------ access modes ----------------------------------

define("ACCESS_NONE",		0);  
define("ACCESS_RO",		ACCESS_GET | ACCESS_POST | ACCESS_PROPFIND);  
define("ACCESS_RW",		65535);

function access_to_str($i) {
  if ($i == ACCESS_NONE) return "-";
  if ($i == ACCESS_RO)   return "ro";
  if ($i == ACCESS_RW)   return  "rw";
  return $i;
}

// ----------- admin methods ---------------------------------
define ("ADMIN_DO",		1);		// set/change user access rights
define ("ADMIN_GIVE", 		2);		// set/change user admin rights
?>
