Files
VestaCP/web/templates/admin/list_web.html
2013-01-19 23:57:58 +04:00

208 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/web/'"> <?php print _('Add Domain for hosting');?> </button>
</div>
<div style="text-align: right; float: right;">
<form action="/search/" method="get" >
<input type="text" name="q" style="margin: 2px 2px 0px 0px; width: 250px; padding: 3px;" size="30">
<input type="submit" value="<?php print _('Search');?>" class="button" style="font-size: 12px; height: 24px;">
</form>
</div>
<div style="float:left; padding-left: 26px;">
<form action="/bulk/web/" method="post" id="objects">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
<select style="margin:0 2px 0 0px;" name="action">
<option><?php print _('apply to selected');?></option>
<option><?php print _('suspend');?></option>
<option><?php print _('unsuspend');?></option>
<option><?php print _('delete');?></option>
</select>
<input type="submit" name="ok" value="" class="button" style="width: 37px;font-size: 12px; height: 24px;">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="vstobjects">
<table class='data'>
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
}
if (!empty($data[$key]['SSL_HOME'])) {
if ($data[$key]['SSL_HOME'] == 'same') {
$ssl_home = 'public_html';
} else {
$ssl_home = 'public_shtml';
}
} else {
$ssl_home = '';
}
$web_stats='no';
if (!empty($data[$key]['STATS'])) {
$web_stats=$data[$key]['STATS'];
}
$ftp_user='no';
if (!empty($data[$key]['FTP_USER'])) {
$ftp_user=$data[$key]['FTP_USER'];
}
$nginx_support='no';
if (!empty($data[$key]['NGINX'])) {
$nginx_support='yes';
}
if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
$nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
$nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
$nginx_ext = trim($nginx_ext, ",");
$nginx_ext = str_replace(',', ', ', $nginx_ext);
$nginx_ext = $nginx_ext.", ...";
} else {
$nginx_ext_title = '';
$nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
}
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="domain[]" value="<?php echo "$key" ?>" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo _($status); ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<?php
if (!empty($data[$key]['STATS'])) {
echo ' <td class="data-controls" width="114px">';
echo "<a href='http://".$key."/vstats/' target='_blank'>";
echo '<img src="/images/new_window.png" width="8px" height="8px"> '._('open webstats').' </a></td>';
}
?>
<td class="data-controls" width="50px"><a href="/edit/web/?domain=<?php echo "$key" ?>"><img src="/images/edit.png" width="8px" height="8px"> <?php print _('edit');?></a></td>
<td class="data-controls do_<?php echo $spnd_action ?>" width="80px">
<img src="/images/suspend.png" width="7px" height="8px" class="do_<?php echo $spnd_action ?>">
<a id="<?php echo $spnd_action ?>_link_<?php echo $i ?>" class="do_<?php echo $spnd_action ?>"> <?php echo _($spnd_action); ?></a>
<input type="hidden" name="<?php echo $spnd_action ?>_url" value="/<?php echo $spnd_action ?>/web/?domain=<?php echo $key ?>" />
<div id="<?php echo $spnd_action ?>_dialog_<?php echo $i ?>" class="confirmation-text-suspention hidden" title="<?php print _('Confirmation');?>">
<p class="counter-value"><?php print _('DOMAIN_ACTION_CONFIRMATION',_($spnd_action),$key);?></p>
</div>
</td>
<td class="data-controls do_delete" width="70px">
<img src="/images/delete.png" width="7px" height="7px" class="do_delete">
<a id="delete_link_<?php echo $i ?>" class="do_delete"> <?php print _('delete');?></a>
<input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
<div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print _('Confirmation');?>">
<p class="counter-value"><?php print _('DOMAIN_ACTION_CONFIRMATION',_('delete'),$key);?></p>
</div>
</td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td colspan=3 class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
</td>
</tr>
<tr>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name" style="padding: 2px 0 0 2px;">
<?php echo $data[$key]['IP'] ?>
</td>
<tr>
<td class="counter-name" style="padding: 0 0 8px 2px">
[<?php echo $data[$key]['TPL'] ?>] <?php print _('template');?>
</td>
</tr>
<tr>
<td class="chart1" style="padding: 0 0 0 2px">
<?php print _('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
<tr>
<td class="chart1" style="padding: 0 0 0 2px"><?php print _('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
</div>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name" width="110"><?php print _('SSL Support');?>:</td>
<td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
</tr>
<tr>
<td class="counter-name"><?php print _('SSL Home Directory');?>:</td>
<td class="counter-value"><?php echo $ssl_home ?></td>
</tr>
<tr>
<td class="counter-name"><?php print _('Nginx Support');?>:</td>
<td class="counter-value"><?php echo $nginx_support ?></td>
</tr>
<tr>
<td class="counter-name"><?php print _('Nginx Extentions');?>:</td>
<td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="240">
<table>
<tr>
<td class="counter-name"><?php print _('Statistics');?>: </td>
<td class="counter-value"> <?php echo $web_stats ?></td>
</tr>
<tr>
<td class="counter-name"> <?php print _('Additional FTP Account');?>:</td>
<td class="counter-value"> <?php echo $ftp_user ?></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
</form>
<table class="data-count">
<tr>
<td width="160px">
<td>
<?php
if ( $i == 1) {
echo _('one domain');
} else {
echo _('%s domains',$i);
}
?>
</td>
</tr>
</table>
</div>