403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/banners/domains/stagemag/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/banners/domains/stagemag/programedit-titlepagenew.php
<?php
include 'header.php';
set_time_limit(600);

$programid = resolve_programid();
require_program_access($programid, $getuser);
$imagepath = '/home/banners/domains/stagemag/temp';
?>

<div id="content">
  <div id="content-header">
    <h2>&nbsp;Edit Program</h2>
  </div>
  <div class="container-fluid">

<?php
// Handle crop callback
if (isset($_GET['crop'])) {
    $crop     = $_GET['crop'];
    $filename = $_GET['filename'] ?? $crop;

    $stmt = db_read()->prepare("SELECT id FROM stagemag.productions WHERE image = ?");
    $stmt->execute([$crop]);
    $getprogram = $stmt->fetch();

    copy($imagepath . '/1000-' . strtolower($filename), $imagepath . '/' . $crop);
    copy($imagepath . '/1000-' . strtolower($filename), $imagepath . '/nd' . $crop);

    s3_upload($imagepath . '/' . $crop, 'stagemag/' . $crop);
    @unlink($imagepath . '/' . $crop);
    s3_upload($imagepath . '/nd' . $crop, 'stagemag/nd' . $crop);
    @unlink($imagepath . '/nd' . $crop);

    header('Location: https://stagemag.broadwayworld.com/programedit-titlepagenew.php?programid=' . $getprogram['id']);
    exit;
}

// Copyright check
if (isset($_POST['copyright']) && $_POST['copyright'] !== 'On') {
    echo 'Error, you must agree to the copyright conditions to use this service. <A HREF="javascript:history.back()">Go back</A>';
    echo '</div><br><br><br><br>';
    include 'footer.php';
    exit;
}

// Save
if (isset($_GET['editsaveclient'])) {
    $editsaveclient = intval($_GET['editsaveclient']);

    $logotype       = $_POST['logotype'] ?? 'Regular - White';
    $signuppromo    = intval($_POST['signuppromo'] ?? 0);
    $signuppromotext= $_POST['signuppromotext'] ?? '';
    $titlepage      = $_POST['titlepage'] ?? '';
    $bghex          = $_POST['bghex'] ?? '';
    $headerhex      = $_POST['headerhex'] ?? '';

    $stmt = db_write()->prepare("UPDATE stagemag.productions SET logotype = ?, signuppromo = ?, signuppromotext = ?, titlepage = ?, bghex = ?, headerhex = ? WHERE id = ?");
    $stmt->execute([$logotype, $signuppromo, $signuppromotext, $titlepage, $bghex, $headerhex, $editsaveclient]);

    // Photo upload
    $uploadExt = isset($_FILES['photo']) ? validate_image_upload($_FILES['photo']) : null;
    if (isset($_FILES['photo']) && $_FILES['photo']['error'] === UPLOAD_ERR_OK && $_FILES['photo']['name'] !== '' && $uploadExt === null) {
        echo '<h3>Error uploading image. Only JPEG, PNG, or WEBP are accepted.<br><a href="javascript:history.back()">Go back</a></h3>';
        exit;
    }
    if ($uploadExt !== null) {
        $ext = $uploadExt;
        $photo = 'a' . uniqid() . '-' . bin2hex(random_bytes(4)) . '.' . $ext;
        move_uploaded_file($_FILES['photo']['tmp_name'], $imagepath . '/' . $photo);

        // Convert PNG to JPG
        if (strpos($photo, '.png') !== false) {
            $anphoto = preg_replace('/\.png$/i', '.jpg', $photo);
            $img = imagecreatefrompng($imagepath . '/' . $photo);
            imagejpeg($img, $imagepath . '/b' . $anphoto, 100);
            imagedestroy($img);
            rename($imagepath . '/b' . $anphoto, $imagepath . '/' . $anphoto);
            $photo = $anphoto;
        }

        $imgSize = getimagesize($imagepath . '/' . $photo);
        $width  = $imgSize[0];
        $height = $imgSize[1];

        // Resize thumbnail
        try {
            graphicsmagick('ResizeWidth', $imagepath . '/' . $photo, $imagepath . '/nda' . $photo, ['width' => 300, 'quality' => 100]);
        } catch (Exception $e) {
            copy($imagepath . '/' . $photo, $imagepath . '/nda' . $photo);
        }

        // Resize if too small
        if (($height < 1000 || $width < 1000) && strpos($photo, 'gif') === false) {
            graphicsmagick('ResizeHeight', $imagepath . '/' . $photo, $imagepath . '/' . $photo, ['height' => 1000, 'filter' => 'Catrom', 'quality' => 100]);
            $imgSize = getimagesize($imagepath . '/' . $photo);
            $height = $imgSize[1]; $width = $imgSize[0];
        }

        $stmt = db_write()->prepare("UPDATE stagemag.productions SET image = ?, imageheight = ?, imagewidth = ? WHERE id = ?");
        $stmt->execute([$photo, $height, $width, $editsaveclient]);

        if (strpos($photo, '.gif') !== false) {
            copy($imagepath . '/' . $photo, $imagepath . '/1000-' . $photo);
            header('Location: https://stagemag.broadwayworld.com/programedit-titlepagenew.php?crop=' . urlencode($photo) . '&programid=' . $editsaveclient . '&filename=' . urlencode($photo));
            exit;
        } else {
            header('Location: https://stagemag.broadwayworld.com/newcrop-cover/cropper.php?img=' . urlencode('https://stagemag.broadwayworld.com/temp/' . $photo) . '&url=' . urlencode('https://stagemag.broadwayworld.com/programedit-titlepagenew.php?crop=' . $photo . '&programid=' . $editsaveclient));
            exit;
        }
    }

    header('Location: /programedit.php?programid=' . urlencode($editsaveclient));
    exit;
}

// Delete
if (isset($_GET['deleteclient'])) {
    $stmt = db_write()->prepare("DELETE FROM stagemag.productions WHERE id = ?");
    $stmt->execute([intval($_GET['deleteclient'])]);
    header('Location: /index.php');
    exit;
}

// Load production
$stmt = db_write()->prepare("SELECT * FROM stagemag.productions WHERE id = ?");
$stmt->execute([$programid]);
$geter = $stmt->fetch();
?>

<?php if ($geter['image'] !== ''): ?>
    <img src="https://cloudimages.broadwayworld.com/stagemag/<?= htmlspecialchars($geter['image']) ?>" style='max-height:100px;float:left;'>
<?php endif; ?>

<Table style="background-color:black;"><Tr>
<Td style="vertical-align:middle;padding:6px;border:4px;border-color:white;border-style:solid;">
    <a href="programedit.php?deleteclient=<?= $programid ?>" onclick="return confirm('Are you sure?')" style="color:white;">Delete Program</a>
</Td>
<Td style="vertical-align:middle;padding:6px;border:4px;border-color:white;border-style:solid;">
    <a href="programedit.php?dupe=<?= $programid ?>" style="color:white;">Dupe Program</a>
</Td>
</Tr></Table>

<div style="clear: both;"></div>
<br>

<FORM action="programedit-titlepagenew.php?editsaveclient=<?= urlencode($programid) ?>" method="post" enctype="multipart/form-data">

<Table style="max-width:600px;"><Tr><Td style="width: 50%;vertical-align: top;">
<div class="form-group">

<label class="col-md-12" style="margin-top: 10px;">Logo (Recommended 1000 pixels wide)</label>
<div class="col-md-12"><input type=file name="photo"></div>

<label class="col-md-12" style="margin-top: 10px;">Stage Mag Logo Overlay</label>
<div class="col-md-12">
    <select name="logotype">
        <option value="<?= htmlspecialchars($geter['logotype']) ?>"><?= htmlspecialchars($geter['logotype']) ?></option>
        <option value="Regular - White">Regular - White</option>
        <option value="Reverse - Black">Reverse - Black</option>
        <option value="Transparent - Black">Transparent - Black</option>
        <option value="Transparent - White">Transparent - White</option>
    </select>
</div>

<label class="col-md-12" style="margin-top: 10px;">Cover Background Color (Behind Your Image)</label>
<div class="col-md-12">
<script src="/jscolor/jscolor.js"></script>
<script>jscolor.presets.default = { format:'hex' };</script>
<input data-jscolor="{value:'<?= htmlspecialchars($geter['bghex']) ?>'}" name="bghex">
</div>

<label class="col-md-12" style="margin-top: 10px;">Header Color (used for page headers)</label>
<div class="col-md-12">
<input data-jscolor="{value:'<?= htmlspecialchars($geter['headerhex']) ?>'}" name="headerhex">
</div>

<hr>

<label class="col-md-12" style="margin-top: 10px;">Title Page<Br>
<small>Fill out your title page below, add additional theatre logos if needed & more!</small></label>
<div class="col-md-12">
    <textarea id="myarea12" name="titlepage" style="width:600px;height:300px;" required><?php if ($geter['titlepage'] === ''): ?>
        <Table style="max-width:600px;width:100%" width="100%">
            <Tr><Td colspan="3"><center><h1>Your Show</center></h1></Td></Tr>
            <Tr><Td colspan="3"></Td></Tr>
            <Tr><Td colspan="3"><center>at <?= htmlspecialchars($geter['theatre']) ?></center></Td></Tr>
            <Tr><Td colspan="3"></Td></Tr><Tr><Td colspan="3"></Td></Tr>
            <Tr><Td width="33%"><center>by<br>Credit1</center></Td><Td width="33%"><center>by<br>Credit2</center></Td><Td width="33%"><center>by<br>Credit3</center></Td></Tr>
            <Tr><Td colspan="3"></Td></Tr><Tr><Td colspan="3"><center>Starring</center></Td></Tr><Tr><Td colspan="3"></Td></Tr>
            <Tr><Td width="33%"><center>Actors<br>Actors<br>Actors</center></Td><Td width="33%"><center>Actors<br>Actors<br>Actors</center></Td><Td width="33%"><center>Actors<br>Actors<br>Actors</center></Td></Tr>
            <Tr><Td colspan="3"></Td></Tr><Tr><Td colspan="3"></Td></Tr><Tr><Td colspan="3"></Td></Tr>
        </Table>
<?php else: ?><?= $geter['titlepage'] ?><?php endif; ?></textarea>

<hr>

<div style="background-color:black;color:white;padding:10px;">
    <h2 style="color:white;">Enable Sign-Up Promo</h2>
    <label class="col-md-12" style="margin-top: 10px;">Collect Email Addresses
    <div class="col-md-12">
        <select name="signuppromo">
            <?php if ($geter['signuppromo'] == 0): ?>
                <option value="0">No</option><option value="1">Yes</option>
            <?php else: ?>
                <option value="1">Yes</option><option value="0">No</option>
            <?php endif; ?>
        </select>
    </label></div><Br>
    <label class="col-md-12" style="margin-top: 10px;">Email Promo Text</label>
    <textarea id="myarea13a" name="signuppromotext" style="width:600px;height:100px;"><?= htmlspecialchars($geter['signuppromotext']) ?></textarea>
</div>

<br>
<input type="checkbox" name="copyright" checked style="opacity:100;position:relative;left:0px;"> I certify that I have the rights to all images, trademarks and copyrights for all content and images used in this service.

<script src="/ckeditor0512z3/ckeditor.js" charset="utf-8"></script>
<script type="text/javascript" src="/ckfinder2025/ckfinder.js" charset="utf-8"></script>
<?php setcookie('folderme2', '/upload13/' . $programid . '/', 0, '/', 'stagemag.broadwayworld.com'); ?>

<script type="text/javascript">
CKEDITOR.on('dialogDefinition', function(ev) { var n=ev.data.name, d=ev.data.definition; if(n=='link') d.getContents('target').get('linkTargetType').default='_blank'; });
CKFinder.setupCKEditor(editor, '/ckfinder34/');
var editor = CKEDITOR.replace('myarea12',{ height:'500px', width:'100%' });
var editor2 = CKEDITOR.replace('myarea13',{ height:'200px', width:'100%' });
var editor3 = CKEDITOR.replace('myarea14',{ height:'200px', width:'100%' });
editor.on('instanceReady', function() { console.log(editor.filter.allowedContent); });
</script>

</div></div>

 <center>
  <br>
<input type="submit" Value="Save" class="btn btn-success btn-large" style="font:bold 18px;color:white;background-color:#b20223;" name="buttarticleman" id="cdh_update_article">
 </center>
<br>
</form>

   </div>
<!--Footer-part-->
<br><br><br><br>

<?php include 'footer.php'; ?>

Youez - 2016 - github.com/yon3zu
LinuXploit