예제 #1
0
파일: work.php 프로젝트: idoqo/yedoe
    if ($startDay == "" || $startMonth == "" || $startYear == "") {
        $_SESSION['error'] = "Date started seems to be invalid and/or blank";
        header("location: " . $_SERVER['REQUEST_URI']);
        exit;
    }
    $startDate = $_POST['start_day'] . "-" . $_POST['start_month'] . "-" . $_POST['start_year'];
    $startDate = dateToYMD($startDate, 'Y-m-d');
    if ($_POST['end_day'] != "Present") {
        if ($endDay == "" || $endMonth == "" || $endYear == "") {
            $_SESSION['error'] = "Date ended/ending seems to be blank";
            header("location: " . $_SERVER['REQUEST_URI']);
            exit;
        }
    }
    $endDate = $_POST['end_day'] . "-" . $_POST['end_month'] . "-" . $_POST['end_year'];
    $endDate = dateToYMD($endDate, "Y-m-d");
    if ($endDate < $startDate) {
        $_SESSION['error'] = "Date started cannot be before end date";
        header("location" . $_SERVER['REQUEST_URI']);
        exit;
    }
    $_POST['started_date'] = $startDate;
    $_POST['end_date'] = $endDate;
    var_dump($me->createPortfolio($_POST));
}
if (isset($_POST['remove_work'])) {
    $item = $_POST['item_id'];
    if (preg_match('/[0-9]+/', $item)) {
        $rem = $me->removePortfolio($item);
        if ($rem !== true) {
            $_SESSION['error'] = "Unable to complete request";
예제 #2
0
파일: archives.php 프로젝트: idoqo/yedoe
    }
    header("location: " . $_SERVER['REQUEST_URI']);
    exit;
}
?>
<div>
    <?php 
if (isset($_SESSION['error'])) {
    echo "<div class='feedback error'>{$_SESSION['error']}</div>";
    unset($_SESSION['error']);
}
if (!empty($total > 0)) {
    foreach ($apps['result'] as $app) {
        $job = Job::getById($app['jobID']);
        $employer = Employer::getUser($job->postedBy);
        $jobExpiry = dateToYMD($job->expiryDate, "Y-m-d");
        $jobUrl = "project/" . $job->jobId . "/" . cleanUrl($job->title);
        ?>
            <form action="<?php 
        echo htmlspecialchars($_SERVER['REQUEST_URI']);
        ?>
" method="post">
            <div class="feed-element row rug-p">
                <h3><a href="<?php 
        echo $jobUrl;
        ?>
"><?php 
        echo $job->title;
        ?>
</a></h3>
                <p style="font-size: .8em;"><b><?php 
예제 #3
0
파일: archives.php 프로젝트: idoqo/yedoe
   <th>Status</th>
   <th>Posted On</th>
   <th>Expires</th>
   <th>Actions</th>
 </tr>
 </thead>
 <tbody>
 <?php 
if (!empty($jobs)) {
    foreach ($jobs as $job) {
        $title = truncate($job->title, 40, "...");
        $bids = $job->getBids(1, 15);
        $bids = $bids['num_rows'];
        $status = $job->status == 1 ? "<span class='job-active'>Active</span>" : "<span class='job-closed'>Closed</span>";
        $postedDate = dateToYMD($job->postedDate, "Y-m-d");
        $expiry = dateToYMD($job->expiryDate, 'Y-m-d');
        ?>
         <tr>
             <td><label for="check_all" <input type="checkbox" value="" id="check_all" disabled></td>
             <td style="text-align: left;"><?php 
        echo $title;
        ?>
</td>
             <td><?php 
        echo $bids;
        ?>
</td>
             <td><?php 
        echo $status;
        ?>
</td>