PHP icalendar | Google Calendar and PHP icalendar | MRBS Room booking Calendar | Feed2JS (RSS Feed to JavaScript) |
I created a
.htaccess restricted subdirectory named restricted. Then I copied all the files to the subdirectory (chmod as required), and changed the files in the unrestricted directory to point to the restricted directory [e.g. in day.php etc, href=\"restricted/edit_entry.php] and removed the links to admin.php. I deleted the edit_entry.php and admin.php in the unrestricted directory. If you only use english you may modify wording by changing the lang.en file and change config.inc.php to disable_automatic_language_changing = 1; (0 is the default and sets the language based on the user's preference). We get the error message [Warning: Server failed to set locale to "_" (Unix)]
so we used the command 'locale -a' on fraser, e.g.,
In order to show that a booking is part of a series in day.php I added an asterisk to the booking:
Line 182: changed sql $tbl_entry.description AS entry_description to
science_fraser% locale -a
C
POSIX
en_CA
en_CA.ISO8859-1
en_CA.UTF-8
en_US [etc]
Then set the locale in config.inc.php as shown here:
// Set this to a valid locale (for the OS you run the MRBS server on)
// if you want to override the automatic locale determination MRBS
// performs
$override_locale = "en_CA.UTF-8"; //SFU changed to n_CA.UTF-8 from blank
and the error message was gone.
$tbl_entry.description AS entry_description, entry_type
Line 233: Added line after $today[$row['room_id']][date($format,$t)]["long_descr"] = "";
$today[$row['room_id']][date($format,$t)]["repeatdc"] = ($row['entry_type'] ? '*' : ''); //Added SFU to show repeating
Line 423: Added line after $long_descr = htmlspecialchars($today[$room_id][$time_t]["long_descr"]);
$repeatdc = $today[$room_id][$time_t]["repeatdc"]; //Added by Dave Carmean SFU to show repeating
Line 500: Added $repeatdc to show asterisk in
echo "<a href=\"view_entry.php?id=$id&area=$area&day=$day&month=$month&year=$year\" title=\"$long_descr\">$descr$repeatdc</a>\n";
I commented out the "lastmonth" table cell at the bottom of mincals.inc to remove the small calendar for the previous month (people generally don't want to know what rooms were available in the past, and it made extra space for comments).
See my comments about creating additional tables in tables.my.sql. so you can have different administrators and different websites.
The original (which has links) was:
echo "<th width=\"$room_column_width%\">
<a
href=\"week.php?year=$year&month=$month&day=$day&area=$area&room=$row[2]\"
title=\"" . get_vocab("viewweek") . " $row[3]\">"
. htmlspecialchars($row[0]) . ($row[1] > 0 ? "($row[1])" : "") .
"</a></th>";
Last login: Fri Feb 22 19:46:31 on console account-iMac:~ account$ ssh account@fraser.sfu.ca Assigned terminal type is: xterm-color 1: account_fraser% cd sec_html /home/account/sec_html [On the mac I renamed the downloaded mrbs-1.4.9.tar.gz to mrbs.tar.gz and dragged it to the open sec_html directory] 5: account_fraser% ls . .AppleDouble mrbs.tar.gz .. :2e_mrbs.tar.gz 6: account_fraser% tar -xvzf mrbs.tar.gz tar: z: unknown function modifier 8: account_fraser% gtar -xvzf mrbs.tar.gz mrbs-1.4.9/ mrbs-1.4.9/grant.pg.sql .... [approx 1300 files extracted] 9: account_fraser% chmod 711 mrbs 10: account_fraser% cd mrbs /home/account/sec_html/mrbs 11: account_fraser% chmod 711 web 12: account_fraser% cd web /home/account/sec_html/mrbs/web 13: account_fraser% mysql -h mysql.server.sfu.ca -u mysqluser -p Enter : Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2638668 Server version: 5.1.xx-log MySQL Community Server (GPL) by Remi Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> source /home/account/sec_html/mrbs/tables.my.sql; Current database: dept_advising Query OK, 0 rows affected (0.08 sec) ... Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 1 row affected (0.00 sec) Query OK, 1 row affected (0.00 sec) mysql> show tables; +------------------------+ | Tables_in_dept_advising | +------------------------+ | mrbs_dept_area | | mrbs_dept_entry | | mrbs_dept_repeat | | mrbs_dept_room | | mrbs_dept_users | | mrbs_dept_variables | | mrbs_dept_zoneinfo | +------------------------+ 20 rows in set (0.00 sec) mysql> exit; Bye 14: account_fraser% cd web ~/sec_html/mrbs/web /home/account/sec_html/mrbs/web 15: account_fraser% chmod 644 *.html 16: account_fraser% chmod 644 *.txt 33: account_fraser% cat .htaccess <Files ~ "\.inc$"> Order allow,deny Deny from all </Files> 34: account_fraser% pico .htaccess [added lines to control access to all sfu accounts] 35: account_fraser% cat .htaccess AuthType CAS require valid-sfu-user <Files ~ "\.inc$"> Order allow,deny Deny from all </Files> 23: account_fraser% chmod 644 .htaccess 24: account_fraser% chmod 700 *.php 25: account_fraser% chmod 711 css 26: account_fraser% cd css /home/account/sec_html/mrbs/web/css 27: account_fraser% chmod 644 *.css 28: account_fraser% chmod 700 *.php 32: account_fraser% cd .. /home/account/sec_html/mrbs/web 36: account_fraser% chmod 711 Themes 37: account_fraser% cd Themes /home/account/sec_html/mrbs/web/Themes 38: account_fraser% chmod 711 default 39: account_fraser% cd default /home/account/sec_html/mrbs/web/Themes/default 41: account_fraser% cd /home/account/sec_html/mrbs/web/images /home/account/sec_html/mrbs/web/images 42: account_fraser% chmod 644 *.* 43: account_fraser% chmod 711 /home/account/sec_html/mrbs/web/images 29: account_fraser% locale -a C POSIX en_CA en_CA.ISO8859-1 en_CA.UTF-8 en_US ....2014:
ssh youraccount@fraser.sfu.ca 53: userhome_fraser% cd /home/user/sec_html/ /home/user/sec_html 54: userhome_fraser% mkdir web 55: userhome_fraser% chmod 711 web 56: userhome_fraser% cd web /home/user/sec_html/web 57: userhome_fraser% pico .htaccess 58: userhome_fraser% chmod 644 .htaccess 59: userhome_fraser% cat .htaccess AuthType CAS require valid-sfu-user <Files ~ "\.inc$"> Order allow,deny Deny from all </Files> 60: userhome_fraser% chmod 711 Blowfish chmod 711 css chmod 711 File chmod 711 File/Psswd chmod 711 Mail chmod 711 Net chmod 711 Themes chmod 711 Themes/default chmod 711 Themes/classic126 chmod 711 js chmod 700 *.php chmod 700 Blowfish/*.php chmod 700 css/*.php chmod 700 File/Psswd/*.php chmod 700 File/*.php chmod 700 js/*.php chmod 700 Mail/*.php chmod 700 Net/*.php 61: userhome_fraser% ... 78: userhome_fraser%