$message .= ' Sorry, the admin restrict you to act as an Editor.'; } else { $message .= ', you logged in as ' . $position . '.'; } $_SESSION['stageID'] = 3; break; case 'News Director': $x = checkUserAccessRights($userID, 4); if (!$x) { $message .= ' Sorry, the admin restrict you to act as a News Director.'; } else { $message .= ', you logged in as ' . $position . '.'; } break; case 'Publisher': $x = checkUserAccessRights($userID, 5); if (!$x) { $message .= ' Sorry, the admin restrict you to act as a Publisher.'; } else { $message .= ', you logged in as ' . $position . '.'; } break; } /* * Get the default stylesheets */ $stylesheet = " ../templates/admin2.css"; $welcome_message = 'welcome! mindhack '; // start generating page $tpl = new template_parser('../templates/index_body.tpl.php'); $tags = array('{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{WELCOME_MESSAGE}' => $message, '{MSG}' => $msg, '{TOPNAV}' => '', '{STYLESHEET}' => $stylesheet, '{CONTENT}' => 'main_content2.php', '{FOOTER}' => 'footer.php');
} $row_data .= '</td>'; $row_data .= '<td align="left">'; if (checkUserAccessRights($content_users[$i]->userID, 3)) { $row_data .= '<img src="images/tick.png" width="12" height="12" border="0" alt="" />'; } else { $row_data .= '<img src="images/publish_x.png" width="12" height="12" border="0" alt="" />'; } $row_data .= '</td>'; $row_data .= '<td align="left">'; if (checkUserAccessRights($content_users[$i]->userID, 4)) { $row_data .= '<img src="images/tick.png" width="12" height="12" border="0" alt="" />'; } else { $row_data .= '<img src="images/publish_x.png" width="12" height="12" border="0" alt="" />'; } $row_data .= '</td>'; $row_data .= '<td align="left">'; if (checkUserAccessRights($content_users[$i]->userID, 5)) { $row_data .= '<img src="images/tick.png" width="12" height="12" border="0" alt="" />'; } else { $row_data .= '<img src="images/publish_x.png" width="12" height="12" border="0" alt="" />'; } $row_data .= '</td>'; $row_data .= '</tr>'; } } // start compiling the page.. $tpl = new template_parser('../templates/user_stage_manager2.tpl.php'); $tags = array('{NAME}' => 'Name', '{GROUP}' => 'Group', '{WRITING}' => 'Writing', '{EDITING}' => 'Editing', '{PROOFREADING}' => 'Evaluating', '{PUBLISHING}' => 'Publishing', '{TABLE_DATA}' => $row_data, '{MESSAGE}' => $message, '{PAGELINK}' => $pagelink->pagelinks, '{SITENAME}' => 'CMS Adminss', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();