Ejemplo n.º 1
0
<?php

include 'configuration.php';
require 'coreclass.php';
session_start();
if (!isset($_SESSION['login'])) {
    header('Location: login.php');
}
if (isset($_SESSION['login'])) {
    $userID = $_SESSION['userID'];
    $username = $_SESSION['username'];
    $usertype = $_SESSION['usertype'];
}
switch ($usertype) {
    case 'News Editor':
        $assigned_category = getCategory_info(getUser_assigned_category($userID), 'categoryID');
        $editor_on_category = true;
        // this user is an editor
        break;
}
//retrieve the users workflow he had been assign ...
$db = new database();
$sql = "select * from user_stage us,\r\n\t\tstages s\r\n\t\twhere us.userID = {$userID}\r\n\t\tand\ts.stageID = us.stageID ";
// print $sql;
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$user_stage = array();
while ($row = $db->fetcharray()) {
    $user_stage[] = $row;
}
Ejemplo n.º 2
0
     if ($content_users[$i]->is_loggedin) {
         $row_data .= '<img src="images/tick.png" width="12" height="12" border="0" alt="" />';
     } else {
         $row_data .= '&nbsp;';
     }
     $row_data .= '</td>';
     $row_data .= '<td align="left">';
     if (!$content_users[$i]->is_enabled) {
         $row_data .= '<img src="images/publish_x.png" width="12" height="12" border="0" alt="" />';
     } else {
         $row_data .= '<img src="images/tick.png" width="12" height="12" border="0" alt="" />';
     }
     $row_data .= '</td>';
     $row_data .= '<td align="left" class="viola" >';
     $group_name = getGroup_name($content_users[$i]->usertypeID);
     $assigned_category = getCategory_info(getUser_assigned_category($content_users[$i]->userID), 'category_name');
     if ($assigned_category) {
         $row_data .= '&nbsp;' . $group_name . '<i>--' . $assigned_category . '</i>';
     } else {
         $row_data .= '&nbsp;' . $group_name;
     }
     $row_data .= '</td>';
     $row_data .= '<td class="red" >';
     $row_data .= '&nbsp;<a href="mailto:' . $content_users[$i]->email . '">' . $content_users[$i]->email;
     $row_data .= '</td>';
     $row_data .= '<td>';
     $lastvisitDate = $content_users[$i]->lastvisitDate ? friendlyDate($content_users[$i]->lastvisitDate) : '0';
     $row_data .= '&nbsp;' . $lastvisitDate;
     $row_data .= '</td>';
     $row_data .= '</tr>';
 }