29db3ae491b65125c2f23831e567a8e18cd5961d
1 <?php
3 class termgeneric extends plugin
4 {
5 /* Generic terminal attributes */
6 var $gotoMode= "locked";
7 var $gotoTerminalPath= "";
8 var $gotoSwapServer= "";
9 var $gotoSyslogServer= "";
10 var $gotoSyslogServers = array();
11 var $gotoNtpServer= array();
12 var $gotoNtpServers= array();
13 var $gotoSndModule= "";
14 var $gotoFloppyEnable= "";
15 var $gotoCdromEnable= "";
16 var $ghCpuType= "-";
17 var $ghMemSize= "-";
18 var $ghUsbSupport= "-";
19 var $ghNetNic= array();
20 var $ghIdeDev= array();
21 var $ghScsiDev= array();
22 var $ghGfxAdapter= "-";
23 var $ghSoundAdapter= "-";
24 var $gotoLastUser= "-";
25 var $netConfigDNS;
27 /* Needed values and lists */
28 var $base= "";
29 var $cn= "";
30 var $description= "";
31 var $orig_dn= "";
32 var $orig_cn= "";
33 var $orig_base= "";
35 var $inheritTimeServer = true;
37 /* Plugin side filled */
38 var $modes= array();
40 /* attribute list for save action */
41 var $ignore_account= TRUE;
42 var $attributes= array("gotoMode", "gotoTerminalPath",
43 "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
44 "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
45 "ghCpuType", "ghMemSize","ghUsbSupport", "description",
46 "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
47 var $objectclasses= array("top", "gotoTerminal", "GOhard");
49 var $validActions = array("reboot" => "", "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
51 var $fai_activated = FALSE;
52 var $view_logged = FALSE;
54 var $member_of_ogroup = FALSE;
56 var $kerberos_key_service = NULL;
59 function termgeneric (&$config, $dn= NULL, $parent= NULL)
60 {
61 /* Check if FAI is activated */
62 $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
63 if(!empty($tmp)){
64 $this->fai_activated = TRUE;
65 }
67 plugin::plugin ($config, $dn, $parent);
69 if(class_available("krb_host_keys")){
70 $this->kerberos_key_service = new krb_host_keys($this->config,$this);
71 }
73 if(!isset($this->parent->by_object['ogroup'])){
74 $ldap = $this->config->get_ldap_link();
75 $ldap->cd ($this->config->current['BASE']);
76 $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
77 $this->member_of_ogroup = $ldap->count() >= 1;
78 }
80 $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
81 /* Read arrays */
82 foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
83 if (!isset($this->attrs[$val])){
84 continue;
85 }
86 for ($i= 0; $i<$this->attrs[$val]['count']; $i++){
87 array_push($this->$val, $this->attrs[$val][$i]);
88 }
89 }
91 /* Create used ntp server array */
92 $this->gotoNtpServer= array();
93 if(isset($this->attrs['gotoNtpServer'])){
94 $this->inheritTimeServer = false;
95 for($i = 0 ; $i < $this->attrs['gotoNtpServer']['count']; $i++ ){
96 $server = $this->attrs['gotoNtpServer'][$i];
97 $this->gotoNtpServer[$server] = $server;
98 }
99 }
101 /* Set inherit checkbox state */
102 if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
103 $this->inheritTimeServer = true;
104 $this->gotoNtpServer=array();
105 }
107 /* You can't inherit the NTP service, if we are not member in an object group */
108 if(!$this->member_of_ogroup){
109 $this->inheritTimeServer = FALSE;
110 }
112 /* Create available ntp options */
113 $this->gotoNtpServers = $this->config->data['SERVERS']['NTP'];
114 foreach($this->gotoNtpServers as $key => $server){
115 if($server == "default"){
116 unset($this->gotoNtpServers[$key]);
117 }
118 }
120 $this->modes["locked"]= _("Locked");
121 $this->modes["active"]= _("Activated");
123 /* Set base */
124 if ($this->dn == "new"){
125 $ui= get_userinfo();
126 $this->base= dn2base($ui->dn);
127 } else {
128 $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_ou("terminalou"))."/", "", $this->dn);
129 }
131 /* Create an array of all Syslog servers */
132 $tmp = $this->config->data['SERVERS']['SYSLOG'];
133 foreach($tmp as $server){
134 $visible = $server;
135 if($server == "default" && $this->member_of_ogroup) {
136 $visible = "["._("inherited")."]";
137 }
138 $this->gotoSyslogServers[$server] = $visible;
139 }
141 $this->orig_dn= $this->dn;
142 $this->orig_cn= $this->cn;
143 $this->orig_base= $this->base;
144 }
146 function set_acl_base($base)
147 {
148 plugin::set_acl_base($base);
149 $this->netConfigDNS->set_acl_base($base);
150 }
152 function set_acl_category($cat)
153 {
154 plugin::set_acl_category($cat);
155 $this->netConfigDNS->set_acl_category($cat);
156 }
158 function execute()
159 {
160 /* Call parent execute */
161 plugin::execute();
163 if($this->is_account && !$this->view_logged){
164 $this->view_logged = TRUE;
165 new log("view","terminal/".get_class($this),$this->dn);
166 }
168 /* Do we need to flip is_account state? */
169 if (isset($_POST['modify_state'])){
170 $this->is_account= !$this->is_account;
171 }
173 if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate") && isset($this->validActions[$_POST['saction']])){
174 $action = $_POST['saction'];
176 /* Check if we have an DaemonEvent for this action */
177 if(class_available("DaemonEvent_".$action)){
178 $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
179 if(isset($events['TRIGGERED']["DaemonEvent_".$action])){
180 $evt = $events['TRIGGERED']["DaemonEvent_".$action];
181 $tmp = new $evt['CLASS_NAME']($this->config);
182 $tmp->add_targets(array($this->netConfigDNS->macAddress));
183 $tmp->set_type(TRIGGERED_EVENT);
184 $o_queue = new gosaSupportDaemon();
185 if(!$o_queue->append($tmp)){
186 msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
187 }
188 }
189 }else{
190 msg_dialog::display(_("Event error"),
191 sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
192 }
194 }
196 /* Base select dialog */
197 $once = true;
198 foreach($_POST as $name => $value){
199 if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
200 $once = false;
201 $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
202 $this->dialog->setCurrentBase($this->base);
203 }
204 }
206 /* Dialog handling */
207 if(is_object($this->dialog)){
208 /* Must be called before save_object */
209 $this->dialog->save_object();
211 if($this->dialog->isClosed()){
212 $this->dialog = false;
213 }elseif($this->dialog->isSelected()){
215 /* A new base was selected, check if it is a valid one */
216 $tmp = $this->get_allowed_bases();
217 if(isset($tmp[$this->dialog->isSelected()])){
218 $this->base = $this->dialog->isSelected();
219 }
220 $this->dialog= false;
221 }else{
222 return($this->dialog->execute());
223 }
224 }
226 /* Do we represent a valid terminal? */
227 if (!$this->is_account && $this->parent === NULL){
228 $display= "<img alt=\"\" src=\"images/small-error.png\" align=middle> <b>".
229 msgPool::noValidExtension(_("terminal"))."</b>";
230 return($display);
231 }
233 /* Add new ntp Server to our list */
234 if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){
235 $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
236 }
238 /* Delete selected NtpServer for list of used servers */
239 if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){
240 foreach($_POST['gotoNtpServerSelected'] as $name){
241 unset($this->gotoNtpServer[$name]);
242 }
243 }
245 /* Fill templating stuff */
246 $smarty= get_smarty();
248 $tmp = $this->plInfo();
249 foreach($tmp['plProvidedAcls'] as $name => $translation){
250 $smarty->assign($name."ACL",$this->getacl($name));
251 }
253 $smarty->assign("cn", $this->cn);
254 $smarty->assign("description", $this->description);
255 $smarty->assign("staticAddress", "");
257 $smarty->assign("bases", $this->get_allowed_bases());
259 /* tell smarty the inherit checkbox state */
260 $smarty->assign("inheritTimeServer",$this->inheritTimeServer);
262 /* Check if terminal is online */
263 if (gosaSupportDaemon::ping($this->netConfigDNS->macAddress)){
264 $smarty->assign("actions", array( "halt" => _("Switch off"),
265 "reboot" => _("Reboot"),
266 #"memcheck" => _("Memory test"),
267 #"sysinfo" => _("System analysis")
268 ));
269 } else {
270 $smarty->assign("actions", array("wake" => _("Wake up"),
271 #"memcheck" => _("Memory test"),
272 #"sysinfo" => _("System analysis")
273 ));
274 }
276 /* Arrays */
277 $smarty->assign("modes", $this->modes);
279 $tmp2 = array();
280 foreach($this->config->data['SERVERS']['NFS'] as $server){
281 if($server != "default"){
282 $tmp2[$server]= $server;
283 }else{
284 if($this->member_of_ogroup){
285 $tmp2[$server]="["._("inherited")."]";
286 }
287 }
288 }
290 $smarty->assign("nfsservers", $tmp2);
291 $smarty->assign("syslogservers", $this->gotoSyslogServers);
293 $tmp = array();
294 foreach($this->gotoNtpServers as $server){
295 if(!in_array($server,$this->gotoNtpServer)){
296 $tmp[$server] = $server;
297 }
298 }
300 $smarty->assign("ntpservers", $tmp);
301 $smarty->assign("fai_activated",$this->fai_activated);
303 /* Variables */
304 foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer","gotoSyslogServer", "gotoNtpServer") as $val){
305 $smarty->assign($val."_select", $this->$val);
306 }
308 $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
310 /* Show main page */
311 $str = $this->netConfigDNS->execute();
312 if(is_object($this->netConfigDNS->dialog)){
313 return($str);
314 }
315 $smarty->assign("netconfig", $str);
317 /* Display kerberos host key options */
318 $smarty->assign("host_key","");
319 if(is_object($this->kerberos_key_service)){
320 $smarty->assign("host_key",$this->kerberos_key_service->execute_by_prefix("host/"));
321 }
323 return($smarty->fetch (get_template_path('terminal.tpl', TRUE, dirname(__FILE__))));
324 }
326 function remove_from_parent()
327 {
328 if($this->acl_is_removeable()){
329 $ldap= $this->config->get_ldap_link();
330 $ldap->cd($this->dn);
331 $ldap->cat($this->dn, array('dn'));
332 if($ldap->count()){
333 $this->netConfigDNS->remove_from_parent();
334 $ldap->rmDir($this->dn);
336 new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
338 if (!$ldap->success()){
339 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
340 }
342 /* Remove kerberos key dependencies too */
343 if(is_object($this->kerberos_key_service)){
344 $this->kerberos_key_service->remove_from_parent_by_prefix("host/");
345 }
347 /* Optionally execute a command after we're done */
348 $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
350 /* Delete references to object groups */
351 $ldap->cd ($this->config->current['BASE']);
352 $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
353 while ($ldap->fetch()){
354 $og= new ogroup($this->config, $ldap->getDN());
355 unset($og->member[$this->dn]);
356 $og->save ();
357 }
359 /* Remove all accessTo/trust dependencies */
360 update_accessTo($this->cn,"");
361 }
363 /* Clean queue form entries with this mac
364 */
365 if(class_available("gosaSupportDaemon") && tests::is_mac($this->netConfigDNS->orig_macAddress)){
366 $q = new gosaSupportDaemon();
367 $q->clean_queue_from_mac($this->netConfigDNS->orig_macAddress);
368 }
369 }
370 }
373 /* Save data to object */
374 function save_object()
375 {
376 /* Create a base backup and reset the
377 base directly after calling plugin::save_object();
378 Base will be set seperatly a few lines below */
379 $base_tmp = $this->base;
380 plugin::save_object();
381 $this->base = $base_tmp;
383 /* Set new base if allowed */
384 $tmp = $this->get_allowed_bases();
385 if(isset($_POST['base'])){
386 if(isset($tmp[$_POST['base']])){
387 $this->base= $_POST['base'];
388 }
389 }
391 $this->netConfigDNS->save_object();
393 /* Save terminal path to parent since it is used by termstartup, too */
394 if(isset($this->parent->by_object['termstartup'])){
395 $this->parent->by_object['termstartup']->gotoTerminalPath= $this->gotoTerminalPath;
396 }
398 if(isset($_POST['termgeneric_posted'])){
399 if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
400 $this->inheritTimeServer = true;
401 }else{
402 $this->inheritTimeServer = false;
403 }
404 }
406 if(isset($_POST["inheritAll"])){
407 $this->set_everything_to_inherited();
408 }
410 /* Hanle kerberos host key plugin */
411 if(is_object($this->kerberos_key_service)){
412 $this->kerberos_key_service->save_object_by_prefix("host/");
413 }
414 }
417 /* Check supplied data */
418 function check()
419 {
420 /* Call common method to give check the hook */
421 $message= plugin::check();
423 /* Skip IP & Mac checks if this is a template */
424 if($this->cn != "default"){
425 $message= array_merge($message, $this->netConfigDNS->check());
426 }
428 /* Permissions for that base? */
429 $this->dn= "cn=".$this->cn.",".get_ou('terminalou').$this->base;
431 if ($this->cn == ""){
432 $message[]= msgPool::required(_("Name"));
433 }
435 /* Check if given name is a valid host/dns name */
436 if(!tests::is_dns_name($this->cn) ){
437 $message[] = msgPool::invalid(_("Name"));
438 }
440 if ($this->orig_dn == 'new'){
441 $ldap= $this->config->get_ldap_link();
442 $ldap->cd ($this->base);
444 /* It is possible to have a 'default' terminal on every base */
445 if($this->cn == "default"){
446 $ldap->cat($this->dn);
447 }else{
448 $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
449 }
450 if ($ldap->count() != 0){
451 while ($attrs= $ldap->fetch()){
452 if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".normalizePreg(get_ou('incomingou'))."/", $ldap->getDN())){
453 continue;
454 } else {
455 if ($attrs['dn'] != $this->orig_dn){
456 $message[]= msgPool::duplicated(_("Name"));
457 break;
458 }
459 }
460 }
461 }
462 }
464 /* Check for valid ntpServer selection */
465 if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
466 $message[]= msgPool::required(_("NTP server"));
467 }
469 /* Check if we are allowed to create or move this object
470 */
471 if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
472 $message[] = msgPool::permCreate();
473 }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
474 $message[] = msgPool::permMove();
475 }
477 return ($message);
478 }
481 /* Save to LDAP */
482 function save()
483 {
484 /* Detect mode changes */
485 $activate= (isset($this->saved_attributes['gotoMode']) &&
486 $this->gotoMode != $this->saved_attributes['gotoMode'] &&
487 $this->gotoMode == "enabled" &&
488 tests::is_ip($this->netConfigDNS->ipHostNumber));
490 plugin::save();
492 /* Strip out 'default' values */
493 foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
494 if(isset($this->attrs[$val])){
495 if ($this->attrs[$val] == "default"){
496 $this->attrs[$val]= array();
497 }
498 }
499 }
501 /* Add missing arrays */
502 foreach (array("ghScsiDev", "ghIdeDev", "ghNetNic") as $val){
503 if (isset ($this->$val) && count ($this->$val) != 0){
504 $this->attrs["$val"]= $this->$val;
505 }
506 }
508 /* Remove all empty values */
509 if ($this->orig_dn == 'new'){
510 $attrs= array();
511 foreach ($this->attrs as $key => $val){
512 if (is_array($val) && count($val) == 0){
513 continue;
514 }
515 $attrs[$key]= $val;
516 }
517 $this->attrs= $attrs;
518 }
520 /* Set ntpServers */
521 $this->attrs['gotoNtpServer'] = array();
522 if(!$this->inheritTimeServer){
523 foreach($this->gotoNtpServer as $server){
524 $this->attrs['gotoNtpServer'][] = $server;
525 }
526 }
528 /* Write back to ldap */
529 $ldap= $this->config->get_ldap_link();
530 if ($this->orig_dn == 'new'){
531 $ldap->cd($this->config->current['BASE']);
532 $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
533 $ldap->cd($this->dn);
534 if (!count($this->attrs['gotoNtpServer'])){
535 unset($this->attrs['gotoNtpServer']);
536 }
537 $ldap->add($this->attrs);
538 new log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
539 $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
540 } else {
541 $ldap->cd($this->dn);
542 $this->cleanup();
543 $ldap->modify ($this->attrs);
544 new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
545 $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
547 /* Update all accessTo/trust dependencies */
548 if($this->orig_cn != $this->cn){
549 update_accessTo($this->orig_cn,$this->cn);
550 }
551 }
553 /* cn=default and macAddress=- indicates that this is a template */
554 if($this->cn == "default"){
555 $this->netConfigDNS->macAddress = "-";
556 }
558 $this->netConfigDNS->cn = $this->cn;
559 $this->netConfigDNS->save();
560 if (!$ldap->success()){
561 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
562 }
564 /* Send installation activation
565 */
566 if ($activate && class_available("DaemonEvent")){
567 $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
568 $o_queue = new gosaSupportDaemon();
569 if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){
570 $evt = $events['TRIGGERED']['DaemonEvent_installation_activation'];
571 $tmp = new $evt['CLASS_NAME']($this->config);
572 $tmp->set_type(TRIGGERED_EVENT);
573 $tmp->add_targets(array($this->netConfigDNS->macAddress));
574 if(!$o_queue->append($tmp)){
575 msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
576 }
577 }
578 }
579 }
582 /* Display generic part for server copy & paste */
583 function getCopyDialog()
584 {
585 $vars = array("cn");
586 $smarty = get_smarty();
587 $smarty->assign("cn" ,$this->cn);
588 $smarty->assign("object","terminal");
589 $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
590 $ret = array();
591 $ret['string'] = $str;
592 $ret['status'] = "";
593 return($ret);
594 }
597 function saveCopyDialog()
598 {
599 if(isset($_POST['cn'])){
600 $this->cn = $_POST['cn'];
601 }
602 }
605 function PrepareForCopyPaste($source)
606 {
607 plugin::PrepareForCopyPaste($source);
608 if(isset($source['macAddress'][0])){
609 $this->netConfigDNS->macAddress = $source['macAddress'][0];
610 }
611 if(isset($source['ipHostNumber'][0])){
612 $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
613 }
615 /* Create used ntp server array */
616 $this->gotoNtpServer= array();
617 if(isset($source['gotoNtpServer'])){
618 $this->inheritTimeServer = false;
619 unset($source['gotoNtpServer']['count']);
620 foreach($source['gotoNtpServer'] as $server){
621 $this->gotoNtpServer[$server] = $server;
622 }
623 }
625 /* Set inherit checkbox state */
626 if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
627 $this->inheritTimeServer = true;
628 $this->gotoNtpServer=array();
629 }
630 }
633 /* Return plugin informations for acl handling */
634 static function plInfo()
635 {
636 return (array(
637 "plShortName" => _("Terminal"),
638 "plDescription" => _("Terminal generic"),
639 "plSelfModify" => FALSE,
640 "plDepends" => array(),
641 "plPriority" => 1,
642 "plSection" => array("administration"),
643 "plCategory" => array("terminal" => array( "description" => _("Terminal"),
644 "objectClass" => "gotoTerminal")),
645 "plProvidedAcls"=> array(
646 "gotoMode" => _("Mode"),
647 "gotoTerminalPath" => _("Root server"),
648 "gotoSwapServer" => _("Swap server"),
649 "gotoSyslogServer" => _("Syslog server enabled"),
650 "gotoNtpServer" => _("Ntp server settings"),
651 "base" => _("Base"),
652 "cn" => _("Name"),
653 "description" => _("Description"),
654 "gotoRootPasswd" => _("Root password"),
655 "FAIstate" => _("Action flag"))
656 ));
657 }
660 function set_everything_to_inherited()
661 {
662 $this->gotoTerminalPath = "default";
663 $this->gotoSwapServer = "default" ;
664 $this->gotoSyslogServer = "default";
665 $this->inheritTimeServer = TRUE;
667 /* Set workstation service attributes to inherited */
668 if($this->member_of_ogroup && isset($this->parent->by_object['termservice'])){
669 foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
670 "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){
671 $this->parent->by_object['termservice']->$name = "default";
672 }
673 }
675 /* Set workstation startup attributes to inherited */
676 if($this->member_of_ogroup && isset($this->parent->by_object['termstartup'])){
677 $this->parent->by_object['termstartup']->gotoBootKernel = "default-inherited";
678 $this->parent->by_object['termstartup']->gotoLdapServer = "default-inherited";
679 }
680 }
681 }
683 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
684 ?>