示例#1
0
?>
月<?php 
echo date('d', $time);
?>
日
                        </p>
                        <!-- /.input group -->
                    </div>
                    <!-- /.form group -->
                    <!-- ステータス -->
                    <div class="form-group">
                        <label>ステータス</label>

                        <p class="form-control-static">
                            <?php 
echo postStatus($data['status']);
?>
                        </p>
                    </div>
                    <div class="box-footer">
                        <div class="col-md-6 col-xs-offset-3">
                            <a class="btn btn-block btn-danger"
                               href="index.php?a=post-edit&id=<?php 
echo $data['id'];
?>
">編集する</a>
                            <!-- <button class="btn btn-block btn-success">登録する</button> -->
                        </div>
                    </div>
                </form>
            </div>
示例#2
0
}
?>
                                </select>
                                分 <br>
                                <br>
                            </div>
                        </div>
                        <!-- /.input group -->
                    </div>
                    <!-- /.form group -->
                    <!-- ステータス -->
                    <div class="form-group">
                        <label>ステータス</label>
                        <select name="status" class="form-control">
                            <?php 
foreach (postStatus() as $k => $v) {
    ?>
                                <option
                                    value="<?php 
    echo $k;
    ?>
" <?php 
    echo $k == $data['status'] ? 'selected' : '';
    ?>
><?php 
    echo $v;
    ?>
</option>
                            <?php 
}
?>
示例#3
0
/** 
 * Reply the schedule of the groups(array) to the user(tweet)
 */
function replySchedule($tweet, $groups)
{
    foreach ($groups as $group) {
        $message = getSchedule($group);
        postStatus("Under Construction", $tweet);
    }
}
示例#4
0
function uploadPhoto()
{
    $target_dir = "img/photo/";
    $target_file = $target_dir . $_SESSION['ID'] . date("Ymdhis") . basename($_FILES["fileToUpload"]["name"]);
    $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION);
    $uploadOk = 1;
    if ($_FILES["fileToUpload"]["size"] > 5000000) {
        echo "Sorry, your file is too large.";
        $uploadOk = 0;
    }
    if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif") {
        echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
        $uploadOk = 0;
    }
    // Check if $uploadOk is set to 0 by an error
    if ($uploadOk == 0) {
        echo "Sorry, your file was not uploaded.";
        // if everything is ok, try to upload file
    } else {
        move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_file);
        $post = $target_file;
        postStatus($post, 1);
        return true;
    }
}
示例#5
0
include_once 'include/allQueries.php';
if (!$_SESSION['login']) {
    header('Location:login.php');
} else {
    $completed = checkComplete();
    if ($completed == false) {
        header('Location:completeAccount.php');
    }
}
if (isset($_GET['q'])) {
    logout();
    header("location:login.php");
}
if (isset($_REQUEST['postStatus'])) {
    extract($_REQUEST);
    postStatus($post, 0);
}
if (isset($_REQUEST['photoSubmit'])) {
    //  extract($_REQUEST);
    $uploaded = uploadPhoto($_FILES["fileToUpload"]);
    if ($uploaded) {
        header('Location:index.php');
    }
}
?>


<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">