PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/productjuly1video/champdoms.click/admin-panel/pages/edit-video-ad/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/productjuly1video/champdoms.click/admin-panel/pages/edit-video-ad/content.html

<?php 
$page = 'video';
$page_link = 'Hosted video file, e.g (http://site.com/video.mp4)';
if (empty($_GET['id'])) {
	header("Location: " .  PT_LoadAdminLink(''));
	exit();
}
$id = PT_Secure($_GET['id']);
$get_ad = $db->where('id', $id)->getOne(T_VIDEO_ADS);
if (empty($get_ad)) {
	header("Location: " .  PT_LoadAdminLink(''));
	exit();
}
$link = $get_ad->ad_media;
if (!empty($get_ad->ad_image)) {
	$page_link = 'Image link, e.g (http://site.com/image.png)';
	$link = $get_ad->ad_image;
    $page = 'image';
}
if (!empty($get_ad->vast_xml_link)) {
	$page_link = 'XML link, e.g (http://yourdomain.com/vast.xml)';
	$link = $get_ad->vast_xml_link;
    $page = 'vast';
}
?>
<div class="container-fluid">
    <div class="block-header">
        <h2>Advertisement > Manage Video Ads > Edit Ad</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-8 col-md-8">
            <div class="card">
                <div class="header">
                    <h2>Edit: <?php echo $get_ad->name ?></h2>
                </div>
                <div class="body">
                    <div class="alert alert-success ads-settings-alert"></div>
                    <form class="ads-settings" method="POST">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="name" name="name" class="form-control" value="<?php echo $get_ad->name ?>">
                                <label class="form-label">Name</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="link" name="link" class="form-control" value="<?php echo $link ?>">
                                <label class="form-label"><?php echo $page_link ?></label>
                            </div>
                        </div>
                        <?php if ($page != 'vast') { ?>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="ad_link" name="ad_link" class="form-control" value="<?php echo $get_ad->ad_link ?>">
                                <label class="form-label">URL redirect the user to this link after clicking on the ad</label>
                            </div>
                        </div>
                        <?php } ?>
                        
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="skip_seconds" name="skip_seconds" class="form-control" value="<?php echo $get_ad->skip_seconds ?>">
                                <label class="form-label">Skip Ad Seconds (0 = disabled)</label>
                            </div>
                        </div>
                        <?php if (!empty($get_ad->vast_xml_link)) { ?>
                        <label for="vast_type">Type</label>
                        <div class="form-group">
                            <input type="radio" name="vast_type" id="vast_type-enabled" value="vast" <?php echo ($get_ad->vast_type == 'vast') ? 'checked' : '' ?>>
                            <label for="vast_type-enabled">Vast</label>
                            <input type="radio" name="vast_type" id="vast_type-disabled" value="vpaid" <?php echo ($get_ad->vast_type == 'vpaid') ? 'checked' : '' ?>>
                            <label for="vast_type-disabled" class="m-l-20">VPaid</label>
                        </div>
                        <?php } ?>
                        <input type="hidden" value="<?php echo $page ?>" name="type">
                        <input type="hidden" value="<?php echo $get_ad->id ?>" name="id">
                        <button type="submit" class="btn btn-primary m-t-15 waves-effect">Save</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function() {
    var form_ads_settings = $('form.ads-settings');
    form_ads_settings.ajaxForm({
        url: '{{LINK aj/ap/edit-ads}}',
        beforeSend: function() {
            form_ads_settings.find('button').text("{{LANG please_wait}}");
        },
        success: function(data) {
            if (data.status == 200) {
            	$('.ads-settings-alert').html('<i class="fa fa-check"></i> Ad successfully updated');
            	setTimeout(function () {
            		$('.ads-settings-alert').empty();
            		window.location.href = '{{LINK admin-cp/manage-video-ads}}';
            	}, 2000);
            } else {
            	alert(data.error);
            }
            form_ads_settings.find('button').text('Save');
        }
    });
});
</script>