function item_title_description_box($title_txt, $description_txt, $locales)
{
    ?>
        <?php 
    $l = $locales[0];
    ?>
        <?php 
    $item = osc_item() != null ? osc_item() : array();
    ?>
        <div class="clearfix">
            <label><?php 
    echo $title_txt;
    ?>
</label>
            <div class="input">
                <input class="xxlarge" type="text" name="title[<?php 
    echo $l['pk_c_code'];
    ?>
]" value="<?php 
    echo get_item_title($item, $l['pk_c_code']);
    ?>
" />
            </div>
        </div>
        <div class="clearfix">
            <label><?php 
    echo $description_txt;
    ?>
</label>
            <div class="input">
                <textarea name="description[<?php 
    echo $l['pk_c_code'];
    ?>
]" class="xxlarge" rows="9"><?php 
    echo get_item_description($item, $l['pk_c_code']);
    ?>
</textarea>
            </div>
        </div>
        <?php 
}
function get_activity($activity_array)
{
    foreach ($activity_array as $activity) {
        ?>
		<tr<?php 
        echo $activity['type'] == 'error' ? ' class="error"' : '';
        ?>
>
			<td class="activity_action">
				<?php 
        // no need for if's, give activity a default class and set based on type
        if ($activity['table'] == 'directus_media') {
            echo '<span class="activity media">' . ucwords($activity['type']) . '</span>';
        } elseif ($activity['type'] == 'edited') {
            echo '<span class="activity edited">Edited</span>';
        } elseif ($activity['type'] == 'added') {
            echo '<span class="activity added">Added</span>';
        } elseif ($activity['type'] == 'activated') {
            echo '<span class="activity activated">Activated</span>';
        } elseif ($activity['type'] == 'deactivated') {
            echo '<span class="activity deactivated">Deactivated</span>';
        } elseif ($activity['type'] == 'deleted') {
            echo '<span class="activity deleted">Deleted</span>';
        } elseif ($activity['type'] == 'backed up') {
            echo '<span class="activity backedup">Back Up</span>';
        } elseif ($activity['type'] == 'reverted') {
            echo '<span class="activity reverted">Reverted</span>';
        } elseif ($activity['type'] == 'uploaded') {
            echo '<span class="activity uploaded">Uploaded</span>';
        } elseif ($activity['type'] == 'swapped') {
            echo '<span class="activity swapped">Swapped</span>';
        } elseif ($activity['type'] == 'installed') {
            echo '<span class="activity backedup">Installed</span>';
        } elseif ($activity['type'] == 'error') {
            echo '<span class="activity error">Error</span>';
        } else {
            echo '<span class="activity default">' . ucwords($activity['type']) . '</span>';
        }
        ?>
			</td>
			<td class="activity_description">
				<div class="wrap">
				<?php 
        echo get_item_description($activity);
        ?>
				</div>
			</td>
			<td class="activity_user text_right">
				by <?php 
        echo get_username($activity['user']);
        ?>
			</td>
			<td class="activity_date" title="<?php 
        echo date('M jS Y, g:i:s a', strtotime($activity['datetime']));
        ?>
">
				<?php 
        echo contextual_time(strtotime($activity['datetime']));
        ?>
			</td>
		</tr>
		<?php 
    }
}