Login   Register  
PHP Classes
elePHPant
Icontem

File: template.inc.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vagharshak Tozalakyan  >  Resources Manager  >  template.inc.php  >  Download  
File: template.inc.php
Role: Application script
Content type: text/plain
Description: Template
Class: Resources Manager
Manage files in the directory
Author: By
Last change:
Date: 8 years ago
Size: 6,004 bytes
 

Contents

Class file image Download
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $tpl_charset?>" />

<title><?php echo $tpl_title?></title>

<script type="text/javascript" language="JavaScript">
<!--

function strTrim(str)
{
  while (str.substring(0, 1) == ' '
    || str.substring(0, 1) == '\n'
    || str.substring(0, 1) == '\r')
    str = str.substring(1, str.length);
  while (str.substring(str.length - 1, str.length) == ' '
    || str.substring(str.length - 1, str.length) == '\n'
    || str.substring(str.length - 1, str.length) == '\r')
    str = str.substring(0, str.length - 1);
  return str;
}

function onRename(fName)
{
  do {
    var newName = prompt('<?php echo $tpl_enter_new_name?>', fName);
    if (newName === null)
    {
      return;
    }
    newName = strTrim(newName);
  } while (newName == '');
  var newURL = '<?php echo $_SERVER['PHP_SELF']; ?>';
  newURL += '?fname=' + escape(fName);
  newURL += '&new=' + escape(newName);
  newURL += '&oper=rename';
  location.href = newURL;
}

function onDelete(fName)
{
  if (confirm('<?php echo $tpl_del_confirm?>'))
  {
    var newURL = '<?php echo $_SERVER['PHP_SELF']; ?>';
    newURL += '?fname=' + escape(fName) + '&oper=delete';
    location.href = newURL;
  }
}

//-->
</script>

<style type="text/css">
<!--

.rmBody {
  background-color: #f0f0ee;
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  scrollbar-3dlight-color: #f0f0ee;
  scrollbar-arrow-color: #676662;
  scrollbar-base-color: #f0f0ee;
  scrollbar-darkshadow-color: #dddddd;
  scrollbar-face-color: #e0e0dd;
  scrollbar-highlight-color: #f0f0ee;
  scrollbar-shadow-color: #f0f0ee;
  scrollbar-track-color: #f5f5f5;
}

.rmLink {
  color: #1275d3;
  text-decoration: underline;
}

.rmLink:hover {
  color: #f66000;
  text-decoration: none;
}

.rmFileElem {
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  border-style: solid;
  border-color: #000000;
  border-width: 1px;
}

.rmBtn {
  background-color: #cccccc;
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  font-weight: bold;
  border-style: solid;
  border-color: #000000;
  border-width: 1px;
}

.rmTable {
  border-style: solid;
  border-width: 1px;
  border-color: #b6bdd2;
}

.rmTopRow {
  background-color: #b6bdd2;
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  font-weight: bold;
}

.rmRow1 {
  background-color: #f2f2f2;
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
}

.rmRow2 {
  background-color: #ffffff;
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
}

.rmErr {
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  font-weight: bold;
  color: #ff0000;
}

.rmOk {
  font-family: <?php echo $tpl_font?>;
  font-size: 11px;
  font-weight: bold;
  color: #0000ff;
}

//-->
</style>

</head>

<body class="rmBody">

<div align="center">

<?php if (!empty($tpl_err_msg)) { ?>
<p class="rmErr"><?php echo $tpl_err_msg?></p>
<?php ?>

<?php if (!empty($tpl_ok_msg)) { ?>
<p class="rmOk"><?php echo $tpl_ok_msg?></p>
<?php ?>

<table width="550" border="0" cellspacing="0" cellpadding="5" class="rmTable">

<tr>
<td width="30" align="center" valign="middle" class="rmTopRow">
<?php echo $tpl_type_hdr?>
</td>
<td align="left" valign="middle" class="rmTopRow">
<?php echo $tpl_fname_hdr?>
</td>
<td width="50" align="center" valign="middle" class="rmTopRow">
<?php echo $tpl_size_hdr?>
</td>
<td width="150" align="center" valign="middle" class="rmTopRow">
<?php echo $tpl_modif_hdr?>
</td>
<td width="35" align="center" valign="middle" class="rmTopRow">
<a href="<?php echo $_SERVER['PHP_SELF']; ?>"><img
  src="<?php echo $tpl_refresh_img?>" width="16" height="16" border="0"
  alt="<?php echo $tpl_refresh?>" title="<?php echo $tpl_refresh?>" /></a>
</td>
</tr>

<?php
  
for ($i 0$i $tpl_fl_num$i++)
  {
    
$tpl_row_style = ($i 'rmRow1' 'rmRow2');
?>

<tr>

<td width="30" align="center" valign="middle" class="<?php echo $tpl_row_style?>">
<a href="<?php echo $tpl_files[$i]['url']; ?>" target="_blank"><img
  src="<?php echo $tpl_files[$i]['icon']; ?>" border="0"
  width="<?php echo $tpl_icon_width?>" height="<?php echo $tpl_icon_height?>"
  alt="<?php echo $tpl_files[$i]['hint']; ?>"
  title="<?php echo $tpl_files[$i]['hint']; ?>" /></a>
</td>

<td align="left" valign="middle" class="<?php echo $tpl_row_style?>">
<a href="<?php echo $tpl_files[$i]['url']; ?>" target="_blank" class="rmLink">
<?php echo $tpl_files[$i]['name']; ?></a>
</td>

<td width="50" align="center" valign="middle" class="<?php echo $tpl_row_style?>">
<?php echo $tpl_files[$i]['size']; ?>
</td>

<td width="150" align="center" valign="middle" class="<?php echo $tpl_row_style?>">
<?php echo $tpl_files[$i]['modif']; ?>
</td>

<td width="35" align="center" valign="middle" class="<?php echo $tpl_row_style?>">
<a href="javascript: onRename('<?php echo $tpl_files[$i]['name']; ?>');"><img
  src="<?php echo $tpl_rename_img?>" width="16" height="16" border="0"
  alt="<?php echo $tpl_rename?>" title="<?php echo $tpl_rename?>" /></a>
<a href="javascript: onDelete('<?php echo $tpl_files[$i]['name']; ?>');"><img
  src="<?php echo $tpl_delete_img?>" width="16" height="16" border="0"
  alt="<?php echo $tpl_delete?>" title="<?php echo $tpl_delete?>" /></a>
</td>

</tr>

<?php ?>

</table>

<br /><br />

<form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $tpl_upl_max?>" />
<?php for ($i 0$i $tpl_upl_num$i++) { ?>
<input type="file" name="upload[]" class="rmFileElem" /><br />
<?php ?>
<br />
<input type="submit" value="<?php echo $tpl_upload?>" class="rmBtn" />
</form>

</div>

</body>

</html>