Exemplo n.º 1
0
<div id="myCarousel" class="canvas carousel slide">
    <!-- Full Page Image Background Carousel Header -->
    
    <?php 
/****************************************************************************************************/
$all_images = ImageSlider::getAll("WHERE image_slider_status=1");
$first_image = $all_images[0]->image_slider_id;
/*************************************************************************************************************/
?>
        <!-- Indicators -->
    <ol class="carousel-indicators xtra-border">
        
    <?php 
/************************************************************************************************************/
foreach ($all_images as $image) {
    ?>
          <li data-target="#myCarousel" data-slide-to="<?php 
    echo $image->image_slider_id;
    ?>
" class="<?php 
    echo $first_image == $image->image_slider_id ? 'active' : '';
    ?>
"></li>
            
      <?php 
}
/*************************************************************************************************************/
?>
    </ol>

        <!-- Wrapper for Slides -->
Exemplo n.º 2
0
<?php

/****************************************************************************/
$image = new ImageSlider();
//object of ImageSlader class
//print_r($_FILES);
if (isset($_POST['add_image'])) {
    if (isset($_FILES['fup_image'])) {
        $image->image_slider_subtitle = $_POST['image_slider_subtitle'];
        $image->image_slider_title = $_POST['image_slider_title'];
        $image->image_slider_status = $_POST['cb_visibility'];
        $image_tmp_name = $_FILES['fup_image']['tmp_name'];
        $image_name = $_FILES['fup_image']['name'];
        move_uploaded_file($image_tmp_name, "./../img/" . $image_name);
        $image->image_slider_url = $image_name;
        $image->insert();
        echo "<div class='alert alert-success'> \n                <i><strong>Image successfully uploaded. :)</strong></i>\n           </div>";
    } else {
        echo "<div class='alert alert-danger'> \n                <i><strong>Image not uploaded!!! Incomplete data!!! Try again.</strong></i>\n            </div>";
    }
}
print_r($_SESSION);
/*****************************************************************************/
?>
<h3>Add new image</h3>
<form action="" method="POST" id="login_form" enctype="multipart/form-data" >
        <label for="subtitle">Image subtitle:</label>
        <input class="form-control" id="subtitle" name="image_slider_subtitle"  placeholder="Image subtitle">
        <br>
        <label for="title">Image title:</label>
        <input class="form-control" id="title" name="image_slider_title"  placeholder="Image title">
Exemplo n.º 3
0
if (isset($_FILES['file'])) {
    //The error validation could be done on the javascript client side.
    $errors = array();
    $file_name = $_FILES['file']['name'];
    //echo 'the file name is : '.$file_name;
    $file_size = $_FILES['file']['size'];
    $file_tmp = $_FILES['file']['tmp_name'];
    $file_type = $_FILES['file']['type'];
    $file_ext = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));
    $extensions = array("jpeg", "jpg", "png", "gif");
    if (in_array($file_ext, $extensions) === false) {
        $errors[] = "image extension not allowed, please choose a JPEG or PNG file.";
    }
    if ($file_size > 2097152) {
        $errors[] = 'File size cannot exceed 2 MB';
    }
    if (empty($errors) == true) {
        //now before uploading the picture...i need to rename it
        $uniqueFileName = Common::constructUniqueFileName($file_name, $file_ext, 'IPS', 'tbl_home_page_image_slider', 'image_id');
        move_uploaded_file($file_tmp, "image_slider/" . $uniqueFileName);
        $now = date("Y-m-d h:i:sa");
        echo $fname . " uploaded file: " . "image_slider/" . $file_name;
        //after finishing uploading...lets save this info to the database...
        $imageSlider = new ImageSlider('image_slider', $uniqueFileName, $now, $modifiedBy, $now);
        $imageSlider->save();
    } else {
        print_r($errors);
    }
} else {
    echo 'Something went wrong...';
}
Exemplo n.º 4
0
<?php

/*****************************************************************************************************/
//if clik on button change picture on admin_home.php page
if (isset($_POST['change_picture'])) {
    $text_image = ImageSlider::get($_POST['change_picture']);
    //insert object $text_image in $_SESSION['change_image'] array
    $_SESSION['change_image'] = $text_image;
    //var_dump($_SESSION);
}
/*****************************************************************************************************/
// if click on button Save on this page
if (isset($_POST['save'])) {
    $text_image = new ImageSlider();
    if (!empty($_FILES['fup_image'])) {
        move_uploaded_file($_FILES['fup_image']['tmp_name'], "./../img/" . $_FILES['fup_image']['name']);
        $text_image->image_slider_id = $_POST['image_slider_id'];
        $text_image->image_slider_url = $_FILES['fup_image']['name'];
        //when data sent from the form we must update data in $_SESSION['change_image']
        $_SESSION['change_image'] = $text_image;
        //insert updated object $text_image in  $_SESSION['change_image'] again
        $text_image->save();
        echo "<div class='alert alert-success'> \n                <i><strong>Image successfully updated. :)</strong></i>\n           </div>";
    }
    //var_dump($_SESSION);
}
/*****************************************************************************************************/
?>

     <br>
<h3>Change image</h3>
Exemplo n.º 5
0
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") {
    exit;
} else {
    $memberInfo = $member->get_info();
    $consoleObj->select($_GET['cID']);
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
include_once $prevFolder . "classes/imageslider.php";
$cID = $_GET['cID'];
$imageSliderObj = new ImageSlider($mysqli);
if ($_GET['action'] == "edit" && $imageSliderObj->select($_GET['imgID'])) {
    include "include/news/include/editimage.php";
} else {
    $addImageCID = $consoleObj->findConsoleIDByName("Add Home Page Image");
    $selectWidthUnit = $websiteInfo['hpimagewidthunit'] == "px" ? "" : " selected";
    $selectHeightUnit = $websiteInfo['hpimageheightunit'] == "px" ? "" : " selected";
    $selectDisplayStyle = $websiteInfo['hpimagetype'] == "slider" ? "" : " selected";
    echo "\n\t\t\t<div class='formDiv'>\n\t\t\t\tUse this page to manage the home page image slider.  You can attach news posts, tournaments, events or any kind of custom message that you want to the images in the image slider.\n\t\t\t\t\n\t\t\t\t<div id='errorDiv' style='display: none' class='errorDiv'>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<table class='formTable'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2' align='right'><b>&raquo;</b> <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $addImageCID . "'>Add New Image</a> <b>&laquo;</b></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2'>\n\t\t\t\t\t\t\t<div class='dottedLine' style='margin-bottom: 3px; padding-bottom: 2px'><b>Display Settings:</b></div>\n\t\t\t\t\t\t\t\tUse this section to modify the settings for home page images.<br><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Width:</td>\n\t\t\t\t\t\t<td class='main'><input type='text' id='containerwidth' value='" . $websiteInfo['hpimagewidth'] . "' class='textBox' style='width: 50px'> <select id='containerwidthunit' class='textBox'><option value='1'>px</option><!-- <option value='2'" . $selectWidthUnit . ">%</option> --></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Height:</td>\n\t\t\t\t\t\t<td class='main'><input type='text' id='containerheight' value='" . $websiteInfo['hpimageheight'] . "' class='textBox' style='width: 50px'> <select id='containerheightunit' class='textBox'><option value='1'>px</option><!-- <option value='2'" . $selectHeightUnit . ">%</option> --></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Display Style:</td>\n\t\t\t\t\t\t<td class='main'><select id='displaystyle' class='textBox'><option value='slider'>Image Slider</option><option value='random'" . $selectDisplayStyle . ">Random Images</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' align='center' colspan='2'><br>\n\t\t\t\t\t\t\t<input type='button' id='btnSaveSettings' class='submitButton' value='Save'>\n\t\t\t\t\t\t\t<div class='main' style='text-align: center; margin-top: 10px; display: none' id='saveLoading'>\n\t\t\t\t\t\t\t\tSaving...\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style='text-align: center; margin-top: 10px; display: none' id='saveSuccess' class='successFont'>\n\t\t\t\t\t\t\t\t<b>Saved!</b>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2'>\n\t\t\t\t\t\t\t<div class='dottedLine' style='margin-top: 50px; margin-bottom: 3px; padding-bottom: 2px'><b>Images:</b></div><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<table class='formTable'>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class='formTitle' style='width: 76%'>Image Name:</td>\n\t\t\t\t\t\t\t\t\t<td class='formTitle' style='width: 24%'>Actions:</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id='imageList'></div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div id='deleteMessage' style='display: none'></div>\n\t\t\t<div id='saveDump' style='display: none'></div>\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#loadingSpiral').show();\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/imagelist.php', { }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#imageList').html(data);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\$('#btnSaveSettings').click(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#errorDiv').hide();\n\t\t\t\t\t\t\$('#saveLoading').show();\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/imageslider_savesettings.php', { containerWidth: \$('#containerwidth').val(), containerHeight: \$('#containerheight').val(), containerWidthUnit: \$('#containerwidthunit').val(), containerHeightUnit: \$('#containerheightunit').val(), displayStyle: \$('#displaystyle').val() }, function(data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#saveDump').html(data);\n\t\t\t\t\t\t\t\$('#saveLoading').hide();\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfunction moveImg(intID, strDir) {\n\t\t\t\t\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\$('#imageList').fadeOut(200);\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/move_image.php', { imgID: intID, iDir: strDir }, function(data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#imageList').html(data);\n\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\$('#imageList').fadeIn(200);\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfunction deleteImg(intID) {\n\t\t\t\t\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/delete_image.php', { imgID: intID }, function(data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#deleteMessage').html(data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t\n\t\t";
}
Exemplo n.º 6
0
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/imageslider.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Home Page Images");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$imageSliderObj = new ImageSlider($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "imageslider ORDER BY ordernum DESC");
    echo "\n\t\t<table class='formTable' style='border-spacing: 0px; margin-top: 0px; margin-bottom: 20px'>\n\t\t\t<tr><td class='dottedLine' colspan='5'></td></tr>\n\t\t";
    $intHighestOrderNum = $imageSliderObj->getHighestOrderNum();
    $counter = 1;
    while ($row = $result->fetch_assoc()) {
        $dispUpArrow = $counter == 1 ? "<img src='" . $MAIN_ROOT . "images/transparent.png' class='manageListActionButton'>" : "<a href='javascript:void(0)' onclick=\"moveImg('" . $row['imageslider_id'] . "', 'up')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/uparrow.png' class='manageListActionButton'></a>";
        $dispDownArrow = $counter == $intHighestOrderNum ? "<img src='" . $MAIN_ROOT . "images/transparent.png' class='manageListActionButton'>" : "<a href='javascript:void(0)' onclick=\"moveImg('" . $row['imageslider_id'] . "', 'down')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' class='manageListActionButton'></a>";
        echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 76%; font-weight: bold'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&imgID=" . $row['imageslider_id'] . "&action=edit'>" . parseBBCode(filterText($row['name'])) . "</a></td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'>" . $dispUpArrow . "</td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'>" . $dispDownArrow . "</td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&imgID=" . $row['imageslider_id'] . "&action=edit'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' class='manageListActionButton'></a></td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'><a href='javascript:void(0)' onclick=\"deleteImg('" . $row['imageslider_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' class='manageListActionButton'></a></td>\n\t\t\t</tr>\n\t\t";
        $counter++;
    }
    echo "</table>";
    if ($result->num_rows == 0) {
Exemplo n.º 7
0
<?php

$text_image = new ImageSlider();
print_r($_FILES);
if (isset($_POST['change_picture'])) {
    $text_image = ImageSlider::get($_POST['change_picture']);
    print_r($text_image);
}
if (isset($_POST['save'])) {
    $text_image->image_slider_id = $_POST['image_slider_id'];
    //if(isset($_FILES['fup_image'])){
    move_uploaded_file($_FILES['fup_image']['tmp_name'], "./../img/" . $_FILES['fup_image']['name']);
    // }
    $text_image->image_slider_url = $_FILES['fup_image']['name'];
    $text_image->save();
    echo "<div class='alert alert-success'> \n                <i><strong>Image successfully updated. :)</strong></i>\n           </div>";
}
?>

     <br>
<h3>Change image</h3>
<br>
<img style="width: 200px; border-radius: 3px;" src="./../img/<?php 
echo $text_image->image_slider_url;
?>
"<br><br> 
<form action="" method="POST" id="login_form" enctype="multipart/form-data" >
        <label> Choose image </label>
        <input type="file" name="fup_image" required> </input>
        <br>
        
Exemplo n.º 8
0
<?php

if (isset($_POST['edit'])) {
    $text_image = ImageSlider::get($_POST['edit']);
    $_SESSION['change_text'] = $text_image;
    // print_r($_POST);
    echo '<br>';
    //print_r($_SESSION);
}
if (isset($_POST['save'])) {
    $edit_text_image = new ImageSlider();
    $edit_text_image->image_slider_id = $_POST['image_slider_id'];
    $edit_text_image->image_slider_subtitle = $_POST['image_slider_subtitle'];
    $edit_text_image->image_slider_title = $_POST['image_slider_title'];
    $edit_text_image->image_slider_status = $_POST['cb_visibility'];
    //var_dump($edit_text_image);
    //print_r($_POST);
    $edit_text_image->save();
    echo "<div class='alert alert-success'> \n                <i><strong>Text successfully updated. :)</strong></i>\n           </div>";
    $new = ImageSlider::get($_POST['image_slider_id']);
    //print_r($new);
    $_SESSION['change_text'] = $new;
    //print_r($_SESSION);
}
var_dump($_SESSION);
?>

  <img style="width: 500px; border-radius: 3px;" src="./../img/<?php 
echo $_SESSION['change_text']->image_slider_url;
?>
"> 
Exemplo n.º 9
0
<?php

$text_image = new ImageSlider();
if (isset($_POST['edit'])) {
    $text_image = ImageSlider::get($_POST['edit']);
}
if (isset($_POST['save'])) {
    $text_image->image_slider_id = $_POST['image_slider_id'];
    $text_image->image_slider_subtitle = $_POST['image_slider_subtitle'];
    $text_image->image_slider_title = $_POST['image_slider_title'];
    $text_image->image_slider_status = $_POST['cb_visibility'];
    $text_image->save();
    echo "<div class='alert alert-success'> \n                <i><strong>Text successfully updated. :)</strong></i>\n           </div>";
}
?>
  <img style="width: 200px; border-radius: 3px;" src="./../img/<?php 
echo $text_image->image_slider_url;
?>
" 
     <br><br><br>
<h3>Edit text</h3>
<br>

<form action="" method="POST" id="login_form" enctype="multipart/form-data" >
        <label for="subtitle">Image subtitle:</label>
        <input class="form-control" id="subtitle" name="image_slider_subtitle" value="<?php 
echo $text_image->image_slider_subtitle;
?>
">
        
        <br>
Exemplo n.º 10
0
    }
    $setMarqueeTickerStyle = "";
    if ($websiteInfo['newstickersize'] != 0) {
        $setNewsTickerStyle .= "; font-size: " . $websiteInfo['newstickersize'] . "px; height: " . $websiteInfo['newstickersize'] . "px;";
        $setMarqueeTickerStyle = " style ='height: " . ($websiteInfo['newstickersize'] + 5) . "px;'";
    }
    if ($websiteInfo['newstickerbold'] == 1) {
        $setNewsTickerStyle .= "; font-weight: bold;";
    }
    if ($websiteInfo['newstickeritalic'] == 1) {
        $setNewsTickerStyle .= "; font-style: italic;";
    }
    echo "\n\t\n\n\t\t\t<div id='hpNewsTicker'>\n\t\t\t\n\t\t\t\t<marquee scrollamount='3'" . $setMarqueeTickerStyle . "><div id='tickerSpan' style='" . $setNewsTickerStyle . " position: relative; margin-left: auto; margin-right: auto;'>" . $websiteInfo['newsticker'] . "</div></marquee>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t\n\t\t";
}
echo "\n\t<div id='hpImageSliderWrapper' style='text-align: center; position: relative; margin-left: auto; margin-right: auto'>\n\t\t\t";
$imageSliderObj = new ImageSlider($mysqli);
$imageSliderObj->strDisplayStyle = $websiteInfo['hpimagetype'];
$imageSliderObj->intDisplayWidth = $websiteInfo['hpimagewidth'];
$imageSliderObj->intDisplayHeight = $websiteInfo['hpimageheight'];
$imageSliderObj->strDisplayWidthUnit = $websiteInfo['hpimagewidthunit'];
$imageSliderObj->strDisplayHeightUnit = $websiteInfo['hpimageheightunit'];
$imageSliderObj->blnLoggedIn = constant('LOGGED_IN');
$imageSliderObj->strTheme = $websiteInfo['theme'];
$imageSliderObj->dispHomePageImage();
//echo "<div id='hpImageScroller'></div>";
echo "\t\n\t</div>\n\t\t\n\t";
$dispAnnouncements = "";
$dispHPNews = "";
// Get Pinned News Posts
//<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Latest News</p>
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "news WHERE (newstype = '1' OR newstype = '2') AND hpsticky = '1' ORDER BY dateposted DESC");
Exemplo n.º 11
0
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/imageslider.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$imageSliderObj = new ImageSlider($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Home Page Images");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $imageSliderObj->select($_POST['imgID'])) {
        $imageSliderInfo = $imageSliderObj->get_info_filtered();
        if (isset($_POST['confirm'])) {
            unlink("../../../../" . $imageSliderInfo['imageurl']);
            $imageSliderObj->delete();
            include "imagelist.php";
        } else {
            echo "\n\t\t\t\n\t\t\t\t<div id='confirmDeleteImage' style='display: none'>\n\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\tAre you sure you want to delete <b>" . $imageSliderInfo['name'] . "</b>?\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#confirmDeleteImage').dialog({\n\t\t\t\t\t\t\ttitle: 'Confirm Delete - Home Page Image',\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\$('#imageList').fadeOut(200);\n\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/news/include/delete_image.php', { imgID: '" . $_POST['imgID'] . "', confirm: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\$('#imageList').html(data);\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\$('#imageList').fadeIn(200);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\n\t\t\t";
        }
    }
Exemplo n.º 12
0
/*
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/imageslider.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$imageSliderObj = new ImageSlider($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Home Page Images");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $imageSliderObj->select($_POST['imgID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $imageSliderObj->move($_POST['iDir']);
        $_GET['cID'] = $cID;
        include "imagelist.php";
    } else {
        echo $_POST['imgID'];
    }
}