Example #1
0
<?php

require_once "functions.php";
style_top("Compiler Stats");
$amxx = $sql->fetchall("amxxversions");
$sm = $sql->fetchall("smversions");
$successamxx = $failureamxx = $successsm = $failuresm = 0;
for ($count = 0; $count < count($amxx); $count++) {
    $successamxx += $amxx[$count]['Success'];
    $failureamxx += $amxx[$count]['Failure'];
}
for ($count = 0; $count < count($sm); $count++) {
    $successsm += $sm[$count]['Success'];
    $failuresm += $sm[$count]['Failure'];
}
?>
<center>
<table>
<tr><th colspan="3">AMXModX Stats</th></tr>
<tr><th>Version</th><th>Success</th><th>Failed</th></tr>
<?php 
for ($count = 0; $count < count($amxx); $count++) {
    echo "<tr><td>" . $amxx[$count]['Name'] . "</td><td align=\"right\">" . $amxx[$count]['Success'] . "</td><td align=\"right\">" . $amxx[$count]['Failure'] . "</td></tr>";
}
?>
<tr><td>Total</td><td align="right"><?php 
echo $successamxx;
?>
</td><td align="right"><?php 
echo $failureamxx;
?>
<?php

require_once "functions.php";
style_top("Installation Process");
switch (@$_POST['s']) {
    default:
    case 1:
        echo "Install - Step 1<br/>\n\t\tDisplaying configuration details from the include/config.php file<br/>\n\t\t<br/>\n\t\t<br/>\n\t\t<b>General Settings</b><br/>\n\t\t<br/>\n\t\tWeb Settings Key: <i>**masked**</i><br/>\n\t\tDatabase Type: ";
        switch ($db_type) {
            case "sqlite":
                echo "<i>SQLite</i>";
                break;
            case "mysql":
                echo "<i>MySQL</i>";
                break;
            default:
                echo "<span class=\"error\">Unknown Database Type, valid options are 'sqlite', 'mysql', or 'dynamodb'</span>";
        }
        echo "<br/>\n\t\tAMXModX Compiler Path: <i>";
        if (is_dir($general['amxxcomp'])) {
            echo $general['amxxcomp'];
        } else {
            echo $general['amxxcomp'] . " <span class=\"error\">**DIR NOT FOUND**</span>";
        }
        echo "</i><br/>\n\t\tSourceMod Compiler Path: <i>";
        if (is_dir($general['smcomp'])) {
            echo $general['smcomp'];
        } else {
            echo $general['smcomp'] . " <span class=\"error\">**DIR NOT FOUND**</span>";
        }
        echo "</i><br/>\n\t\tCompiled Files Storage Path: <i>";
Example #3
0
<?php

require_once "functions.php";
style_top("Welcome to the HLX Pawn Web Compiler");
?>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License and the source code can be found <a href="https://github.com/yamikaitou/HLX-Pawn-Web-Compiler">here</a>.</p>
<p>Please report any bugs or issues you encounter on the GitHub page linked above. This helps track them and allow us to fix them quickly.</p>
<?php 
style_bot();
<?php

require_once "functions.php";
style_top("AMXX Compiler");
$amxx = $sql->fetchall("amxxversions", "ORDER BY `Display`");
$validated = TRUE;
$row = 0;
if (isset($_POST['compile'])) {
    if ($_FILES['file']['error'] == UPLOAD_ERR_OK) {
        if (!in_array(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION), array('sma', 'zip', 'gz'))) {
            echo "<div class=\"error\">Unable to proceed, invalid file type</div>";
            $validated = FALSE;
        }
    } else {
        if ($_FILES['file']['error'] == UPLOAD_ERR_NO_FILE) {
            if ($_POST['boxname'] == "") {
                echo "<div class=\"error\">Unable to proceed, Plugin File Name missing</div>";
                $validated = FALSE;
            }
            if ($_POST['boxcode'] == "") {
                echo "<div class=\"error\">Unable to proceed, Plugin Code missing</div>";
                $validated = FALSE;
            }
        } else {
            switch ($_FILES['file']['error']) {
                case UPLOAD_ERR_INI_SIZE:
                case UPLOAD_ERR_FORM_SIZE:
                    echo "<div class=\"error\">Unable to proceed, File Size Limit Exceeded</div>";
                    $validated = FALSE;
                    break;
                case UPLOAD_ERR_NO_TMP_DIR: