[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/mydms/out/ -> out.DefaultKeywords.php (source)

   1  <?php
   2  include ("../inc/inc.Settings.php");
   3  include ("../inc/inc.AccessUtils.php");
   4  include ("../inc/inc.ClassAccess.php");
   5  include ("../inc/inc.ClassDocument.php");
   6  include ("../inc/inc.ClassFolder.php");
   7  include ("../inc/inc.ClassGroup.php");
   8  include ("../inc/inc.ClassUser.php");
   9  include ("../inc/inc.ClassKeywords.php");
  10  include ("../inc/inc.DBAccess.php");
  11  include ("../inc/inc.FileUtils.php");
  12  include ("../inc/inc.Language.php");
  13  include ("../inc/inc.OutUtils.php");
  14  include ("../inc/inc.Authentication.php");
  15  
  16  
  17  $categories = getAllKeywordCategories($user->getID());
  18  
  19  
  20  if ($user->isAdmin())
  21      printHTMLHead( getMLText("global_default_keywords") );
  22  else
  23      printHTMLHead( getMLText("personal_default_keywords"));
  24  ?>
  25  
  26  <script language="JavaScript">
  27  obj = -1;
  28  function showKeywords(selectObj) {
  29      if (obj != -1)
  30          obj.style.display = "none";
  31      
  32      id = selectObj.options[selectObj.selectedIndex].value;
  33      if (id == -1)
  34          return;
  35      
  36      obj = document.getElementById("keywords" + id);
  37      obj.style.display = "";
  38  }
  39  </script>
  40  <?php
  41  printTitleBar(getFolder($settings->_rootFolderID));
  42  printCenterStart();
  43  
  44  
  45  printStartBox(getMLText("new_default_keyword_category"));
  46  ?>
  47      <form action="../op/op.DefaultKeywords.php" method="post">
  48      <input type="Hidden" name="action" value="addcategory">
  49      <table>
  50          <tr>
  51              <td class="inputDescription" valign="top"><?php printMLText("name");?>:</td>
  52              <td><input name="name"></td>
  53          </tr>
  54          <tr>
  55              <td colspan="2"><br><input type="Submit"></td>
  56          </tr>
  57      </table>
  58      </form>
  59  
  60  <?php
  61  printNextBox(getMLText("edit_default_keyword_category"));
  62  ?>
  63      <table>
  64      <tr>
  65          <td class="inputDescription"><?php echo getMLText("default_keyword_category")?>:</td>
  66          <td>
  67              <select onchange="showKeywords(this)">
  68                  <option value="-1"><?php echo getMLText("choose_category")?>
  69                  <?php
  70                  foreach ($categories as $category) {
  71                      $owner = $category->getOwner();
  72                      if ((!$user->isAdmin()) && ($owner->getID() != $user->getID()))
  73                          continue;
  74                      
  75                      print "<option value=\"".$category->getID()."\">" . $category->getName();
  76                  }
  77                  ?>
  78              </select>
  79          </td>
  80      </tr>
  81      <?php
  82      foreach ($categories as $category) {
  83          $owner = $category->getOwner();
  84          if ((!$user->isAdmin()) && ($owner->getID() != $user->getID()))
  85              continue;
  86      ?>
  87          <tr id="keywords<?php echo $category->getID()?>" style="display : none;">
  88          <td colspan="2">
  89              <table cellpadding="5" cellspacing="0">
  90                  <tr>
  91                      <td colspan="2"><hr size="1" width="100%" color="#000080" noshade></td>
  92                  </tr>
  93                  <tr>
  94                      <td class="inputDescription"><?php echo getMLText("name")?>:</td>
  95                      <td>
  96                          <form action="../op/op.DefaultKeywords.php" method="post">
  97                              <input type="Hidden" name="action" value="editcategory">
  98                              <input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
  99                              <input name="name" value="<?php echo $category->getName()?>">&nbsp; 
 100                              <input type="Image" src="images/save.gif" title="<?php echo getMLText("save")?>" border="0">
 101                          </form>
 102                      </td>
 103                  </tr>
 104                  <tr>
 105                      <td class="inputDescription" valign="top"><?php echo getMLText("default_keywords")?>:</td>
 106                      <td>
 107                          <table cellpadding="0" cellspacing="0">
 108                          <?php
 109                              $lists = $category->getKeywordLists();
 110                              if (count($lists) == 0)
 111                                  print "<tr><td class=\"standardText\">" . getMLText("no_default_keywords") . "</td></tr>";
 112                              else
 113                                  foreach ($lists as $list) {
 114                          ?>
 115                                      <tr>
 116                                          <form action="../op/op.DefaultKeywords.php" method="post">
 117                                          <input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
 118                                          <input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
 119                                          <input type="Hidden" name="action" value="editkeywords">
 120                                          <td>
 121                                              <input name="keywords" value="<?php echo $list["keywords"]?>">
 122                                          </td>
 123                                          <td>&nbsp;
 124                                               <input name="action" value="editkeywords" type="Image" src="images/save.gif" title="<?php echo getMLText("save")?>" border="0"> &nbsp;
 125                                          <!--     <input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" border="0"> &nbsp; -->
 126                                              <a href="../op/op.DefaultKeywords.php?categoryid=<?php echo $category->getID()?>&keywordsid=<?php echo $list["id"]?>&action=removekeywords"><img src="images/del.gif" title="<?php echo getMLText("delete")?>" border=0></a>
 127                                          </td>
 128                                          </form>
 129                                      </tr>
 130                          <?php        }  ?>
 131                          </table>
 132                      </td>
 133                      <td></td>
 134                  </tr>
 135                  <tr>
 136                      <td class="inputDescription"><?php echo getMLText("new_default_keywords")?>:</td>
 137                      <td>
 138                          <form action="../op/op.DefaultKeywords.php" method="post">
 139                              <input type="Hidden" name="action" value="newkeywords">
 140                              <input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
 141                              <input name="keywords">&nbsp;
 142                              <input type="Image" src="images/save.gif" title="<?php echo getMLText("save")?>" border="0">
 143                          </form>
 144                      </td>
 145                  </tr>
 146                  <tr>
 147                      <td colspan="2">
 148                          <br>
 149                          <a class="standardText" href="../op/op.DefaultKeywords.php?categoryid=<?php print $category->getID();?>&action=removecategory"><img src="images/del.gif" width="15" height="15" border="0" align="absmiddle" alt=""> <?php printMLText("rm_default_keyword_category");?></a>
 150                      </td>
 151                  </tr>
 152              </table>
 153          </td>
 154          </tr>
 155  <?php    } ?>
 156      </table>
 157      
 158  <?php
 159  printEndBox();
 160  
 161  
 162  printCenterEnd();
 163  printHTMLFoot();
 164  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7