Ejemplo n.º 1
0
#設定ファイルインクルード
require_once('./config.php');
//----------------------------------------------------------------------
//  ログイン処理 (START)
//----------------------------------------------------------------------
session_start();
authAdmin($userid,$password);
//----------------------------------------------------------------------
//  ログイン処理 (END)
//----------------------------------------------------------------------

//----------------------------------------------------------------------
//  データ保存用ファイル、画像保存ディレクトリのパーミッションチェック (START)
//----------------------------------------------------------------------
$messe = permissionCheck($file_path,$img_updir,$perm_check01,$perm_check02,$perm_check03);
//----------------------------------------------------------------------
//  データ保存用ファイルのパーミッションチェック (END)
//----------------------------------------------------------------------

//モードを取得
$mode = '';
if(!empty($_GET['mode'])){
	$mode = h($_GET['mode']);
}
//ページャーセット
$pager = pagerOut(file($file_path),$pagelengthAdmin,$pagerDispLength);

//----------------------------------------------------------------------
//  書き込み・編集処理 (START)
//----------------------------------------------------------------------
Ejemplo n.º 2
0
<?php

require "../system/config/root.php";
include '../system/global/session.inc';
include '../system/global/permissionCheck.php';
permissionCheck(1);
if (!(isset($_FILES["file"]) || $_POST['paper_id'] == null)) {
    echo "<script>alert('非法参数');window.location.href='../index.php'; </script>";
    exit;
}
if ($_FILES["file"]["error"] > 0) {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    return;
}
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 />";
if (file_exists("../upload/" . $_FILES["file"]["name"])) {
    echo $_FILES["file"]["name"] . " already exists. \n";
    return;
}
// 存储文件路径
$username = $_SESSION["wt_username"];
$uid = $_SESSION['wt_id'];
$dateStr = $dateStr = date("Y-m-d-H-i-s", time());
$path = "../upload/";
$newFileLoc = $path . "_" . $dateStr . "_" . $username . "_" . $_FILES["file"]["name"];
move_uploaded_file($_FILES["file"]["tmp_name"], $newFileLoc);
echo "Stored in: " . $newFileLoc . "\n";
//检查论文是否正确
Ejemplo n.º 3
0
<?php

include "../system/config/root.php";
include '../system/global/header.inc';
include '../system/global/session.inc';
include '../system/global/navbar.inc';
include '../system/global/permissionCheck.php';
echo "<link href='/paperevalu/static/css/tutorRemark.css' rel='stylesheet' />";
// function gettoken() {
permissionCheck(3);
if ($_GET['paper_id'] != null) {
    $papersql = "select * from wt_paper,wt_major where wt_paper.paper_id = " . $_GET['paper_id'] . " and wt_paper.tutor_uid = " . $_SESSION['wt_id'] . " and wt_major.major_id = wt_paper.paper_major and paper_step = 10";
    $paperres = $mysqli->query($papersql);
    if ($paperres->num_rows == 0) {
        echo "<script>alert('未找到论文');window.location.href='../index.php'; </script>";
        exit;
    }
    $paperres->data_seek(0);
    $paperdata = $paperres->fetch_assoc();
    $paperres->free();
    if ($paperdata['paper_step'] != 10) {
        echo "<script>alert('该论文已添加意见');window.location.href='../index.php'; </script>";
        exit;
    }
    $stusql = "select * from wt_users where uid = " . $paperdata['uid'];
    $stures = $mysqli->query($stusql);
    if ($stures->num_rows == 0) {
        echo "<script>alert('未找到学生');window.location.href='../index.php'; </script>";
        exit;
    }
    $stures->data_seek(0);
Ejemplo n.º 4
0
function transitionNextStep()
{
    if (installerStep() === STEP_PHP_REQUIREMENTS) {
        if (phpRequirementsMet()) {
            installerStepSet(nextStep(STEP_PHP_REQUIREMENTS));
        }
    } else {
        if (installerStep() === STEP_DB_CONFIG) {
            if (dbConfigValid()) {
                installerStepSet(nextStep(STEP_DB_CONFIG));
            }
        } else {
            if (installerStep() === STEP_DB_REQUIREMENTS) {
                if (dbRequirementsMet()) {
                    installerStepSet(nextStep(STEP_DB_REQUIREMENTS));
                }
            } else {
                if (installerStep() === STEP_CONFIG) {
                    if (configCheck()) {
                        installerStepSet(nextStep(STEP_CONFIG));
                    }
                } else {
                    if (installerStep() === STEP_PERMISSION) {
                        if (permissionCheck()) {
                            if (!is_writable(dirname(INSTALL_LOCK_FILE))) {
                                userMessage('error', "Insufficient permission for lockfile " . INSTALL_LOCK_FILE);
                            } else {
                                installerStepSet(nextStep(STEP_PERMISSION));
                            }
                        }
                    } else {
                        if (installerStep() === STEP_WRITE) {
                            installerStepSet(nextStep(STEP_WRITE));
                            setLock();
                        }
                    }
                }
            }
        }
    }
}
Ejemplo n.º 5
0
<?php

include "../system/config/root.php";
include '../system/global/header.inc';
include '../system/global/session.inc';
include '../system/global/navbar.inc';
include '../system/global/permissionCheck.php';
echo "<link href='/paperevalu/static/css/academyRemark.css' rel='stylesheet' />";
// function gettoken() {
permissionCheck(2);
if ($_GET['paper_id'] != null) {
    $papersql = "select * from wt_paper,wt_major where wt_paper.paper_id = " . $_GET['paper_id'] . " and wt_major.major_id = wt_paper.paper_major and wt_paper.paper_step = 20";
    $paperres = $mysqli->query($papersql);
    if ($paperres->num_rows == 0) {
        echo "<script>alert('未找到论文');window.location.href='../index.php'; </script>";
        exit;
    }
    $paperres->data_seek(0);
    $paperdata = $paperres->fetch_assoc();
    $paperres->free();
    if ($paperdata['paper_step'] != 20) {
        echo "<script>alert('该论文未处于学院审核阶段');window.location.href='../index.php'; </script>";
        exit;
    }
    $stusql = "select * from wt_users where uid = " . $paperdata['uid'];
    $stures = $mysqli->query($stusql);
    if ($stures->num_rows == 0) {
        echo "<script>alert('未找到学生');window.location.href='../index.php'; </script>";
        exit;
    }
    $stures->data_seek(0);
Ejemplo n.º 6
0
include "processing/header.php";
?>
	<div id="body">
		<div class="content">
			<form name="upload_form" enctype="multipart/form-data" method="post" onsubmit="return validateForm()" action="processing/upload_process.php" >
				<table id="login_table">
					<tr>
						<?php 
if (isset($_GET['upload']) && $_GET['upload'] == 'yes') {
    echo '<b><p style="color:green">your file was uploaded successfully</p></b>';
} else {
    if (isset($_GET['error']) && $_GET['error'] == 'yes') {
        echo '<b><p style="color:red">An Error occured while uploading file</p></b>';
    }
}
permissionCheck();
?>
					</tr>
					<tr>
						<td>
							intentded year
						</td>
						<td>
							<select name="year" id="yearselect" onchange="selectcourse();">
								<option value="0"></option>
								<option value="1">1st Year</option>
								<option value="2">2nd Year</option>
								<option value="3">3rd Year</option>
								<option value="4">4th Year</option>
							</select>
						</td>