1 <?php
3 require_once("class_goService.inc");
5 class goCupsServer extends goService{
7 var $cli_summary = "This plugin is used within the ServerService Pluign \nand indicates that this server supports cups management.";
8 var $cli_description = "Some longer text\nfor help";
9 var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
11 /* This plugin only writes its objectClass */
12 var $objectclasses = array("goCupsServer");
13 var $attributes = array();
14 var $StatusFlag = "goCupsServerStatus";
16 /* This class can't be assigned twice so it conflicts with itsself */
17 var $conflicts = array("goCupsServer");
19 var $DisplayName = "";
20 var $dn = NULL;
21 var $acl;
22 var $cn = "";
23 var $goCupsServerStatus = "";
24 var $view_logged =FALSE;
26 function goCupsServer($config,$dn)
27 {
28 goService::goService($config,$dn);
29 $this->DisplayName = _("Print service");
30 }
33 function execute()
34 {
35 if($this->is_account && !$this->view_logged){
36 $this->view_logged = TRUE;
37 new log("view","server/".get_class($this),$this->dn);
38 }
40 $smarty = get_smarty();
41 foreach($this->attributes as $attr){
42 $smarty->assign($attr,$this->$attr);
43 }
44 return($smarty->fetch(get_template_path("goCupsServer.tpl",TRUE,dirname(__FILE__))));
45 }
47 function getListEntry()
48 {
49 $fields = goService::getListEntry();
50 $fields['Message'] = _("Print service");
51 $fields['AllowEdit'] = false;
52 return($fields);
53 }
55 function check()
56 {
57 $message = plugin::check();
58 return($message);
59 }
61 function save_object()
62 {
63 plugin::save_object();
64 }
66 /* Return plugin informations for acl handling */
67 function plInfo()
68 {
69 return (array(
70 "plShortName" => _("Cups"),
71 "plDescription" => _("Print service")." ("._("Services").")",
72 "plSelfModify" => FALSE,
73 "plDepends" => array(),
74 "plPriority" => 100,
75 "plSection" => array("administration"),
76 "plCategory" => array("server"),
78 "start" => _("Start"),
79 "stop" => _("Stop"),
80 "restart" => _("Restart"),
82 "plProvidedAcls"=> array()
83 ));
84 }
85 }
86 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
87 ?>