summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ead179)
raw | patch | inline | side by side (parent: 0ead179)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 8 May 2006 07:13:21 +0000 (07:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 8 May 2006 07:13:21 +0000 (07:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3212 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiSummaryTab.inc | patch | blob | history |
index 43b087e56f4ba6f06b627da01777c3287490ff62..45402b6b2c7e9d378e5fb4d0e653878d59892789 100644 (file)
foreach($data as $key => $entry){
$image = "<img src='".$this->objs[$key]['Image']."' class='center' alt='".$this->objs[$key]['Name']."' border=0>";
-
- $str.="<tr><td>";
if(!isset($entry['Open'])){
- $str .= "<input type='image' class='center' src='images/expand.png' name='open_".$key."'> ";
+ $str .= "<tr><td colspan=2><input type='image' class='center' src='images/expand.png' name='open_".$key."'> ";
$str .= $image." ";
- $str .= "<b>".$this->objs[$key]['Name']."</b>";
+ $str .= "<b>".$this->objs[$key]['Name']."</b></td></tr>";
}else{
- $str .= "<input type='image' class='center' src='images/sort_down.png' name='close_".$key."'> ";
+ $str .= "<tr><td colspan=2><input type='image' class='center' src='images/sort_down.png' name='close_".$key."'> ";
$str .= $image." ";
- $str .= "<b>".$this->objs[$key]['Name']."</b>";
+ $str .= "<b>".$this->objs[$key]['Name']."</b></td></tr>";
/* Display FAItemplate FAIhook FAIscript entries */
if(in_array($key,array("FAItemplate","FAIhook","FAIscript"))){
+ $nums = array();
+
if($key == "FAIscript"){
+
krsort($entry['Entries']);
foreach($entry['Entries'] as $scripts){
ksort($scripts);
foreach($scripts as $script){
- $script['cn'][0] = "(".$script['FAIpriority'][0].") ".$script['cn'][0];
- $tmp[$script['cn'][0]] = $script;
+
+// $script['cn'][0] = "(".$script['FAIpriority'][0].") ".$script['cn'][0];
+ if(!isset($nums[$script['cn'][0]])){
+ $nums[$script['cn'][0]]= 0;
+ }
+ $nums[$script['cn'][0]] ++;
+
+ $tmp[] = $script;
}
}
$entry['Entries'] = $tmp;
+ }else{
+ foreach($entry['Entries'] as $script){
+ if(!isset($nums[$script['cn'][0]])){
+ $nums[$script['cn'][0]]= 0;
+ }
+ $nums[$script['cn'][0]] ++;
+ }
}
foreach($entry['Entries'] as $cn => $data){
- $str .="<td></tr><tr><td style='padding-left:20px;'>";
+
+ if(isset($nums[$data['cn'][0]]) && ($nums[$data['cn'][0]] > 1)){
+ $str .="<tr style='background: #EE3434;'><td style='padding-left:20px;'>";
+ }else{
+ $str .="<tr><td style='padding-left:20px;'>";
+ }
+
$str .= "<a target='_blank'href='?plug=".$_GET['plug']."&show&type=".$key."&id=".base64_encode($data['dn'])."'>";
- $str .= $image." ".$data['cn'][0];
+ $str .= $image." ";
+ if(isset($data['FAIpriority'][0])){
+ $str .= "(".$data['FAIpriority'][0].")";
+ }
+
+ $str .= " ".$data['cn'][0];
if(isset($data['description'][0])){
$str .= " [".$data['description'][0]."]";
}
- $str .="</a>";
+ $str .= "</a>";
+ $str .= "</td><td><i>".$data['CLASS']."</i>";
+ $str .= "</td></tr>";
}
}
/* Create variable entries */
if(in_array($key,array("FAIvariable"))) {
foreach($entry['Entries'] as $cn => $data){
- $str .="<td></tr><tr><td style='padding-left:20px;'>";
+ $str .="<tr><td style='padding-left:20px;'>";
$str .= $image." ".$data['cn'][0];
if(isset($data['description'][0])){
$str .= " [".$data['description'][0]."] ";
}
$str .=" = '".$data['FAIvariableContent'][0]."'";
+
+ $str .= "</td><td><i>".$data['CLASS']."</i>";
+
+
+ $str .="</td></tr>";
}
}
/* Create packagelist entries */
if(in_array($key,array("FAIpackageList"))) {
- ksort($entry['Entries']);
- foreach($entry['Entries'] as $cn => $data){
- $str .="<td></tr><tr><td style='padding-left:20px;'>";
- $str .= $image." ".$data;
+// ksort($entry['Entries']);
+ foreach($entry['Entries'] as $data){
+ $str .="<tr><td style='padding-left:20px;'>";
+ $str .= $image." ".$data['cn'][0];
+ $str .= "</td><td><i>".$data['CLASS']."</i>";
+ $str .= "</td></tr>";;
}
}
/* Create partition table entries */
if(in_array($key,array("FAIpartitionTable"))) {
foreach($entry['Entries'] as $cn => $data){
- $str .="<td></tr><tr><td style='padding-left:20px;'>";
+ $str .= "<tr><td style='padding-left:20px;'>";
$str .= $image." ".$data['name'];
+ $str .= "</td><td><i>".$data['CLASS']."</i>";
+ $str .= "</td></tr>";
ksort($data['partitions']);
+
+ $str .= "<tr><td colspan=2 style='padding-left:20px;'>";
$str .= "<table cellspacing=1 style='background:#FFFFFF;'>
<tr style='background-color:#BBBBBB;'>
<td>"._("No.")."</td>
}
}
}
- $str.="</td></tr>" ;
}
$str .="</table>";
return($str);
$ldap->cd($data['dn']);
$ldap->search("(objectClass=FAIscriptEntry)",array("cn","description","FAIpriority"));
while($attrs = $ldap->fetch()){
- $current[$attrs['FAIpriority'][0]][$attrs['cn'][0]] = $attrs;
+ $attrs['CLASS'] = $data['cn'][0];
+ $current[$attrs['FAIpriority'][0]][] = $attrs;
}
$this->Result['FAIscript']['Entries'] = $current ;
}
/* Create an array which is sortable by priority */
while($attrs = $ldap->fetch()){
+ $attrs['CLASS'] = $data['cn'][0];
+ $disks[$attrs['cn'][0]]= $attrs;
if(isset($attrs['description'][0])){
$disks[$attrs['cn'][0]]['name'] = $attrs['cn'][0]." [".$attrs['description'][0]."]";
}else{
if(!isset($attrs['FAIfsOptions'][0])){
$attrs['FAIfsOptions'][0] = "";
}
+ $attrs['CLASS'] = $data['cn'][0];
$disks[$key]['partitions'][$attrs['cn'][0]] = $attrs;
}
}
$ldap->cd($data['dn']);
$ldap->search("(objectClass=FAItemplateEntry)",array("cn","description"));
while($attrs = $ldap->fetch()){
- $current[$attrs['cn'][0]] = $attrs;
+ $attrs['CLASS'] = $data['cn'][0];
+ $current[] = $attrs;
}
$this->Result['FAItemplate']['Entries'] = $current ;
}
if(isset($data['FAIpackage'])){
unset($data['FAIpackage']['count']);
foreach($data['FAIpackage'] as $pkg){
- $current[$pkg] = $pkg;
+ $attrs['CLASS'] = $data['cn'][0];
+ $attrs['cn'][0] = $pkg;
+ $current[$pkg] = $attrs;
}
}
$this->Result['FAIpackageList']['Entries'] = $current ;
$ldap->cd($data['dn']);
$ldap->search("(objectClass=FAIvariableEntry)",array("cn","description","FAIvariableContent"));
while($attrs = $ldap->fetch()){
- $current[$attrs['cn'][0]] = $attrs;
+ $attrs['CLASS'] = $data['cn'][0];
+ $current[] = $attrs;
}
$this->Result['FAIvariable']['Entries'] = $current ;
}
$ldap->cd($data['dn']);
$ldap->search("(objectClass=FAIhookEntry)",array("cn","description"));
while($attrs = $ldap->fetch()){
+ $attrs['CLASS'] = $data['cn'][0];
$current[$attrs['cn'][0]] = $attrs;
}
$this->Result['FAIhook']['Entries'] = $current ;