<?php 
//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/horizon_issueclass.php';
$a = Horizon_IssueClass::getAllHorizonIssue();
if ($a === 0) {
    die("No Issues are Inserted Yet");
} else {
    echo "<table><tr><th>id</th><th>Horizon Issue</th><th colspan='2'>Manage Detail</th></tr>";
    foreach ($a as $arr) {
        echo "<tr><td>{$arr->horizon_id}</td><td>{$arr->horizon_version}</td>\r\n        <td><a href='horizon_update_detail.php?id={$arr->horizon_id}'>update</a></td>\r\n       <td><a id='delete' href='server/horizon/horizon_delete_issue.php?id={$arr->horizon_id}'>delete</a></td></tr>";
    }
}
Exemplo n.º 2
0
<?php

//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/horizon_issueclass.php';
define('INCLUDE_CHECK', true);
if (isset($_GET['id'])) {
    $ti = $_GET['id'];
} else {
    die("First Go to horizon managemant page");
}
$b = Horizon_IssueClass::getHorizonIssueObject($ti);
if ($b === 0) {
    die("inalid horizon issue");
}
?>
<form method="post" id="updateform" enctype="multipart/form-data" action="server/horizon/horizon_update_server.php"> 
     
           <label for="id">Horizon ID<span style="color:red;">*</span>:</label>
           <input type="text" value="<?php 
echo $b->horizon_id;
?>
" name="id" class="text ui-widget-content ui-corner-all" id="id" required readonly="true" />
   
       <label for="version">Horizon Version<span style="color:red;">*</span>:</label>
       <input type="text" readonly="true" name="version" value="<?php 
echo $b->horizon_version;
?>
" class="text ui-widget-content ui-corner-all" id="version" required maxlength="40" />
      
Exemplo n.º 3
0
            die("Return Code: " . $_FILES["file"]["error"] . "<br>");
        } else {
            //  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
            // echo "Type: " . $_FILES["file"]["type"] . "<br>";
            // echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
            // echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
            $ran = gen_random_string(8);
            $filename = $version . "_" . $ran . "." . $extension;
            //  move_uploaded_file($_FILES["file"]["tmp_name"], "../../slider_images/" . $pname.".".$extension);
            //  echo "Stored in: " . "facultyImages/" . $faculty_name.".".$extension;
            //  $imageurl="slider_images/" . $pname.".".$extension;
            $manipulator = new ImageManipulator($_FILES['file']['tmp_name']);
            // resizing to 200x200
            $newImage = $manipulator->resample(206, 291);
            // saving file to uploads folder
            $manipulator->save('../../horizonImages/' . $filename);
            $imageurl = "horizonImages/" . $filename;
            if (file_exists('../../' . $object->horizon_photo_url)) {
                unlink('../../' . $object->horizon_photo_url);
            }
        }
    } else {
        die("Invalid file extension or file size grater then 2MB. ");
    }
} else {
    $imageurl = $object->horizon_photo_url;
}
$ho = new Horizon_IssueClass($id, $version, $date, $issueURL, $imageurl);
echo $ho->updateHorizonIssue();
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $id . " horizon issue updated");
$l->insertlog();
Exemplo n.º 4
0
<?php

if (!isset($_SERVER['HTTP_REFERER'])) {
    header("location: ../../access_denied.php?data=You don't have direct access to this page");
}
require_once '../../db/horizon_issueclass.php';
require_once '../../db/site_log_class.php';
require_once '../../db/user_class.php';
session_start();
if (!isset($_GET['id'])) {
    die("first go to horizon management page.");
}
$ti = $_GET['id'];
$ob = Horizon_IssueClass::getHorizonIssueObject($ti);
if (file_exists("../../" . $ob->horizon_photo_url)) {
    unlink("../../" . $ob->horizon_photo_url);
}
$a = Horizon_IssueClass::deleteHorizonIssue($ti);
$_SESSION['answer'] = $a;
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $ti . " horizon issue deleted");
$l->insertlog();
header('Location: ../../horizon_manage_detail.php');
Exemplo n.º 5
0
            $filename = $version . "_" . $ran . "." . $extension;
            if (file_exists("../../horizonImages/" . $filename)) {
                die($version . "." . $extension . " already exists. ");
            } else {
                //  move_uploaded_file($_FILES["file"]["tmp_name"], "../../slider_images/" . $pname.".".$extension);
                //  echo "Stored in: " . "facultyImages/" . $faculty_name.".".$extension;
                //  $imageurl="slider_images/" . $pname.".".$extension;
                $manipulator = new ImageManipulator($_FILES['file']['tmp_name']);
                // resizing to 200x200
                $newImage = $manipulator->resample(206, 291);
                // saving file to uploads folder
                $manipulator->save('../../horizonImages/' . $filename);
                $imageurl = "horizonImages/" . $filename;
            }
        }
    } else {
        die("Invalid file extension or file size grater then 2MB.");
    }
} else {
    die("insert photo.");
}
$ho = new Horizon_IssueClass(NULL, $version, $date, $issueURL, $imageurl);
$r = $ho->addHorizonIssue();
if ($r != 1) {
    if (file_exists('../../horizonImages/' . $filename)) {
        unlink('../../horizonImages/' . $filename);
    }
}
echo $r;
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $version . " Horizon version added");
$l->insertlog();