Turinio valdymo sistema

Prisijungimas partneriams
Jūsų slaptažodis

Dirbame su:










_dependents.inc.php failo pavyzdys

<?php
if(NOT_INCLUDED) return false;
?>
<div id="content_dependents" style="display:none; height:100%" class="treeArea2" align="center">



<table>
<tr>
<td></td>
  <td><?php echo txt("Element"); ?></td>
  <td><?php echo txt("Type"); ?></td>
  <td></td>
 </tr>
  
 <?php
 if(is_array($_dependent_items) and sizeof($_dependent_items)){
  foreach($_dependent_items as $element){ ?>
   <tr>
    <td>
     <div><a href="<?php echo $_SELF . "?page=$page"; ?>&set_item_id=<?php echo $element["item_id"]; ?>" <?php if(!$element["active"]) echo "style=\"color:#666666\"" ?> class=link><?php echo $element["name"]; ?></a> <?php if($element["link"]) echo "*"; ?></div>
    </td>
    <td><?php echo $_dependent_modules[$element["type"]]["name"]; ?></td>
    <td><?php
     if($element["active"]){
      echo "<a href=".$_SELF . "?page=".$page."&ditem_id=" . $element["item_id"]."&dparent_id=".$element["parent_id"]."&action=deactivate_item><img src=images/1/icons/common/enabled.gif width=16 height=16 alt=\"" . txt( "Deactivate") . "\" border=0></a>";
     }
     else{
      echo "<a href=".$_SELF . "?page=".$page."&ditem_id=" . $element["item_id"]."&dparent_id=".$element["parent_id"]."&action=activate_item><img src=images/1/icons/common/disabled.gif width=16 height=16 alt=\"" . txt( "Activate") . "\" border=0></a>";
     }
    ?></td>
    <td><a href="<?php echo $_SELF . "?page=".$page."&sel_item_list=" . $element["item_id"]."&action=del_items"; ?>">Delete</a></td>
   </tr>
   <?php
   $count++;
  }
 }
 
 if(!$count){
 ?>
  <tr>
   <td colspan="4" align="center">
   <?php echo txt("No elements"); ?>
   </td>
  </tr>
 <?php
}
?>
</table>
</div>
<div id="content_dependentsadd" style="display:none; height:100%" class="treeArea2" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<form action="<?php echo $_SELF . "?page=$page"; ?>" method="POST">
<input type="hidden" name="action" value="new">
<tr><td>
<?php
// Item creation bar
if($admin_data[‘fullaccess‘] or $_perms[‘write‘]){
?>
<nobr>
<select style="vertical-align:top;" name="type" class="formDropdown">
  <?php
  foreach($_dependent_modules as $mod_name => $module){
  ?><option value="<?php echo $mod_name; ?>" <?php if($last_type == $mod_name) echo "SELECTED"; ?>><?php echo $module["name"]; ?><?php } ?>
 </select>
 <textarea rows="2" style="width:300px;" name="name" align="absmiddle" class="formText"></textarea>
 <!-- <input type="Text" name="name" align="absmiddle" class="formText"> -->
 <input style="vertical-align:top;" type="submit" class="formButton" value="<?php echo txt( "Create"); ?>">
</nobr>
<?php } ?>
</td></tr>
</form>
</table>
</div>