예제 #1
0
?>
</div>
<div>
    Due:    <?php 
if ($achievement->due == 0) {
    ?>
                No due date set. 
            <?php 
} elseif ($achievement->due != 0) {
    ?>
                <?php 
    echo date("m/d/y", strtotime($achievement->due)) . " ";
    if (date("G", strtotime($achievement->due)) != "0") {
        echo date("gA", strtotime($achievement->due)) . " ";
    }
    $num_of_days_til_due = how_many_days_until_due($achievement->id);
    echo "<span style='color:red;";
    if ($num_of_days_til_due < 0) {
        echo "font-weight:bold;";
    }
    echo "' >" . fetch_due_message($num_of_days_til_due) . "</span>";
    ?>
            <?php 
}
?>
                <span id='show_new_due_date' class='hand text-button'>[ + ] </span>
                <span id='hide_new_due_date' class='hand text-button' style='display:none;'>[ - ] </span>
                <div id='new_due_date' style='display:none;'>
                    <div>
                        <?php 
display_due_date();
예제 #2
0
파일: display.php 프로젝트: taqfu/rla-old
function fetch_listing_row($achievement)
{
    //this could be written so much better.
    $string = " <tr><td>\n                    <input id='rank{$achievement->id}' type='number' \n                        class='change_rank_button' value='{$achievement->rank}' style='width:40px;text-align:center;' />\n                </td>";
    if ($achievement->parent == 0) {
        $string = $string . "   <td>\n                                    <span id='power_caption{$achievement->id}' class='hand power_caption'>\n                                        {$achievement->power}\n                                    </span>\n                                    <input type='number' id='power_input{$achievement->id}' class='power_input'\n                                        value='{$achievement->power}' style='width:40px;text-align:center;display:none;'/> \n                                </td><td>\n                                    {$achievement->power_adj}\n                                </td>";
    }
    $string = $string . "<td style='text-align:left'> \n                    <input type='button'  id='activity{$achievement->id}' ";
    $string = !$achievement->active ? $string . "  class='activate_button' style='background-color:red;' />" : $string . "  class='deactivate_button' style='background-color:green;' />";
    $string = $string . "<a href='" . SITE_ROOT . "/?rla={$achievement->id}' style='text-decoration:none;";
    if ($achievement->active) {
        $string = $string . "color:green;";
    } else {
        if (!$achievement->active) {
            $string = $string . "color:red;";
        }
    }
    $string = $string . "'>\n                    {$achievement->name} \n                    </a>";
    $num_of_days_til_due = how_many_days_until_due($achievement->id);
    if ($num_of_days_til_due != false) {
        $string = $string . "<span style='color:";
        $string = $num_of_days_til_due < 0 ? $string . "red;font-weight:bold;" : $string . "grey;";
        $string = $string . "'> " . fetch_due_message($num_of_days_til_due);
        $string = $string . "</span>";
    }
    $string = $string . "</td></tr>";
    return $string;
}