Exemplo n.º 1
0
function update_entry($entry_id, $new_project_id, $new_startdate)
{
    $entry = get_entry($entry_id);
    $query = "UPDATE entries SET project_id = {$new_project_id}, startdate = '{$new_startdate}' WHERE entry_id = {$entry_id}";
    if ($result = mysql_query($query)) {
        display_people($new_project_id, $new_startdate);
        log_change(CURRENT_USER, 'removed', $entry['person_id'], 'from', $entry['project_id'], $entry['startdate']);
        log_change(CURRENT_USER, 'added', $entry['person_id'], "to", $new_project_id, $new_startdate);
    } else {
        die("<p>could not update item because:<br>" . mysql_error() . "<br>the query was {$query}.</p>");
    }
}
Exemplo n.º 2
0
        ?>
" id="cell-<?php 
        echo $project['project_id'];
        ?>
-<?php 
        echo $monday;
        ?>
" tb:project_id="<?php 
        echo $project['project_id'];
        ?>
" tb:date="<?php 
        echo $monday;
        ?>
">
          <?php 
        echo display_people($project['project_id'], $monday);
        ?>
          <div class="batch-dialog" style="display:none">
            <a href="#" class="copy">cp</a>  
            <a href="#" class="move">mv</a> 
            <a href="#" class="delete">rm</a>              
            <a href="#" class="cancel">x</a>
          </div>
        </td>
      <?php 
    }
    ?>
      <th style="width: 40px"><a href="<?php 
    echo HOME;
    ?>
?project_id=<?php 
Exemplo n.º 3
0
function display_projects_table($projects)
{
    $mondays = setup_mondays();
    foreach ($projects as $key => $project) {
        ?>
    <tr id="project-<?php 
        echo $project['project_id'];
        ?>
" tb:project_id="<?php 
        echo $project['project_id'];
        ?>
" class="<?php 
        echo $project['component_class'];
        ?>
" tb:component="<?php 
        echo $project['component_full'];
        ?>
">
      <td class="project-name">
        <?php 
        //echo $project['project_name'];
        ?>
        <?php 
        //the_project_link($project);
        ?>
        <a class="<?php 
        echo $project['priority'];
        ?>
" href="http://thenest.topplabs.org/ticket/<?php 
        echo $project['project_id'];
        ?>
"><?php 
        echo $project['project_name'];
        ?>
</a>
      </td>
      <?php 
        foreach ($mondays as $key => $monday) {
            ?>
        <td class="project-<?php 
            echo $project['project_id'];
            ?>
 <?php 
            echo week_class($monday);
            ?>
" id="cell-<?php 
            echo $project['project_id'];
            ?>
-<?php 
            echo $monday;
            ?>
" tb:project_id="<?php 
            echo $project['project_id'];
            ?>
" tb:date="<?php 
            echo $monday;
            ?>
">
          <?php 
            echo display_people($project['project_id'], $monday);
            ?>
          <div class="batch-dialog" style="display:none">
            <a href="#" class="copy">cp</a>  
            <a href="#" class="move">mv</a> 
            <a href="#" class="delete">rm</a>              
            <a href="#" class="cancel">x</a>
          </div>
        </td>
      <?php 
        }
        ?>
      <th style="width: 40px">
        
        </th>
    </tr>
    <?php 
    }
}