示例#1
0
 function TemplateReplace($content, $bodycontent, $template_path, $useraccount, $packageinfo, $quotainfo, $permissionset, $personalinfo)
 {
     include 'conf/zcnf.php';
     include 'lang/' . GetSystemOption('zpanel_lang') . '.php';
     $fileContents = str_replace('{{usage:domains}}', GetQuotaUsages('domains', $useraccount['ac_id_pk']), $content);
     $fileContents = str_replace('{{usage:subdomains}}', GetQuotaUsages('subdomains', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:parkeddomains}}', GetQuotaUsages('parkeddomains', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:mailboxes}}', GetQuotaUsages('mailboxes', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:forwarders}}', GetQuotaUsages('forwarders', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:distlists}}', GetQuotaUsages('distlists', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:ftpaccounts}}', GetQuotaUsages('ftpaccounts', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:mysql}}', GetQuotaUsages('mysql', $useraccount['ac_id_pk']), $fileContents);
     $fileContents = str_replace('{{usage:diskspace}}', FormatFileSize(GetQuotaUsages('diskspace', $useraccount['ac_id_pk'])), $fileContents);
     $fileContents = str_replace('{{usage:bandwidth}}', FormatFileSize(GetQuotaUsages('bandwidth', $useraccount['ac_id_pk'])), $fileContents);
     $fileContents = str_replace('{{quota:domains}}', $quotainfo['qt_domains_in'], $fileContents);
     $fileContents = str_replace('{{quota:subdomains}}', $quotainfo['qt_subdomains_in'], $fileContents);
     $fileContents = str_replace('{{quota:parkeddomains}}', $quotainfo['qt_parkeddomains_in'], $fileContents);
     $fileContents = str_replace('{{quota:mailboxes}}', $quotainfo['qt_mailboxes_in'], $fileContents);
     $fileContents = str_replace('{{quota:forwarders}}', $quotainfo['qt_fowarders_in'], $fileContents);
     $fileContents = str_replace('{{quota:distlists}}', $quotainfo['qt_distlists_in'], $fileContents);
     $fileContents = str_replace('{{quota:ftpaccounts}}', $quotainfo['qt_ftpaccounts_in'], $fileContents);
     $fileContents = str_replace('{{quota:mysql}}', $quotainfo['qt_mysql_in'], $fileContents);
     $fileContents = str_replace('{{quota:diskspace}}', FormatFileSize($quotainfo['qt_diskspace_bi']), $fileContents);
     $fileContents = str_replace('{{quota:bandwidth}}', FormatFileSize($quotainfo['qt_bandwidth_bi']), $fileContents);
     $fileContents = str_replace('{{progbar:diskspace}}', "<img src=\"inc/zProgressBar.php?used=" . GetQuotaUsages('diskspace', $useraccount['ac_id_pk']) . "&total=" . $quotainfo['qt_diskspace_bi'] . "\">", $fileContents);
     $fileContents = str_replace('{{progbar:bandwidth}}', "<img src=\"inc/zProgressBar.php?used=" . GetQuotaUsages('bandwidth', $useraccount['ac_id_pk']) . "&total=" . $quotainfo['qt_bandwidth_bi'] . "\">", $fileContents);
     $fileContents = str_replace('{{server:company}}', GetSystemOption('sever_company'), $fileContents);
     $fileContents = str_replace('{{server:serverip}}', $_SERVER['SERVER_ADDR'], $fileContents);
     $fileContents = str_replace('{{server:userip}}', $_SERVER['REMOTE_ADDR'], $fileContents);
     $fileContents = str_replace('{{server:uptime}}', GetServerUptime(), $fileContents);
     $fileContents = str_replace('{{server:verapache}}', ShowApacheVersion(), $fileContents);
     $fileContents = str_replace('{{server:verphp}}', ShowPHPVersion(), $fileContents);
     $fileContents = str_replace('{{server:verkernal}}', ShowKernelVersion(ShowServerPlatform()), $fileContents);
     $fileContents = str_replace('{{server:vermysql}}', ShowMySQLVersion(), $fileContents);
     $fileContents = str_replace('{{server:veros}}', ShowServerPlatform(), $fileContents);
     $fileContents = str_replace('{{server:osname}}', ShowServerOSName(), $fileContents);
     $fileContents = str_replace('{{server:oslogo}}', "<img src=\"lib/emblems/os_icons/" . ShowServerOSName() . ".png\" title=\"This server is running " . ShowServerOSName() . "\">", $fileContents);
     $fileContents = str_replace('{{server:verzpanel}}', GetSystemOption('zpanel_version'), $fileContents);
     $fileContents = str_replace('{{link:home}}', "<a href=\"./\">" . $lang['215'] . "</a>", $fileContents);
     $fileContents = str_replace('{{link:logout}}', "<a href=\"./login.php?logout\">" . $lang['216'] . "</a>", $fileContents);
     $fileContents = str_replace('{{zp:templatepath}}', $template_path, $fileContents);
     $fileContents = str_replace('{{account:username}}', $useraccount['ac_user_vc'], $fileContents);
     $fileContents = str_replace('{{account:email}}', $personalinfo['ap_email_vc'], $fileContents);
     $fileContents = str_replace('{{account:created}}', date(GetSystemOption('zpanel_df'), $useraccount['ac_created_ts']), $fileContents);
     $fileContents = str_replace('{{account:fullname}}', $personalinfo['ap_fullname_vc'], $fileContents);
     $fileContents = str_replace('{{package:name}}', $packageinfo['pk_name_vc'], $fileContents);
     $fileContents = str_replace('{{account:type}}', ShowAccountType($permissionset), $fileContents);
     $fileContents = str_replace('{{zp:content}}', $bodycontent, $fileContents);
     return $fileContents;
 }
示例#2
0
        ?>
            </table>
            <input type="hidden" name="inReturn" value="<?php 
        echo GetFullURL();
        ?>
" /><input type="hidden" name="inAction" value="delete_mailbox" />
        </form>
        <?php 
    } else {
        echo $lang['178'];
    }
    if ($quotainfo['qt_mailboxes_in'] > GetQuotaUsages('mailboxes', $useraccount['ac_id_pk']) && !isset($_GET['reset'])) {
        echo "<br><h2>" . $lang['177'] . "</h2>";
        ?>
                            <?php 
        if (GetQuotaUsages('domains', $useraccount['ac_id_pk']) > 0) {
            ?>
            <form id="frmNewMailbox" name="frmNewMailbox" method="post" action="runner.php?load=obj_mail">
                <table class="zform">
                    <tr>
                        <th><?php 
            echo $lang['14'];
            ?>
</th>
                        <td><input name="inAddress" type="text" id="inAddress" />
                            <select name="inDomain" id="inDomain">
                                <option value="" selected="selected">-- <?php 
            echo $lang['29'];
            ?>
 --</option>
            <?php 
示例#3
0
" /></td>
                </tr>
            <?php 
    } while ($rowmysql = mysql_fetch_assoc($listmysql));
    ?>
        </table>
        <input type="hidden" name="inReturn" value="<?php 
    echo GetFullURL();
    ?>
" /><input type="hidden" name="inAction" value="delete" />
    </form>
    <?php 
} else {
    echo $lang['132'];
}
if ($quotainfo['qt_mysql_in'] > GetQuotaUsages('mysql', $useraccount['ac_id_pk'])) {
    echo "<br><h2>" . $lang['133'] . "</h2>";
    ?>
    <form id="frmNewCron" name="frmNewCron" method="post" action="runner.php?load=obj_mysql">
        <table class="zform">
            <tr>
                <th><?php 
    echo $lang['136'];
    ?>
:</th>
                <td><?php 
    echo $useraccount['ac_user_vc'];
    ?>
_<input name="inDatabase" type="text" id="inDatabase" size="30" /></td>
            </tr>
            <tr>
示例#4
0
" /></td>
                </tr>
    <?php 
    } while ($rowdomains = mysql_fetch_assoc($listdomains));
    ?>
        </table>
        <input type="hidden" name="inReturn" value="<?php 
    echo GetFullURL();
    ?>
" /><input type="hidden" name="inAction" value="delete" />
    </form>
    <?php 
} else {
    echo $lang['168'];
}
if ($quotainfo['qt_parkeddomains_in'] > GetQuotaUsages('parkeddomains', $useraccount['ac_id_pk'])) {
    echo "<br><h2>" . $lang['167'] . "</h2>";
    ?>
    <form id="frmNewParkedDomain" name="frmNewParkedDomain" method="post" action="runner.php?load=obj_vhosts">
        <table class="zform">
            <tr>
                <th><?php 
    echo $lang['161'];
    ?>
:</th>
                <td><input name="inDomain" type="text" id="inDomain" size="30" /></td>
            </tr>
            <tr>
                <th colspan="2" align="right"><input type="hidden" name="inReturn" value="<?php 
    echo GetFullURL();
    ?>
示例#5
0
" /></td>
                </tr>
            <?php 
    } while ($rowftpaccounts = mysql_fetch_assoc($listftpaccounts));
    ?>
        </table>
        <input type="hidden" name="inReturn" value="<?php 
    echo GetFullURL();
    ?>
" /><input type="hidden" name="inAction" value="delete" />
    </form>
    <?php 
} else {
    echo $lang['207'];
}
if ($quotainfo['qt_ftpaccounts_in'] > GetQuotaUsages('ftpaccounts', $useraccount['ac_id_pk']) && !isset($_GET['reset'])) {
    echo "<br><h2>" . $lang['206'] . "</h2>";
    ?>
    <form id="frmNewFTPAccount" name="frmNewFTPAccount" method="post" action="runner.php?load=obj_ftpaccounts">
        <table class="zform">
            <tr>
                <th><?php 
    echo $lang['109'];
    ?>
:</th>
                <td><input name="inUsername" type="text" id="inUsername" size="30" /></td>
            </tr>
            <tr>
                <th><?php 
    echo $lang['116'];
    ?>
示例#6
0
        ?>
                <tr>
                    <td><?php 
        echo Cleaner('o', $rowclients['ac_user_vc']);
        ?>
</td>
                    <td><?php 
        echo $package['pk_name_vc'];
        ?>
</td>
                    <td><?php 
        echo FormatFileSize(GetQuotaUsages('diskspace', $rowclients['ac_id_pk']));
        ?>
</td>
                    <td><?php 
        echo FormatFileSize(GetQuotaUsages('bandwidth', $rowclients['ac_id_pk']));
        ?>
</td>
                    <td><input type="submit" name="inEdit_<?php 
        echo $rowclients['ac_id_pk'];
        ?>
" id="inEdit_<?php 
        echo $rowclients['ac_id_pk'];
        ?>
" value="<?php 
        echo $lang['85'];
        ?>
" />

                        <?php 
        if ($rowclients['ac_id_pk'] != 2) {
示例#7
0
                <td style="background-image:none; border:none"><?php 
echo "<h2>" . $lang['8'] . "</h2><img src=\"inc/zPieGraphSmall.php?used=" . GetQuotaUsages('ftpaccounts', $useraccount['ac_id_pk']) . "&quota=" . $quotainfo['qt_ftpaccounts_in'] . "\" alt=\"Disk usage pie graph\">";
?>
                </td>
                <td style="background-image:none; border:none"><?php 
echo "<h2>" . $lang['9'] . "</h2><img src=\"inc/zPieGraphSmall.php?used=" . GetQuotaUsages('mysql', $useraccount['ac_id_pk']) . "&quota=" . $quotainfo['qt_mysql_in'] . "\" alt=\"Disk usage pie graph\">";
?>
                </td>
            </tr>

            <tr>
                <td style="background-image:none; border:none"><?php 
echo "<h2>" . $lang['10'] . "</h2><img src=\"inc/zPieGraphSmall.php?used=" . GetQuotaUsages('mailboxes', $useraccount['ac_id_pk']) . "&quota=" . $quotainfo['qt_mailboxes_in'] . "\" alt=\"Disk usage pie graph\">";
?>
                </td>
                <td style="background-image:none; border:none"><?php 
echo "<h2>" . $lang['11'] . "</h2><img src=\"inc/zPieGraphSmall.php?used=" . GetQuotaUsages('forwarders', $useraccount['ac_id_pk']) . "&quota=" . $quotainfo['qt_fowarders_in'] . "\" alt=\"Disk usage pie graph\">";
?>
                </td>
                <td style="background-image:none; border:none"><?php 
echo "<h2>" . $lang['12'] . "</h2><img src=\"inc/zPieGraphSmall.php?used=" . GetQuotaUsages('distlists', $useraccount['ac_id_pk']) . "&quota=" . $quotainfo['qt_distlists_in'] . "\" alt=\"Disk usage pie graph\">";
?>
                </td>
            </tr>
        </table>

    </td>
</tr>

</table>