Code

Added kerberos host key generation
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_terminalGeneric.inc
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;
26   
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>&nbsp;<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();
247     
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     } else {
269       $smarty->assign("actions", array("wake" => _("Wake up"),
270                                        "memcheck" => _("Memory test"),
271                                        "sysinfo"  => _("System analysis")));
272     }
274     /* Arrays */
275     $smarty->assign("modes", $this->modes);
277     $tmp2 = array(); 
278     foreach($this->config->data['SERVERS']['NFS'] as $server){
279       if($server != "default"){
280         $tmp2[$server]= $server;
281       }else{
282         if($this->member_of_ogroup){
283           $tmp2[$server]="["._("inherited")."]";
284         }
285       }
286     }
287   
288     $smarty->assign("nfsservers",     $tmp2);
289     $smarty->assign("syslogservers",  $this->gotoSyslogServers);
291     $tmp = array();
292     foreach($this->gotoNtpServers as $server){
293       if(!in_array($server,$this->gotoNtpServer)){
294         $tmp[$server] = $server;
295       }
296     }
297     
298     $smarty->assign("ntpservers",     $tmp);
299     $smarty->assign("fai_activated",$this->fai_activated);
301     /* Variables */
302     foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer","gotoSyslogServer", "gotoNtpServer") as $val){
303       $smarty->assign($val."_select", $this->$val);
304     }
306     $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
308     /* Show main page */
309     $str = $this->netConfigDNS->execute();
310     if(is_object($this->netConfigDNS->dialog)){
311       return($str);
312     }
313     $smarty->assign("netconfig", $str);
315     /* Display kerberos host key options */  
316     $smarty->assign("host_key","");
317     if(is_object($this->kerberos_key_service)){
318       $smarty->assign("host_key",$this->kerberos_key_service->execute());
319     }
321     return($smarty->fetch (get_template_path('terminal.tpl', TRUE, dirname(__FILE__))));
322   }
324   function remove_from_parent()
325   {
326     if($this->acl_is_removeable()){   
327       $ldap= $this->config->get_ldap_link();
328       $ldap->cd($this->dn);
329       $ldap->cat($this->dn, array('dn'));
330       if($ldap->count()){
331         $this->netConfigDNS->remove_from_parent();
332         $ldap->rmDir($this->dn);
333   
334         new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
335   
336         if (!$ldap->success()){
337           msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
338         }
340         /* Optionally execute a command after we're done */
341         $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
343         /* Delete references to object groups */
344         $ldap->cd ($this->config->current['BASE']);
345         $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
346         while ($ldap->fetch()){
347           $og= new ogroup($this->config, $ldap->getDN());
348           unset($og->member[$this->dn]);
349           $og->save ();
350         }
352         /* Remove all accessTo/trust dependencies */
353         update_accessTo($this->cn,"");
354       }
356       /* Clean queue form entries with this mac 
357        */
358       if(class_available("gosaSupportDaemon") && tests::is_mac($this->netConfigDNS->orig_macAddress)){
359         $q = new gosaSupportDaemon();
360         $q->clean_queue_from_mac($this->netConfigDNS->orig_macAddress);
361       }
362     }
363   }
366   /* Save data to object */
367   function save_object()
368   {
369     /* Create a base backup and reset the
370        base directly after calling plugin::save_object();
371        Base will be set seperatly a few lines below */
372     $base_tmp = $this->base;
373     plugin::save_object();
374     $this->base = $base_tmp;
376     /* Set new base if allowed */
377     $tmp = $this->get_allowed_bases();
378     if(isset($_POST['base'])){
379       if(isset($tmp[$_POST['base']])){
380         $this->base= $_POST['base'];
381       }
382     }
383     
384     $this->netConfigDNS->save_object();
386     /* Save terminal path to parent since it is used by termstartup, too */
387     if(isset($this->parent->by_object['termstartup'])){
388       $this->parent->by_object['termstartup']->gotoTerminalPath= $this->gotoTerminalPath;
389     }
390     
391     if(isset($_POST['termgeneric_posted'])){
392       if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
393         $this->inheritTimeServer = true;
394       }else{
395         $this->inheritTimeServer = false;
396       }
397     }  
399     if(isset($_POST["inheritAll"])){
400       $this->set_everything_to_inherited();
401     }
403     /* Hanle kerberos host key plugin */
404     if(is_object($this->kerberos_key_service)){
405       $this->kerberos_key_service->save_object();
406     }
407   }
410   /* Check supplied data */
411   function check()
412   {
413     /* Call common method to give check the hook */
414     $message= plugin::check();
416     /* Skip IP & Mac checks if this is a template */
417     if($this->cn != "default"){
418       $message= array_merge($message, $this->netConfigDNS->check());
419     }
421     /* Permissions for that base? */
422     $this->dn= "cn=".$this->cn.",".get_ou('terminalou').$this->base;
424     if ($this->cn == ""){
425       $message[]= msgPool::required(_("Name"));
426     }
428     /* Check if given name is a valid host/dns name */
429     if(!tests::is_dns_name($this->cn) ){
430       $message[] = msgPool::invalid(_("Name"));
431     }
433     if ($this->orig_dn == 'new'){
434       $ldap= $this->config->get_ldap_link();
435       $ldap->cd ($this->base);
437       /* It is possible to have a 'default' terminal on every base */
438       if($this->cn == "default"){
439         $ldap->cat($this->dn);
440       }else{
441         $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
442       }
443       if ($ldap->count() != 0){
444         while ($attrs= $ldap->fetch()){
445           if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".normalizePreg(get_ou('incomingou'))."/", $ldap->getDN())){
446             continue;
447           } else {
448             if ($attrs['dn'] != $this->orig_dn){
449               $message[]= msgPool::duplicated(_("Name"));
450               break;
451             }
452           }
453         }
454       }
455     }
457     /* Check for valid ntpServer selection */
458     if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
459       $message[]= msgPool::required(_("NTP server"));
460     }
462     /* Check if we are allowed to create or move this object
463      */
464     if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
465       $message[] = msgPool::permCreate();
466     }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
467       $message[] = msgPool::permMove();
468     }
470     return ($message);
471   }
474   /* Save to LDAP */
475   function save()
476   {
477     /* Detect mode changes */
478     $activate= (isset($this->saved_attributes['gotoMode']) &&
479         $this->gotoMode != $this->saved_attributes['gotoMode'] &&
480         $this->gotoMode == "enabled" &&
481         tests::is_ip($this->netConfigDNS->ipHostNumber));
483     plugin::save();
485     /* Strip out 'default' values */
486     foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
487       if(isset($this->attrs[$val])){
488         if ($this->attrs[$val] == "default"){
489           $this->attrs[$val]= array();
490         }
491       }
492     }
494     /* Add missing arrays */
495     foreach (array("ghScsiDev", "ghIdeDev", "ghNetNic") as $val){
496       if (isset ($this->$val) && count ($this->$val) != 0){
497         $this->attrs["$val"]= $this->$val;
498       }
499     }
501     /* Remove all empty values */
502     if ($this->orig_dn == 'new'){
503       $attrs= array();
504       foreach ($this->attrs as $key => $val){
505         if (is_array($val) && count($val) == 0){
506           continue;
507         }
508         $attrs[$key]= $val;
509       }
510       $this->attrs= $attrs;
511     }
513     /* Set ntpServers */
514     $this->attrs['gotoNtpServer'] = array();
515     if(!$this->inheritTimeServer){
516       foreach($this->gotoNtpServer as $server){
517         $this->attrs['gotoNtpServer'][] = $server;
518       }
519     }
521     /* Write back to ldap */
522     $ldap= $this->config->get_ldap_link();
523     if ($this->orig_dn == 'new'){
524       $ldap->cd($this->config->current['BASE']);
525       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
526       $ldap->cd($this->dn);
527       if (!count($this->attrs['gotoNtpServer'])){
528         unset($this->attrs['gotoNtpServer']);
529       }
530       $ldap->add($this->attrs);
531       new log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
532       $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
533     } else {
534       $ldap->cd($this->dn);
535       $this->cleanup();
536       $ldap->modify ($this->attrs); 
537       new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
538       $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
540       /* Update all accessTo/trust dependencies */
541       if($this->orig_cn != $this->cn){
542         update_accessTo($this->orig_cn,$this->cn);
543       }
544     }
545     
546     /* cn=default and macAddress=- indicates that this is a template */
547     if($this->cn == "default"){
548       $this->netConfigDNS->macAddress = "-";
549     }
551     $this->netConfigDNS->cn = $this->cn;
552     $this->netConfigDNS->save();
553     if (!$ldap->success()){
554       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
555     }
557     /* Send installation activation
558      */
559     if ($activate && class_available("DaemonEvent")){
560       $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
561       $o_queue = new gosaSupportDaemon();
562       if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){
563         $evt = $events['TRIGGERED']['DaemonEvent_installation_activation'];
564         $tmp = new $evt['CLASS_NAME']($this->config);
565         $tmp->set_type(TRIGGERED_EVENT);
566         $tmp->add_targets(array($this->netConfigDNS->macAddress));
567         if(!$o_queue->append($tmp)){
568           msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
569         }
570       }
571     }
572   }
575   /* Display generic part for server copy & paste */
576   function getCopyDialog()
577   {
578     $vars = array("cn");
579     $smarty = get_smarty();
580     $smarty->assign("cn" ,$this->cn);
581     $smarty->assign("object","terminal");
582     $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
583     $ret = array();
584     $ret['string'] = $str;
585     $ret['status'] = "";
586     return($ret);
587   }
590   function saveCopyDialog()
591   {
592     if(isset($_POST['cn'])){
593       $this->cn = $_POST['cn'];
594     }
595   }
598   function PrepareForCopyPaste($source)
599   {
600     plugin::PrepareForCopyPaste($source);
601     if(isset($source['macAddress'][0])){
602       $this->netConfigDNS->macAddress = $source['macAddress'][0];
603     }
604     if(isset($source['ipHostNumber'][0])){
605       $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
606     }
608     /* Create used ntp server array */
609     $this->gotoNtpServer= array();
610     if(isset($source['gotoNtpServer'])){
611       $this->inheritTimeServer = false;
612       unset($source['gotoNtpServer']['count']);
613       foreach($source['gotoNtpServer'] as $server){
614         $this->gotoNtpServer[$server] = $server;
615       }
616     }
618     /* Set inherit checkbox state */
619     if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
620       $this->inheritTimeServer = true;
621       $this->gotoNtpServer=array();
622     }
623   }
626   /* Return plugin informations for acl handling */
627   static function plInfo()
628   {
629     return (array(
630           "plShortName"   => _("Terminal"),
631           "plDescription" => _("Terminal generic"),
632           "plSelfModify"  => FALSE,
633           "plDepends"     => array(),
634           "plPriority"    => 1,
635           "plSection"     => array("administration"),
636           "plCategory"    => array("terminal" => array( "description"  => _("Terminal"),
637                                                         "objectClass"  => "gotoTerminal")),
638           "plProvidedAcls"=> array(
639             "gotoMode"            => _("Mode"),
640             "gotoTerminalPath"    => _("Root server"),
641             "gotoSwapServer"      => _("Swap server"),
642             "gotoSyslogServer"    => _("Syslog server enabled"),
643             "gotoNtpServer"       => _("Ntp server settings"),
644             "base"                => _("Base"),
645             "cn"                  => _("Name"),
646             "description"         => _("Description"),
647             "gotoRootPasswd"      => _("Root password"),
648             "FAIstate"            => _("Action flag"))
649           ));
650   }
653   function set_everything_to_inherited()
654   {
655     $this->gotoTerminalPath  = "default";
656     $this->gotoSwapServer    = "default" ;
657     $this->gotoSyslogServer  = "default";
658     $this->inheritTimeServer = TRUE;
660     /* Set workstation service attributes to inherited */
661     if($this->member_of_ogroup && isset($this->parent->by_object['termservice'])){
662       foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
663             "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){
664         $this->parent->by_object['termservice']->$name = "default";
665       }
666     }
668     /* Set workstation startup attributes to inherited */
669     if($this->member_of_ogroup && isset($this->parent->by_object['termstartup'])){
670       $this->parent->by_object['termstartup']->gotoBootKernel = "default-inherited";
671       $this->parent->by_object['termstartup']->gotoLdapServer = "default-inherited";
672     }
673   }
676 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
677 ?>