Ejemplo n.º 1
0
 function display($id, $linktype)
 {
     echo "<table width='100%'>";
     echo "<tr>";
     echo "<td>";
     // open tree to selected parent
     action::open_tree();
     // open deskriptor
     action::show();
     if (right::link()) {
         // swap direktion for equivalent links
         if ($linktype == 2 and right::write()) {
             action::swap($id);
         }
         // change OB
         if ($linktype == 1 and right::write()) {
             action::change($id);
         }
     }
     echo "</td>";
     if (right::link()) {
         echo "<td align='right'>";
         if (right::write()) {
             // make new parent link
             action::add_link($id, $linktype);
             if ($linktype == 1) {
                 $minimum = 1;
             } else {
                 $linktype == 0;
             }
             // unlink selected parent
             if (thesaurus::parent_num($id) > $minimum) {
                 action::unlink();
             }
         }
         echo "</td>";
     }
     echo "</tr>";
     echo "</table>";
 }