<?php
/*
* Script name: Points4Prize
* Author: Soft Projects
* Date created: 15/07/2015
*/
include "common.php";
head();
if (isset($_POST['update'])) {
$ads = $_POST['code'];
$myfile = fopen("../inc/ads250.php", "w") or die("Unable to open file!");
fwrite($myfile, $ads);
fclose($myfile);
$_SESSION['message_settings'] = "The ads has been updated.";
header("Location: ads.php");
}
?>
<div class="body content rows scroll-y">
<!-- Page header -->
<div class="page-heading">
<h1>
Ads
</h1>
</div>
<!-- End page header -->
<!-- Begin info box -->
<div class="row">
<div class="col-md-12">
<div class="box-info">
<h2>
Ads
</h2>
<form class="form-horizontal" method="POST">
<div class="panel-body">
<div class="row">
<?php
if (@$_SESSION['message_settings'] != ''){
?>
<div class="alert alert-success"><?php echo $_SESSION['message_settings']; ?></div>
<?php
$_SESSION['message_settings'] = '';
}
?>
<div class="col-md-12">
HTML/JAVASCRIPT code
<br />
Size: 250x250px
<br />
<br />
<div class="form-group">
<div class="col-md-12">
<textarea class="form-control" style="height:200px;" name="code"><?php
$file_get_contents = file_get_contents("../inc/ads250.php");
echo $file_get_contents; ?></textarea>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<div class="input-group">
<input type="submit" class="btn btn-success" name="update" value="Update" />
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php footer(); ?>
</div>
</div>
</div>