gestion 1.9.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +48 -0
  3. data/.project +14 -0
  4. data/Binaries/adduser_to_buzz +15 -0
  5. data/Binaries/backup +7 -0
  6. data/Binaries/check_gestion +8 -0
  7. data/Binaries/gestion.gnumail +22 -0
  8. data/Binaries/gestion.logrotate +34 -0
  9. data/Binaries/gestion.service +12 -0
  10. data/Binaries/gestion_update.rb +183 -0
  11. data/Binaries/gestion_update.service +10 -0
  12. data/Binaries/get_compta +11 -0
  13. data/Binaries/kill_gestion +16 -0
  14. data/Binaries/ldap/add_indexes +51 -0
  15. data/Binaries/ldap/backup +2 -0
  16. data/Binaries/ldap/install_ldap +92 -0
  17. data/Binaries/ldap/restore +7 -0
  18. data/Binaries/lib_backup +5 -0
  19. data/Binaries/log_scan_errors +8 -0
  20. data/Binaries/loop_gestion +64 -0
  21. data/Binaries/onetimers/sync_courses_from_compta.rb +74 -0
  22. data/Binaries/onetimers/transfer_cash_from_ldap_to_csv +26 -0
  23. data/Binaries/reboot +5 -0
  24. data/Binaries/restore +3 -0
  25. data/Binaries/restore_do +22 -0
  26. data/Binaries/sort_events +31 -0
  27. data/Binaries/start_gestion +18 -0
  28. data/Binaries/swipe_gestion +18 -0
  29. data/Binaries/update_africompta +21 -0
  30. data/Binaries/update_users +3 -0
  31. data/Diplomas.src/accredited.odg +0 -0
  32. data/Diplomas.src/diploma.odg +0 -0
  33. data/Diplomas.src/label.odg +0 -0
  34. data/Diplomas.src/presence_sheet.ods +0 -0
  35. data/Diplomas.src/presence_sheet_small.ods +0 -0
  36. data/Diplomas.src/student_card.odg +0 -0
  37. data/Doc/130514-it-ideas.odt +0 -0
  38. data/Doc/Compta-cash.mm +179 -0
  39. data/Doc/General.odt +0 -0
  40. data/Entities/AccessGroups.rb +117 -0
  41. data/Entities/Activity.rb +178 -0
  42. data/Entities/ChatMsg.rb +142 -0
  43. data/Entities/Classroom.rb +11 -0
  44. data/Entities/Client.rb +19 -0
  45. data/Entities/Computer.rb +21 -0
  46. data/Entities/ConfigBase.rb +280 -0
  47. data/Entities/Course.rb +1588 -0
  48. data/Entities/CourseType.rb +171 -0
  49. data/Entities/DFiles.rb +466 -0
  50. data/Entities/FilesManage.rb +226 -0
  51. data/Entities/Grade.rb +186 -0
  52. data/Entities/Internet.rb +300 -0
  53. data/Entities/Netdev.rb +10 -0
  54. data/Entities/Person.rb +1175 -0
  55. data/Entities/Plug.rb +98 -0
  56. data/Entities/Quiz.rb +33 -0
  57. data/Entities/Recharges.rb +37 -0
  58. data/Entities/Report.rb +136 -0
  59. data/Entities/Room.rb +12 -0
  60. data/Entities/SMS.rb +30 -0
  61. data/Entities/ScheduleType.rb +33 -0
  62. data/Entities/Share.rb +120 -0
  63. data/Entities/Task.rb +51 -0
  64. data/Entities/Ticket.rb +72 -0
  65. data/Entities/Usage.rb +143 -0
  66. data/Entities/Worker.rb +29 -0
  67. data/Files/apache-profeda.conf +36 -0
  68. data/Files/label.erb +121 -0
  69. data/Files/label_notfound.erb +64 -0
  70. data/Files/label_notpassed.erb +84 -0
  71. data/Files/mobileinfo.erb +115 -0
  72. data/Files/smb.conf +333 -0
  73. data/Files/timetable.html +36 -0
  74. data/Files/timetable.js +239 -0
  75. data/Gemfile +12 -0
  76. data/Gemfile.dev +12 -0
  77. data/Gemfile.dev.lock +127 -0
  78. data/Gemfile.lock +127 -0
  79. data/Gemfile.prod +8 -0
  80. data/Gestion +35 -0
  81. data/Gestion.rb +220 -0
  82. data/INSTALL +40 -0
  83. data/Images/connection.xcf +0 -0
  84. data/Images/connection_no.png +0 -0
  85. data/Images/connection_wait.png +0 -0
  86. data/Images/connection_yes.png +0 -0
  87. data/Paths/Exas.rb +13 -0
  88. data/Paths/Files.rb +19 -0
  89. data/Paths/GetDiplomas.rb +20 -0
  90. data/Paths/Info.rb +114 -0
  91. data/Paths/Label.rb +187 -0
  92. data/Paths/MobileInfo.rb +19 -0
  93. data/Paths/internetCash.rb +34 -0
  94. data/Paths/internetWifi.rb +54 -0
  95. data/README.md +60 -0
  96. data/Rakefile +13 -0
  97. data/TODO +1391 -0
  98. data/Test/.gitignore +3 -0
  99. data/Test/Diplomas/base_gestion.odt +0 -0
  100. data/Test/Diplomas/base_report.odt +0 -0
  101. data/Test/Diplomas/carte_etudiant.odg +0 -0
  102. data/Test/Diplomas/exam_language.odt +0 -0
  103. data/Test/Diplomas/label.odg +0 -0
  104. data/Test/Diplomas/presence_sheet.ods +0 -0
  105. data/Test/Diplomas/presence_sheet_small.ods +0 -0
  106. data/Test/Diplomas/student_card.odg +0 -0
  107. data/Test/Manual/testMerge +18 -0
  108. data/Test/config_test.yaml +26 -0
  109. data/Test/db.testGestion +0 -0
  110. data/Test/dfiles/descs/avg-rescue.desc +10 -0
  111. data/Test/dfiles/descs/avg.desc +8 -0
  112. data/Test/dfiles/descs/driver.desc +8 -0
  113. data/Test/dfiles/descs/linuxmint.desc +7 -0
  114. data/Test/dfiles/files/avg-160203.exe +1 -0
  115. data/Test/dfiles/files/avg.iso +1 -0
  116. data/Test/dfiles/files/driver.exe +1 -0
  117. data/Test/dfiles/index_post.html +3 -0
  118. data/Test/dfiles/index_pre.html +8 -0
  119. data/Test/dfiles/priorities +5 -0
  120. data/Test/ge_activity.rb +124 -0
  121. data/Test/ge_chat.rb +106 -0
  122. data/Test/ge_compta.rb +67 -0
  123. data/Test/ge_configbase.rb +54 -0
  124. data/Test/ge_course.rb +1114 -0
  125. data/Test/ge_dfiles.rb +121 -0
  126. data/Test/ge_filesmanage.rb +180 -0
  127. data/Test/ge_info.rb +27 -0
  128. data/Test/ge_internet.rb +246 -0
  129. data/Test/ge_login.rb +55 -0
  130. data/Test/ge_person.rb +373 -0
  131. data/Test/ge_qvinfo.rb +28 -0
  132. data/Test/ge_report.rb +97 -0
  133. data/Test/ge_share.rb +27 -0
  134. data/Test/ge_sms.rb +34 -0
  135. data/Test/ge_tasks.rb +19 -0
  136. data/Test/ge_usage.rb +168 -0
  137. data/Test/ge_view.rb +46 -0
  138. data/Test/multiconf-captive +29 -0
  139. data/Test/test.conf +7 -0
  140. data/Test/test.rb +49 -0
  141. data/Test/test_bytes.png +0 -0
  142. data/VERSION +140 -0
  143. data/Views/Admin/Backup.rb +91 -0
  144. data/Views/Admin/Configuration.rb +44 -0
  145. data/Views/Admin/Credit.rb +32 -0
  146. data/Views/Admin/FilesManage.rb +219 -0
  147. data/Views/Admin/Function.rb +39 -0
  148. data/Views/Admin/Power.rb +49 -0
  149. data/Views/Admin/Printer.rb +37 -0
  150. data/Views/Admin/Server.rb +252 -0
  151. data/Views/Admin/Tabs.rb +5 -0
  152. data/Views/Admin/Update.rb +73 -0
  153. data/Views/Admin/UpdateSystem.rb +26 -0
  154. data/Views/Cashbox/Activity.rb +191 -0
  155. data/Views/Cashbox/Course.rb +141 -0
  156. data/Views/Cashbox/Credit.rb +79 -0
  157. data/Views/Cashbox/Report.rb +115 -0
  158. data/Views/Cashbox/Service.rb +105 -0
  159. data/Views/Cashbox/Tabs.rb +10 -0
  160. data/Views/Compta/Accounts.rb +36 -0
  161. data/Views/Compta/Course.rb +96 -0
  162. data/Views/Compta/Show.rb +6 -0
  163. data/Views/Compta/Transfer.rb +66 -0
  164. data/Views/Course/Diploma.rb +203 -0
  165. data/Views/Course/Grade.rb +401 -0
  166. data/Views/Course/Modify.rb +447 -0
  167. data/Views/Course/Print.rb +94 -0
  168. data/Views/Course/Responsible.rb +44 -0
  169. data/Views/Course/Stats.rb +76 -0
  170. data/Views/Course/Students.rb +92 -0
  171. data/Views/Course/Tabs.rb +220 -0
  172. data/Views/Internet/Access.rb +134 -0
  173. data/Views/Internet/ClassEdit.rb +24 -0
  174. data/Views/Internet/ClassUsers.rb +81 -0
  175. data/Views/Internet/Config.rb +32 -0
  176. data/Views/Internet/Mobile.rb +213 -0
  177. data/Views/Internet/Recharges.rb +49 -0
  178. data/Views/Internet/Tabs.rb +6 -0
  179. data/Views/Inventory/Computer.rb +24 -0
  180. data/Views/Inventory/Room.rb +18 -0
  181. data/Views/Inventory/Tabs.rb +9 -0
  182. data/Views/Inventory/TicketClosed.rb +7 -0
  183. data/Views/Inventory/TicketOpen.rb +23 -0
  184. data/Views/Library/Person.rb +36 -0
  185. data/Views/Library/Tabs.rb +7 -0
  186. data/Views/Network/Block.rb +87 -0
  187. data/Views/Network/Netdevs.rb +21 -0
  188. data/Views/Network/Restriction.rb +37 -0
  189. data/Views/Network/Share.rb +167 -0
  190. data/Views/Network/Tables.rb +28 -0
  191. data/Views/Network/Tabs.rb +6 -0
  192. data/Views/Person/Admin.rb +99 -0
  193. data/Views/Person/Center.rb +48 -0
  194. data/Views/Person/Course.rb +72 -0
  195. data/Views/Person/Modify.rb +153 -0
  196. data/Views/Person/Tabs.rb +162 -0
  197. data/Views/Report/ComptaExecutive.rb +221 -0
  198. data/Views/Report/ComptaFlat.rb +79 -0
  199. data/Views/Report/ReportCourse.rb +47 -0
  200. data/Views/Report/Tabs.rb +8 -0
  201. data/Views/Report/Usage.rb +52 -0
  202. data/Views/Report/UsageCases.rb +59 -0
  203. data/Views/Self/Cash.rb +67 -0
  204. data/Views/Self/Chat.rb +55 -0
  205. data/Views/Self/Concours.rb +109 -0
  206. data/Views/Self/Email.rb +34 -0
  207. data/Views/Self/Internet.rb +255 -0
  208. data/Views/Self/Results.rb +17 -0
  209. data/Views/Self/Services.rb +85 -0
  210. data/Views/Self/Show.rb +47 -0
  211. data/Views/Self/Tabs.rb +5 -0
  212. data/Views/Special/DFileEdit.rb +13 -0
  213. data/Views/Special/PlugEdit.rb +56 -0
  214. data/Views/Special/Tabs.rb +6 -0
  215. data/Views/Special/Vnc.rb +39 -0
  216. data/Views/Task/Client.rb +21 -0
  217. data/Views/Task/Edit.rb +33 -0
  218. data/Views/Task/List.rb +55 -0
  219. data/Views/Task/Tabs.rb +9 -0
  220. data/Views/Task/Worker.rb +30 -0
  221. data/Views/Template/Activity.rb +33 -0
  222. data/Views/Template/CourseType.rb +63 -0
  223. data/Views/Template/ScheduleType.rb +29 -0
  224. data/Views/Template/Tabs.rb +5 -0
  225. data/Views/Welcome.rb +121 -0
  226. data/config.yaml.default +36 -0
  227. data/po/Gestion-ar.po +2356 -0
  228. data/po/Gestion-en.mo +0 -0
  229. data/po/Gestion-en.po +4363 -0
  230. data/po/Gestion-fr.mo +0 -0
  231. data/po/Gestion-fr.po +4345 -0
  232. data/po/traduction-ar.rtf +76 -0
  233. metadata +381 -0
data/Files/smb.conf ADDED
@@ -0,0 +1,333 @@
1
+ #
2
+ # Sample configuration file for the Samba suite for Debian GNU/Linux.
3
+ #
4
+ #
5
+ # This is the main Samba configuration file. You should read the
6
+ # smb.conf(5) manual page in order to understand the options listed
7
+ # here. Samba has a huge number of configurable options most of which
8
+ # are not shown in this example
9
+ #
10
+ # Some options that are often worth tuning have been included as
11
+ # commented-out examples in this file.
12
+ # - When such options are commented with ";", the proposed setting
13
+ # differs from the default Samba behaviour
14
+ # - When commented with "#", the proposed setting is the default
15
+ # behaviour of Samba but the option is considered important
16
+ # enough to be mentioned here
17
+ #
18
+ # NOTE: Whenever you modify this file you should run the command
19
+ # "testparm" to check that you have not made any basic syntactic
20
+ # errors.
21
+ # A well-established practice is to name the original file
22
+ # "smb.conf.master" and create the "real" config file with
23
+ # testparm -s smb.conf.master >smb.conf
24
+ # This minimizes the size of the really used smb.conf file
25
+ # which, according to the Samba Team, impacts performance
26
+ # However, use this with caution if your smb.conf file contains nested
27
+ # "include" statements. See Debian bug #483187 for a case
28
+ # where using a master file is not a good idea.
29
+ #
30
+
31
+ #======================= Global Settings =======================
32
+
33
+ [global]
34
+
35
+ ## Browsing/Identification ###
36
+
37
+ # Change this to the workgroup/NT-domain name your Samba server will part of
38
+ workgroup = WORKGROUP
39
+
40
+ # server string is the equivalent of the NT Description field
41
+ server string = SERVER
42
+
43
+ # Windows Internet Name Serving Support Section:
44
+ # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
45
+ # wins support = no
46
+
47
+ # WINS Server - Tells the NMBD components of Samba to be a WINS Client
48
+ # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
49
+ ; wins server = w.x.y.z
50
+
51
+ # This will prevent nmbd to search for NetBIOS names through DNS.
52
+ dns proxy = no
53
+
54
+ # What naming service and in what order should we use to resolve host names
55
+ # to IP addresses
56
+ ; name resolve order = lmhosts host wins bcast
57
+
58
+ #### Networking ####
59
+
60
+ # The specific set of interfaces / networks to bind to
61
+ # This can be either the interface name or an IP address/netmask;
62
+ # interface names are normally preferred
63
+ ; interfaces = 127.0.0.0/8 eth0
64
+
65
+ # Only bind to the named interfaces and/or networks; you must use the
66
+ # 'interfaces' option above to use this.
67
+ # It is recommended that you enable this feature if your Samba machine is
68
+ # not protected by a firewall or is a firewall itself. However, this
69
+ # option cannot handle dynamic or non-broadcast interfaces correctly.
70
+ ; bind interfaces only = yes
71
+
72
+
73
+
74
+ #### Debugging/Accounting ####
75
+
76
+ # This tells Samba to use a separate log file for each machine
77
+ # that connects
78
+ log file = /var/log/samba/log.%m
79
+
80
+ # Cap the size of the individual log files (in KiB).
81
+ max log size = 1000
82
+
83
+ # If you want Samba to only log through syslog then set the following
84
+ # parameter to 'yes'.
85
+ # syslog only = no
86
+
87
+ # We want Samba to log a minimum amount of information to syslog. Everything
88
+ # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
89
+ # through syslog you should set the following parameter to something higher.
90
+ syslog = 0
91
+
92
+ # Do something sensible when Samba crashes: mail the admin a backtrace
93
+ panic action = /usr/share/samba/panic-action %d
94
+
95
+
96
+ ####### Authentication #######
97
+
98
+ # "security = user" is always a good idea. This will require a Unix account
99
+ # in this server for every user accessing the server. See
100
+ # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
101
+ # in the samba-doc package for details.
102
+ security = user
103
+ map to guest = Bad User
104
+
105
+ # You may wish to use password encryption. See the section on
106
+ # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
107
+ encrypt passwords = true
108
+
109
+ # If you are using encrypted passwords, Samba will need to know what
110
+ # password database type you are using.
111
+ passdb backend = tdbsam
112
+
113
+ obey pam restrictions = yes
114
+
115
+ # This boolean parameter controls whether Samba attempts to sync the Unix
116
+ # password with the SMB password when the encrypted SMB password in the
117
+ # passdb is changed.
118
+ unix password sync = yes
119
+
120
+ # For Unix password sync to work on a Debian GNU/Linux system, the following
121
+ # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
122
+ # sending the correct chat script for the passwd program in Debian Sarge).
123
+ passwd program = /usr/bin/passwd %u
124
+ passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
125
+
126
+ # This boolean controls whether PAM will be used for password changes
127
+ # when requested by an SMB client instead of the program listed in
128
+ # 'passwd program'. The default is 'no'.
129
+ pam password change = yes
130
+
131
+ ########## Domains ###########
132
+
133
+ # Is this machine able to authenticate users. Both PDC and BDC
134
+ # must have this setting enabled. If you are the BDC you must
135
+ # change the 'domain master' setting to no
136
+ #
137
+ ; domain logons = yes
138
+ #
139
+ # The following setting only takes effect if 'domain logons' is set
140
+ # It specifies the location of the user's profile directory
141
+ # from the client point of view)
142
+ # The following required a [profiles] share to be setup on the
143
+ # samba server (see below)
144
+ ; logon path = \\%N\profiles\%U
145
+ # Another common choice is storing the profile in the user's home directory
146
+ # (this is Samba's default)
147
+ # logon path = \\%N\%U\profile
148
+
149
+ # The following setting only takes effect if 'domain logons' is set
150
+ # It specifies the location of a user's home directory (from the client
151
+ # point of view)
152
+ ; logon drive = H:
153
+ # logon home = \\%N\%U
154
+
155
+ # The following setting only takes effect if 'domain logons' is set
156
+ # It specifies the script to run during logon. The script must be stored
157
+ # in the [netlogon] share
158
+ # NOTE: Must be store in 'DOS' file format convention
159
+ ; logon script = logon.cmd
160
+
161
+ # This allows Unix users to be created on the domain controller via the SAMR
162
+ # RPC pipe. The example command creates a user account with a disabled Unix
163
+ # password; please adapt to your needs
164
+ ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
165
+
166
+ # This allows machine accounts to be created on the domain controller via the
167
+ # SAMR RPC pipe.
168
+ # The following assumes a "machines" group exists on the system
169
+ ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
170
+
171
+ # This allows Unix groups to be created on the domain controller via the SAMR
172
+ # RPC pipe.
173
+ ; add group script = /usr/sbin/addgroup --force-badname %g
174
+
175
+ ########## Printing ##########
176
+
177
+ # If you want to automatically load your printer list rather
178
+ # than setting them up individually then you'll need this
179
+ # load printers = yes
180
+
181
+ # lpr(ng) printing. You may wish to override the location of the
182
+ # printcap file
183
+ ; printing = bsd
184
+ ; printcap name = /etc/printcap
185
+
186
+ # CUPS printing. See also the cupsaddsmb(8) manpage in the
187
+ # cupsys-client package.
188
+ ; printing = cups
189
+ ; printcap name = cups
190
+
191
+ ############ Misc ############
192
+
193
+ # Using the following line enables you to customise your configuration
194
+ # on a per machine basis. The %m gets replaced with the netbios name
195
+ # of the machine that is connecting
196
+ ; include = /home/samba/etc/smb.conf.%m
197
+
198
+ # Most people will find that this option gives better performance.
199
+ # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
200
+ # for details
201
+ # You may want to add the following on a Linux system:
202
+ # SO_RCVBUF=8192 SO_SNDBUF=8192
203
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
204
+
205
+ # The following parameter is useful only if you have the linpopup package
206
+ # installed. The samba maintainer and the linpopup maintainer are
207
+ # working to ease installation and configuration of linpopup and samba.
208
+ ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
209
+
210
+ # Domain Master specifies Samba to be the Domain Master Browser. If this
211
+ # machine will be configured as a BDC (a secondary logon server), you
212
+ # must set this to 'no'; otherwise, the default behavior is recommended.
213
+ # domain master = auto
214
+
215
+ # Some defaults for winbind (make sure you're not using the ranges
216
+ # for something else.)
217
+ ; idmap uid = 10000-20000
218
+ ; idmap gid = 10000-20000
219
+ ; template shell = /bin/bash
220
+
221
+ # The following was the default behaviour in sarge,
222
+ # but samba upstream reverted the default because it might induce
223
+ # performance issues in large organizations.
224
+ # See Debian bug #368251 for some of the consequences of *not*
225
+ # having this setting and smb.conf(5) for details.
226
+ ; winbind enum groups = yes
227
+ ; winbind enum users = yes
228
+
229
+ # Setup usershare options to enable non-root users to share folders
230
+ # with the net usershare command.
231
+
232
+ # Maximum number of usershare. 0 (default) means that usershare is disabled.
233
+ ; usershare max shares = 100
234
+
235
+ # Some settings for better use in windows 7 with Microsoft office
236
+ unix extensions = no
237
+ acl check permissions = no
238
+ nt acl support = no
239
+ hide files = /~$*/*.tmp/
240
+ blocking locks = no
241
+
242
+ #======================= Share Definitions =======================
243
+
244
+ #[homes]
245
+ # comment = Home Directories
246
+ # browseable = no
247
+
248
+ # By default, the home directories are exported read-only. Change the
249
+ # next parameter to 'no' if you want to be able to write to them.
250
+ # read only = yes
251
+
252
+ # File creation mask is set to 0700 for security reasons. If you want to
253
+ # create files with group=rw permissions, set next parameter to 0775.
254
+ # create mask = 0700
255
+
256
+ # Directory creation mask is set to 0700 for security reasons. If you want to
257
+ # create dirs. with group=rw permissions, set next parameter to 0775.
258
+ # directory mask = 0700
259
+
260
+ # By default, \\server\username shares can be connected to by anyone
261
+ # with access to the samba server.
262
+ # The following parameter makes sure that only "username" can connect
263
+ # to \\server\username
264
+ # This might need tweaking when using external authentication schemes
265
+ # valid users = %S
266
+
267
+ # Un-comment the following and create the netlogon directory for Domain Logons
268
+ # (you need to configure Samba to act as a domain controller too.)
269
+ ;[netlogon]
270
+ ; comment = Network Logon Service
271
+ ; path = /home/samba/netlogon
272
+ ; guest ok = yes
273
+ ; read only = yes
274
+
275
+ # Un-comment the following and create the profiles directory to store
276
+ # users profiles (see the "logon path" option above)
277
+ # (you need to configure Samba to act as a domain controller too.)
278
+ # The path below should be writable by all users so that their
279
+ # profile directory may be created the first time they log on
280
+ ;[profiles]
281
+ ; comment = Users profiles
282
+ ; path = /home/samba/profiles
283
+ ; guest ok = no
284
+ ; browseable = no
285
+ ; create mask = 0600
286
+ ; directory mask = 0700
287
+
288
+ [printers]
289
+ comment = All Printers
290
+ browseable = no
291
+ path = /var/spool/samba
292
+ printable = yes
293
+ guest ok = no
294
+ read only = yes
295
+ create mask = 0700
296
+
297
+ # Windows clients look for this share name as a source of downloadable
298
+ # printer drivers
299
+ [print$]
300
+ comment = Printer Drivers
301
+ path = /var/lib/samba/printers
302
+ browseable = yes
303
+ read only = yes
304
+ guest ok = no
305
+ # Uncomment to allow remote administration of Windows print drivers.
306
+ # You may need to replace 'lpadmin' with the name of the group your
307
+ # admin users are members of.
308
+ # Please note that you also need to set appropriate Unix permissions
309
+ # to the drivers directory for these users to have write rights in it
310
+ ; write list = root, @lpadmin
311
+
312
+ # A sample share for sharing your CD-ROM with others.
313
+ ;[cdrom]
314
+ ; comment = Samba server's CD-ROM
315
+ ; read only = yes
316
+ ; locking = no
317
+ ; path = /cdrom
318
+ ; guest ok = yes
319
+
320
+ # The next two parameters show how to auto-mount a CD-ROM when the
321
+ # cdrom share is accesed. For this to work /etc/fstab must contain
322
+ # an entry like this:
323
+ #
324
+ # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
325
+ #
326
+ # The CD-ROM gets unmounted automatically after the connection to the
327
+ #
328
+ # If you don't want to use auto-mounting/unmounting make sure the CD
329
+ # is mounted on /cdrom
330
+ #
331
+ ; preexec = /bin/mount /cdrom
332
+ ; postexec = /bin/umount /cdrom
333
+
@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head lang="en">
4
+ <meta charset="UTF-8">
5
+ <title></title>
6
+ <style type="text/css">
7
+ <!--
8
+ td.select {
9
+ background-color: #00ffff
10
+ }
11
+
12
+ -->
13
+ </style>
14
+ <script src="/source/qooxdoo-3.0.1-sdk/component/standalone/website/script/q-3.0.1.js"
15
+ type="text/javascript">
16
+ </script>
17
+ <script src="/Users/ineiti/Downloads/qooxdoo-3.0.1-sdk/component/standalone/website/script/q-3.0.1.js"
18
+ type="text/javascript">
19
+ </script>
20
+
21
+ <script src="timetable.js" type="text/javascript">
22
+ </script>
23
+ </head>
24
+ <body onload="add_weeks(16); add_days();add_hours();">
25
+ <table width="80%">
26
+ <tr id="tr_weeks">
27
+ </tr>
28
+ <tr id="tr_days">
29
+ </tr>
30
+ <tr id="tr_programs">
31
+ </tr>
32
+ <tr id="tr_hours">
33
+ </tr>
34
+ </table>
35
+ </body>
36
+ </html>
@@ -0,0 +1,239 @@
1
+ var total_hours = 72;
2
+
3
+ function qel(id) {
4
+ return q('#' + id)[0];
5
+ }
6
+
7
+ function unselect_do(elements) {
8
+ for (var i = 0; i < elements.length; i++) {
9
+ q('#' + elements[i].id).removeClass('select');
10
+ }
11
+ }
12
+
13
+ function unselect(id) {
14
+ unselect_do(q('.' + id));
15
+ switch (id) {
16
+ case 'hour':
17
+ unselect_do(q('.halfhour'));
18
+ select_halfhour();
19
+ break;
20
+ case 'halfhour':
21
+ unselect_do(q('.hour'));
22
+ break
23
+ case 'day':
24
+ case 'program':
25
+ unselect_do(q('.program'));
26
+ unselect_do(q('.day'));
27
+ break;
28
+ }
29
+ }
30
+
31
+ function select_week(e, nbr) {
32
+ e.addClass = "select"
33
+ }
34
+
35
+ function select(id, bool) {
36
+ var el = q('#' + id);
37
+ if (bool) {
38
+ el.addClass('select');
39
+ return true;
40
+ } else {
41
+ el.removeClass('select');
42
+ return false;
43
+ }
44
+ }
45
+
46
+ function select_toggle(id) {
47
+ var el = q('#' + id);
48
+ return select(id, !el.hasClass('select'));
49
+ }
50
+
51
+ function select_hours_of_day(blocks) {
52
+ unselect('halfhour');
53
+ var halfhours = blocks_to_halfhours(blocks);
54
+ for (var i = 0; i < halfhours.length; i++) {
55
+ select_halfhour(null, halfhours[i]);
56
+ }
57
+ }
58
+
59
+ function select_day(e, nbr) {
60
+ //nbr = nbr ? nbr : parseInt(e.id[e.id.length - 1]);
61
+ var day = 'day' + nbr;
62
+ var prg = 'program' + nbr;
63
+ select_toggle(day);
64
+ if (select_toggle(prg)) {
65
+ var blocks = q('#' + prg).getHtml();
66
+ if (blocks != "---") {
67
+ unselect('day');
68
+ var programs = q('.program');
69
+ for (var i = 0; i < programs.length; i++) {
70
+ if (q('#' + programs[i].id).getHtml() == blocks) {
71
+ select_toggle('day' + i);
72
+ select_toggle('program' + i);
73
+ }
74
+ }
75
+ select_hours_of_day(blocks);
76
+ } else {
77
+ var programs = q('.program').filter('.select');
78
+ for (var i = 0; i < programs.length; i++) {
79
+ if (q('#' + programs[i].id).getHtml() != "---") {
80
+ unselect('day');
81
+ select_day(e, nbr);
82
+ }
83
+ }
84
+ unselect('hour');
85
+ }
86
+ } else {
87
+ // If we have a multiple selection with hours and we click again on a day,
88
+ // this day gets highlighted alone
89
+ var other_days = q('.day').filter('.select');
90
+ var other_hours = q('.hour').filter('.select');
91
+ if (other_days.length * other_hours.length > 0) {
92
+ unselect('day');
93
+ select(day, true);
94
+ select(prg, true);
95
+ select_hours_of_day(q('#program' + nbr).getHtml());
96
+ }else {
97
+ unselect('hour');
98
+ }
99
+ }
100
+ }
101
+
102
+ function select_program(e, nbr) {
103
+ select_day(e, nbr)
104
+ }
105
+
106
+ function halfhour_to_hour(halfhour) {
107
+ return Math.floor(halfhour / 2) + ":" +
108
+ ( ( halfhour % 2 ) ? "30" : "00" );
109
+ }
110
+
111
+ function hour_to_halfhour(hour) {
112
+ var h = hour.split(":");
113
+ return parseInt(h[0]) * 2 + (h[1] == "00" ? 0 : 1);
114
+ }
115
+
116
+ function halfhour_range(start, end) {
117
+ return halfhour_to_hour(start) + " - " +
118
+ halfhour_to_hour(end);
119
+ }
120
+
121
+ function halfhours_to_blocks(halfhours) {
122
+ var blocks = [];
123
+ var start = halfhours[0], end = start;
124
+ for (var i = 1; i < halfhours.length; i++) {
125
+ if (halfhours[i] > end + 1) {
126
+ blocks.push(halfhour_range(start, end + 1));
127
+ start = halfhours[i];
128
+ }
129
+ end = halfhours[i];
130
+ }
131
+ if (start != undefined) {
132
+ blocks.push(halfhour_range(start, end + 1));
133
+ }
134
+ return blocks;
135
+ }
136
+
137
+ function blocks_to_halfhours(blocks_html) {
138
+ var halfhours = [];
139
+ var blocks = blocks_html ? blocks_html.split('<br>') : [];
140
+ for (var i = 0; i < blocks.length; i++) {
141
+ var fromto = blocks[i].split(" - ");
142
+ var start = hour_to_halfhour(fromto.shift()),
143
+ end = hour_to_halfhour(fromto.shift());
144
+ for (var j = start; j < end; j++) {
145
+ halfhours.push(j);
146
+ }
147
+ }
148
+ return halfhours;
149
+ }
150
+
151
+ function select_hour(e, nbr) {
152
+ var bool = select_toggle(e.id);
153
+ select_halfhour(null, nbr * 2, bool);
154
+ select_halfhour(null, nbr * 2 + 1, bool);
155
+ }
156
+
157
+ function select_halfhour(e, nbr, bool) {
158
+ if (nbr || e) {
159
+ if (!e) {
160
+ e = qel('halfhour' + nbr);
161
+ } else if (!nbr) {
162
+ nbr = parseInt(e.id.replace(/halfhour/, ''));
163
+ }
164
+ if (bool != undefined) {
165
+ select('halfhour' + nbr, bool);
166
+ } else {
167
+ bool = select_toggle(e.id);
168
+ }
169
+ var hour = Math.floor(nbr / 2);
170
+ if (bool) {
171
+ bool &= q('#halfhour' + (nbr ^ 1)).hasClass("select");
172
+ }
173
+ select('hour' + hour, bool);
174
+ }
175
+
176
+ var halfhours_el = q('.halfhour').filter('.select');
177
+ var halfhours = [];
178
+ for (var i = 0; i < halfhours_el.length; i++) {
179
+ halfhours.push(parseInt(halfhours_el[i].id.replace(/halfhour/, '')));
180
+ }
181
+ var blocks = halfhours_to_blocks(halfhours).join("<br>");
182
+ if (blocks == "") {
183
+ blocks = "---";
184
+ }
185
+
186
+ var prg_el = q('.program').filter('.select');
187
+ for (var i = 0; i < prg_el.length; i++) {
188
+ q('#' + prg_el[i].id).setHtml(blocks);
189
+ }
190
+ }
191
+
192
+ function create_td(name, align, nbr, total, str, sp) {
193
+ var span = sp ? sp : 1;
194
+ return "<td align='" + align + "' class='" + name + "' id='" + name + nbr +
195
+ "' " + " onclick='select_" + name + "(this," + nbr + ")' " +
196
+ "width='" + 100 / total + "%' colspan='" + span + "'>" + str + "</td>";
197
+ }
198
+
199
+ function add_tr(id, s) {
200
+ var el = q('#tr_' + id);
201
+ var str = s ? s : "";
202
+ el.setHtml("<td onclick=\"unselect('" + id.replace(/s$/, '') + "');\">" + id + "</td>" +
203
+ "<td><table border='1' width='100%'>" +
204
+ "<tr id='" + id + "'></tr>" + str +
205
+ "</table></td >");
206
+ }
207
+
208
+ function add_weeks(nbr) {
209
+ add_tr('weeks');
210
+ var weeks = "";
211
+ for (var i = 1; i <= nbr; i++) {
212
+ weeks += create_td('week', 'center', i, nbr, i);
213
+ }
214
+ q('#weeks').setHtml(weeks);
215
+ }
216
+
217
+ function add_days() {
218
+ add_tr('days', "<tr id='programs'></tr>");
219
+ var days_str = ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'];
220
+ var days = "", programs = "";
221
+ for (var i = 0; i < 7; i++) {
222
+ days += create_td('day', 'center', i, 7, days_str[i]);
223
+ programs += create_td('program', 'center', i, 7, "---");
224
+ }
225
+ q('#days').setHtml(days);
226
+ q('#programs').setHtml(programs);
227
+ }
228
+
229
+ function add_hours() {
230
+ add_tr('hours', "<tr id='halfhours'></tr>");
231
+ var hours = "", halfhours = "";
232
+ for (var i = 6; i <= 20; i++) {
233
+ hours += create_td('hour', 'center', i, 15, i, 2);
234
+ halfhours += create_td('halfhour', 'center', i * 2, 30, ":00");
235
+ halfhours += create_td('halfhour', 'center', i * 2 + 1, 30, ":30");
236
+ }
237
+ q('#hours').setHtml(hours);
238
+ q('#halfhours').setHtml(halfhours);
239
+ }
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'prawn', '1.0.0'
4
+ gem 'ttfunk', '1.1.1'
5
+ gem 'pdf-core', '0.2.2'
6
+
7
+ gem 'qooxview', path: '../QooxView'
8
+ gem 'africompta', path: '../AfriCompta'
9
+ gem 'network', path: '../Network'
10
+ gem 'helper_classes', path: '../HelperClasses'
11
+ gem 'hilink_modem', path: '../HilinkModem'
12
+ gem 'serial_modem', path: '../SerialModem'
data/Gemfile.dev ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'prawn', '1.0.0'
4
+ gem 'ttfunk', '1.1.1'
5
+ gem 'pdf-core', '0.2.2'
6
+
7
+ gem 'qooxview', path: '../QooxView'
8
+ gem 'africompta', path: '../AfriCompta'
9
+ gem 'network', path: '../Network'
10
+ gem 'helper_classes', path: '../HelperClasses'
11
+ gem 'hilink_modem', path: '../HilinkModem'
12
+ gem 'serial_modem', path: '../SerialModem'