1 <?php
2 /*
3 * This code is part of GOsa (http://www.gosa-project.org)
4 * Copyright (C) 2003-2008 GONICUS GmbH
5 *
6 * ID: $$Id$$
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
23 class department extends plugin
24 {
25 /* department attributes */
26 var $ou= "";
27 var $description= "";
28 var $base= "";
29 var $st= "";
30 var $l= "";
31 var $postalAddress= "";
32 var $businessCategory= "";
33 var $telephoneNumber= "";
34 var $facsimileTelephoneNumber= "";
35 var $orig_dn= "";
36 var $is_administrational_unit= false;
37 var $gosaUnitTag= "";
38 var $view_logged = FALSE;
39 var $rec_dst=false; // Destination for recursive move
40 var $rec_src=false; // Source for recursive move
41 var $rec_cpy=false; // Is recursive move requested ?
43 /* Headpage attributes */
44 var $last_dep_sorting= "invalid";
45 var $departments= array();
47 var $must_be_tagged = false;
49 /* attribute list for save action */
50 var $attributes= array("ou", "description", "businessCategory", "st", "l", "postalAddress",
51 "telephoneNumber", "facsimileTelephoneNumber", "gosaUnitTag");
52 var $objectclasses= array("top", "gosaDepartment", "organizationalUnit");
53 var $initially_was_tagged = false;
55 var $orig_base = "";
56 var $orig_ou = "";
58 function department (&$config, $dn)
59 {
61 plugin::plugin($config, $dn);
62 $this->is_account= TRUE;
63 $this->ui= get_userinfo();
64 $this->dn= $dn;
65 $this->orig_dn= $dn;
66 $this->orig_ou= $this->ou;
67 $this->config= $config;
69 /* Set base */
70 if ($this->dn == "new"){
71 $ui= get_userinfo();
72 if(session::is_set('CurrentMainBase')){
73 $this->base = session::get('CurrentMainBase');
74 }else{
75 $this->base= dn2base($ui->dn);
76 }
77 } else {
78 $this->base= preg_replace ("/^[^,]+,/", "", $this->dn);
79 }
81 $this->orig_base = $this->base;
83 /* Is administrational Unit? */
84 if ($dn != "new" && in_array_ics('gosaAdministrativeUnit', $this->attrs['objectClass'])){
85 $this->is_administrational_unit= true;
86 $this->initially_was_tagged = true;
87 }
88 }
90 function execute()
91 {
92 /* Call parent execute */
93 plugin::execute();
95 /* Log view */
96 if($this->is_account && !$this->view_logged){
97 $this->view_logged = TRUE;
98 new log("view","department/".get_class($this),$this->dn);
99 }
101 /* Reload departments */
102 $this->config->get_departments($this->dn);
103 $this->config->make_idepartments();
104 $smarty= get_smarty();
106 $tmp = $this->plInfo();
107 foreach($tmp['plProvidedAcls'] as $name => $translation){
108 $smarty->assign($name."ACL",$this->getacl($name));
109 }
111 /* Base select dialog */
112 $once = true;
113 foreach($_POST as $name => $value){
114 if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
115 $once = false;
116 $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
117 $this->dialog->setCurrentBase($this->base);
118 }
119 }
121 /* Dialog handling */
122 if(is_object($this->dialog)){
123 /* Must be called before save_object */
124 $this->dialog->save_object();
126 if($this->dialog->isClosed()){
127 $this->dialog = false;
128 }elseif($this->dialog->isSelected()){
130 /* A new base was selected, check if it is a valid one */
131 $tmp = $this->get_allowed_bases();
132 if(isset($tmp[$this->dialog->isSelected()])){
133 $this->base = $this->dialog->isSelected();
134 }
136 $this->dialog= false;
137 }else{
138 return($this->dialog->execute());
139 }
140 }
142 /* Hide all departments, that are subtrees of this department */
143 $bases = $this->get_allowed_bases();
144 if(($this->dn == "new")||($this->dn == "")){
145 $tmp = $bases;
146 }else{
147 $tmp = array();
148 foreach($bases as $dn=>$base){
149 $fixed = str_replace("/","\\",$this->dn);
150 /* Only attach departments which are not a subtree of this one */
151 if(!preg_match("/".$fixed."/",$dn)){
152 $tmp[$dn]=$base;
153 }
154 }
155 }
156 $smarty->assign("bases", $tmp);
158 foreach ($this->attributes as $val){
159 $smarty->assign("$val", $this->$val);
160 }
161 $smarty->assign("base_select", $this->base);
163 /* Set admin unit flag */
164 if ($this->is_administrational_unit) {
165 $smarty->assign("unitTag", "checked");
166 } else {
167 $smarty->assign("unitTag", "");
168 }
170 return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
171 }
173 function clear_fields()
174 {
175 $this->dn = "";
176 $this->base = "";
178 foreach ($this->attributes as $val){
179 $this->$val= "";
180 }
181 }
183 function remove_from_parent()
184 {
185 $ldap= $this->config->get_ldap_link();
186 $ldap->cd ($this->dn);
187 $ldap->recursive_remove();
188 new log("remove","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
189 if (!$ldap->success()){
190 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
191 }
193 /* Optionally execute a command after we're done */
194 $this->handle_post_events('remove');
195 }
197 function must_be_tagged()
198 {
199 return $this->must_be_tagged;
200 }
202 function am_i_moved()
203 {
204 return $this->rec_cpy;
205 }
208 /* Save data to object */
209 function save_object()
210 {
211 if (isset($_POST['dep_generic_posted'])){
213 /* Create a base backup and reset the
214 base directly after calling plugin::save_object();
215 Base will be set seperatly a few lines below */
216 $base_tmp = $this->base;
217 plugin::save_object();
218 $this->base = $base_tmp;
220 /* Set new base if allowed */
221 $tmp = $this->get_allowed_bases();
222 if(isset($_POST['base'])){
223 if(isset($tmp[$_POST['base']])){
224 $this->base= $_POST['base'];
225 }
226 }
228 /* Save tagging flag */
229 if ($this->acl_is_writeable("unitTag")){
230 if (isset($_POST['unitTag'])){
231 $this->is_administrational_unit= true;
232 } else {
233 $this->is_administrational_unit= false;
234 }
235 }
236 }
237 }
240 /* Check values */
241 function check()
242 {
243 /* Call common method to give check the hook */
244 $message= plugin::check();
246 /* Check for presence of this department */
247 $ldap= $this->config->get_ldap_link();
248 $ldap->ls ("(&(ou=".$this->ou.")(objectClass=organizationalUnit))", $this->base, array('dn'));
249 if ($this->orig_dn == "new" && $ldap->count()){
250 $message[]= msgPool::duplicated(_("Name"));
251 } elseif ($this->orig_dn != $this->dn && !($attrs === FALSE)){
252 $message[]= msgPool::duplicated(_("Name"));
253 }
255 /* All required fields are set? */
256 if ($this->ou == ""){
257 $message[]= _("Required field 'Name' is not set.");
258 $message[]= msgPool::required(_("Name"));
259 }
260 if ($this->description == ""){
261 $message[]= _("Required field 'Description' is not set.");
262 $message[]= msgPool::required(_("Description"));
263 }
265 if(tests::is_department_name_reserved($this->ou,$this->base)){
266 $message[]= msgPool::reserved(_("Name"));
267 }
269 if (preg_match ('/[#+:=>\\\\\/]/', $this->ou)){
270 $message[]= msgPool::invalid(_("Name"), $this->ou, "/[^#+:=>\\\\\/]/");
271 }
272 if (!tests::is_phone_nr($this->telephoneNumber)){
273 $message[]= msgPool::invalid(_("Phone"), $this->telephoneNumber, "/[\/0-9 ()+*-]/");
274 }
275 if (!tests::is_phone_nr($this->facsimileTelephoneNumber)){
276 $message[]= msgPool::invalid(_("Fax"), $this->facsimileTelephoneNumber, "/[\/0-9 ()+*-]/");
277 }
279 return $message;
280 }
283 /* Save to LDAP */
284 function save()
285 {
286 $ldap= $this->config->get_ldap_link();
288 /* Add tag objects if needed */
289 if ($this->is_administrational_unit){
291 /* If this wasn't tagged before add oc an reset unit tag */
292 if(!$this->initially_was_tagged){
293 $this->objectclasses[]= "gosaAdministrativeUnit";
294 $this->gosaUnitTag= "";
296 /* It seams that this method is called twice,
297 set this to true. to avoid adding this oc twice */
298 $this->initially_was_tagged = true;
299 }
301 if ($this->gosaUnitTag == ""){
303 /* It's unlikely, but check if already used... */
304 $try= 5;
305 $ldap->cd($this->config->current['BASE']);
306 while ($try--){
308 /* Generate microtime stamp as tag */
309 list($usec, $sec)= explode(" ", microtime());
310 $time_stamp= preg_replace("/\./", "", $sec.$usec);
312 $ldap->search("(&(objectClass=gosaAdministrativeUnit)(gosaUnitTag=$time_stamp))",array("gosaUnitTag"));
313 if ($ldap->count() == 0){
314 break;
315 }
316 }
317 if($try == 0) {
318 msg_dialog::display(_("Fatal error"), _("Cannot find an unused tag for this administrative unit!"), WARNING_DIALOG);
319 return;
320 }
321 $this->gosaUnitTag= preg_replace("/\./", "", $sec.$usec);
322 }
323 }
324 $this->skipTagging = TRUE;
325 plugin::save();
327 /* Remove tag information if needed */
328 if (!$this->is_administrational_unit){
329 $tmp= array();
331 /* Remove gosaAdministrativeUnit from this plugin */
332 foreach($this->attrs['objectClass'] as $oc){
333 if (!preg_match("/^gosaAdministrativeUnit$/i", $oc)){
334 $tmp[]= $oc;
335 }
336 }
337 $this->attrs['objectClass']= $tmp;
338 }
340 /* Do we need to remove the tag itself? */
341 $has_unit_tag= false;
342 foreach($this->attrs['objectClass'] as $oc){
343 if (preg_match("/^gosaAdministrativeUnitTag$/i", $oc)){
344 $has_unit_tag= true;
345 }
346 }
347 if ($has_unit_tag == false && $this->is_administrational_unit == false){
348 $this->attrs['gosaUnitTag']= array();
349 } else {
350 $this->attrs['gosaUnitTag']= $this->gosaUnitTag;
351 }
353 /* Write back to ldap */
354 $ldap->cat($this->dn, array('dn'));
355 $ldap->cd($this->dn);
357 if ($ldap->count()){
358 $this->cleanup();
359 $ldap->modify ($this->attrs);
360 new log("modify","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
361 $this->handle_post_events('modify');
362 } else {
363 $ldap->add($this->attrs);
364 $this->handle_post_events('add');
365 new log("create","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
366 }
367 if (!$ldap->success()){
368 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
369 }
371 /* The parameter forces only to set must_be_tagged, and don't touch any objects
372 This will be done later */
373 $this->tag_objects(true);
375 /* Optionally execute a command after we're done */
376 $this->postcreate();
377 return(false);
378 }
381 function ShowMoveFrame()
382 {
383 $smarty = get_smarty();
384 $smarty->assign("src","?plug=".$_GET['plug']."&PerformRecMove&no_output_compression");
385 $smarty->assign("message","As soon as the move operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
386 $display= $smarty->fetch(get_template_path("dep_iframe.tpl",TRUE));
387 return($display);
388 }
390 function ShowTagFrame()
391 {
392 $smarty = get_smarty();
393 $smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment&no_output_compression");
394 $smarty->assign("message","As soon as the tag operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
395 $display= $smarty->fetch(get_template_path("dep_iframe.tpl",TRUE));
396 return($display);
397 }
399 /* Tag objects to have the gosaAdministrativeUnitTag */
400 function tag_objects($OnlySetTagFlag = false)
401 {
402 if(!$OnlySetTagFlag){
403 $smarty= get_smarty();
404 /* Print out html introduction */
405 echo ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
406 <html>
407 <head>
408 <title></title>
409 <style type="text/css">@import url("themes/default/style.css");</style>
410 <script language="javascript" src="include/focus.js" type="text/javascript"></script>
411 </head>
412 <body style="background: none; margin:4px;" id="body" >
413 ';
414 echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".@LDAP::fix($this->dn)."</i>")."</h3>";
415 }
417 $add= $this->is_administrational_unit;
418 $len= strlen($this->dn);
419 $ldap= $this->config->get_ldap_link();
420 $ldap->cd($this->dn);
421 if ($add){
422 $ldap->search('(!(&(objectClass=gosaAdministrativeUnitTag)(gosaUnitTag='.
423 $this->gosaUnitTag.')))', array('dn'));
424 } else {
425 $ldap->search('objectClass=gosaAdministrativeUnitTag', array('dn'));
426 }
428 $objects = array();
429 while ($attrs= $ldap->fetch()){
430 $objects[] = $attrs;
431 }
432 foreach($objects as $attrs){
434 /* Skip self */
435 if ($attrs['dn'] == $this->dn){
436 continue;
437 }
439 /* Check for confilicting administrative units */
440 $fix= true;
441 foreach ($this->config->adepartments as $key => $tag){
442 /* This one is shorter than our dn, its not relevant... */
443 if ($len >= strlen($key)){
444 continue;
445 }
447 /* This one matches with the latter part. Break and don't fix this entry */
448 if (preg_match('/(^|,)'.normalizePreg($key).'$/', $attrs['dn'])){
449 $fix= false;
450 break;
451 }
452 }
454 /* Fix entry if needed */
455 if ($fix){
456 if($OnlySetTagFlag){
457 $this->must_be_tagged =true;
458 return;
459 }
460 $this->handle_object_tagging($attrs['dn'], $this->gosaUnitTag, TRUE );
461 }
462 }
463 if(!$OnlySetTagFlag){
464 echo '<p class="seperator"> </p>';
465 echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
466 <br><input type='submit' name='back' value='"._("Continue")."'>
467 </form></div>";
468 }
469 }
472 /* Move/Rename complete trees */
473 function recursive_move($src_dn, $dst_dn,$force = false)
474 {
475 /* If force == false prepare to recursive move this object from src to dst
476 on the next call. */
477 if(!$force){
478 $this->rec_cpy = true;
479 $this->rec_src = $src_dn;
480 $this->rec_dst = $dst_dn;
481 }else{
483 /* If this is called, but not wanted, abort */
484 if(!$this->rec_cpy){
485 return;
486 }
488 $src_dn = $this->rec_src;
489 $dst_dn = $this->rec_dst;
491 /* Print header to have styles included */
492 $smarty= get_smarty();
494 echo ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
495 <html>
496 <head>
497 <title></title>
498 <style type="text/css">@import url("themes/default/style.css");</style>
499 <script language="javascript" src="include/focus.js" type="text/javascript"></script>
500 </head>
501 <body style="background: none; margin:4px;" id="body" >
502 ';
503 echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".@LDAP::fix($src_dn)."</i>","<i>".@LDAP::fix($dst_dn)."</i>")."</h3>";
506 /* Check if the destination entry exists */
507 $ldap= $this->config->get_ldap_link();
509 /* Check if destination exists - abort */
510 $ldap->cat($dst_dn, array('dn'));
511 if ($ldap->fetch()){
512 trigger_error("Recursive_move ".@LDAP::fix($dst_dn)." already exists.",
513 E_USER_WARNING);
514 echo sprintf("Recursive_move: '%s' already exists", @LDAP::fix($dst_dn))."<br>";
515 return (FALSE);
516 }
518 /* Perform a search for all objects to be moved */
519 $objects= array();
520 $ldap->cd($src_dn);
521 $ldap->search("(objectClass=*)", array("dn"));
522 while($attrs= $ldap->fetch()){
523 $dn= $attrs['dn'];
524 $objects[$dn]= strlen($dn);
525 }
527 /* Sort objects by indent level */
528 asort($objects);
529 reset($objects);
531 /* Copy objects from small to big indent levels by replacing src_dn by dst_dn */
532 foreach ($objects as $object => $len){
535 $src= str_replace("\\","\\\\",$object);
536 $dst= preg_replace("/".str_replace("\\","\\\\",$src_dn)."$/", "$dst_dn", $object);
537 $dst= str_replace($src_dn,$dst_dn,$object);
539 echo "<b>"._("Object").":</b> ".@LDAP::fix($src)."<br>";
541 $this->update_acls($object, $dst,TRUE);
543 if (!$this->copy($src, $dst)){
544 echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."</font>";
545 return (FALSE);
546 }
547 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
548 flush();
549 }
551 /* Remove src_dn */
552 $ldap->cd($src_dn);
553 $ldap->recursive_remove();
554 $this->dn = $this->rec_dst;
555 $this->rec_src = $this->rec_dst = "";
556 $this->rec_cpy =false;
558 echo '<p class="seperator"> </p>';
560 echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
561 <br><input type='submit' name='back' value='"._("Continue")."'>
562 </form></div>";
564 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
565 echo "</body></html>";
567 return (TRUE);
568 }
569 }
572 /* Return plugin informations for acl handling */
573 static function plInfo()
574 {
575 return (array("plShortName" => _("Generic"),
576 "plDescription" => _("Departments"),
577 "plSelfModify" => FALSE,
578 "plPriority" => 0,
579 "plDepends" => array(),
580 "plSection" => array("admin"),
581 "plCategory" => array("department" => array("objectClass" => "gosaDepartment", "description" => _("Departments"))),
583 "plProvidedAcls" => array(
584 "description" => _("Description"),
585 "c" => _("Country"),
586 "base" => _("Base"),
587 "l" => _("Location"),
588 "telephoneNumber" => _("Telephone"),
589 "ou" => _("Department name"),
590 "businessCategory" => _("Category"),
591 "st" => _("State"),
592 "postalAddress" => _("Address"),
593 "gosaUnitTag" => _("Administrative settings"),
594 "facsimileTelephoneNumber" => _("Fax"))
595 ));
596 }
598 function handle_object_tagging($dn= "", $tag= "", $show= false)
599 {
600 /* No dn? Self-operation... */
601 if ($dn == ""){
602 $dn= $this->dn;
604 /* No tag? Find it yourself... */
605 if ($tag == ""){
606 $len= strlen($dn);
608 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "No tag for $dn - looking for one...", "Tagging");
609 $relevant= array();
610 foreach ($this->config->adepartments as $key => $ntag){
612 /* This one is bigger than our dn, its not relevant... */
613 if ($len <= strlen($key)){
614 continue;
615 }
617 /* This one matches with the latter part. Break and don't fix this entry */
618 if (preg_match('/(^|,)'.normalizePreg($key).'$/', $dn)){
619 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
620 $relevant[strlen($key)]= $ntag;
621 continue;
622 }
624 }
626 /* If we've some relevant tags to set, just get the longest one */
627 if (count($relevant)){
628 ksort($relevant);
629 $tmp= array_keys($relevant);
630 $idx= end($tmp);
631 $tag= $relevant[$idx];
632 $this->gosaUnitTag= $tag;
633 }
634 }
635 }
637 /* Set tag? */
638 if ($tag != ""){
639 /* Set objectclass and attribute */
640 $ldap= $this->config->get_ldap_link();
641 $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
642 $attrs= $ldap->fetch();
643 if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
644 if ($show) {
645 echo sprintf(_("Object '%s' is already tagged"), @LDAP::fix($dn))."<br>";
646 flush();
647 }
648 return;
649 }
650 if (count($attrs)){
651 if ($show){
652 echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."<br>";
653 flush();
654 }
655 $nattrs= array("gosaUnitTag" => $tag);
656 $nattrs['objectClass']= array();
657 for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
658 $oc= $attrs['objectClass'][$i];
659 if ($oc != "gosaAdministrativeUnitTag"){
660 $nattrs['objectClass'][]= $oc;
661 }
662 }
663 $nattrs['objectClass'][]= "gosaAdministrativeUnitTag";
664 $ldap->cd($dn);
665 $ldap->modify($nattrs);
666 if (!$ldap->success()){
667 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
668 }
669 } else {
670 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging");
671 }
673 } else {
674 /* Remove objectclass and attribute */
675 $ldap= $this->config->get_ldap_link();
676 $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
677 $attrs= $ldap->fetch();
678 if (isset($attrs['objectClass']) && !in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass'])){
679 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "$dn is not tagged", "Tagging");
680 return;
681 }
682 if (count($attrs)){
683 if ($show){
684 echo sprintf(_("Removing tag from object '%s'"), @LDAP::fix($dn))."<br>";
685 flush();
686 }
687 $nattrs= array("gosaUnitTag" => array());
688 $nattrs['objectClass']= array();
689 for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
690 $oc= $attrs['objectClass'][$i];
691 if ($oc != "gosaAdministrativeUnitTag"){
692 $nattrs['objectClass'][]= $oc;
693 }
694 }
695 $ldap->cd($dn);
696 $ldap->modify($nattrs);
697 if (!$ldap->success()){
698 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
699 }
700 } else {
701 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not removing tag ($tag) $dn - seems to have moved away", "Tagging");
702 }
703 }
705 }
707 }
709 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
710 ?>