<?Lassoscript
// Last modified: 1/15/07 by ECL, Landmann InterActive
// Prepared for Lasso Summit 07

// FUNCTIONALITY
// This is the left navbar

?>
<!--NAVBAR START-->
<table>
	<tr>
		<td width="134" align="left">
			<div id="niftysidebar" class="niftysidebar">
				<h2 onclick="ToggleDisplay('user')">User</h2>
				<div id="user">
					<p class="ltblue">
<?Lassoscript
	// Display logged-in user info
	If: (Var:'svUser_ID') != '' && (Var:'svUserPrivs_Priv') != '';
		'\t\t\t\t\t\t' (Var:'svAdmin_FName') '&nbsp;' (Var:'svAdmin_LName') '<br>\n';
		'\t\t\t\t\t\tPrivs: ' (Var:'svUserPrivs_Priv') '<br>\n';
	Else;
		'\t\t\t\t\t\tPrivs: Visitor<br>\n';
		// Log In link
		'\t\t\t\t\t\t<a href="/admin/login.lasso" class="menuBoxContentLink"><b>Log In</b></a>\n';
	/If;
?>
					</p><!-- 42 -->
<?Lassoscript
// Don't display if they are not logged in
If: (Var:'svUser_ID') != '';
?>
					<p class="ghost"><!-- 47 -->
<?Lassoscript
// Display links if Superadmin logged in
If: (Var:'svUserPrivs_Priv') == 'Admin' || (Var:'svUserPrivs_Priv') == 'Superadmin' || (Var:'svUserPrivs_Priv') == 'WGManager';

// Manage Issues
?>						<a href="http://[$svDomain]/admin/bugs.lasso" class="menuBoxContentLink"><b>Issues</b></a><br>
						&nbsp;<a href="http://[$svDomain]/admin/bugs_add.lasso?New=Y" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/bugs_edit.lasso" class="menuBoxContentLink">Search</a><br>
					</p><!-- 55 -->
					<p class="ghost"><!-- 55 -->
<?Lassoscript
// Display "My Assignments" link for developers
If: (Var:'svUserTypes_TypeID') == '1';
?>						<a href="http://[$svDomain]/admin/bugs_searchresults.lasso?IDDevel=[$svUser_ID]&NewQuery=Y" class="menuBoxContentLink"><b>My Assignments</b></a>
[/If]
					</p><!-- 62 -->
					<p class="ghost"><!-- 55 -->
<?Lassoscript
// Display "My Profile" 
?>						<a href="http://[$svDomain]/admin/user_editrecord.lasso?ID=[$svUser_ID]&New=Y" class="menuBoxContentLink"><b>My Profile</b></a>
					</p><!-- 62 -->
					<p class="ghost"><!-- 62 -->
<?Lassoscript
// Log Out link
		'\t\t\t\t\t\t\<a href="/admin/logout.lasso?Action=logout" class="menuBoxContentLink"><b>Log Out</b></a>\n';

	/If;
?>
					</p><!-- 69 -->
				</div><!-- 69 -->
<?Lassoscript
	If: (Var:'svUserPrivs_Priv') == 'Superadmin' || (Var:'svUserPrivs_Priv') == 'WGManager'; ?>
				<h2 onclick="ToggleDisplay('admin')">Admin</h2>
				<div id="admin">
					<p class="ghost">
<?Lassoscript
	// Manage Projects
?>					<a href="http://[$svDomain]/admin/project_edit.lasso" class="menuBoxContentLink"><b>Projects</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/project_add.lasso?New=Y" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/project_edit.lasso" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/project_delete.lasso" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Users
?>					<a href="http://[$svDomain]/admin/user_edit.lasso" class="menuBoxContentLink"><b>Users</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/user_add.lasso?New=Y" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/user_edit.lasso" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/user_delete.lasso" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Groups
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Group" class="menuBoxContentLink"><b>Groups</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Group" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Group" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Group" class="menuBoxContentLink">Delete</a>
					</p>
				</div>
				<h2 onclick="ToggleDisplay('setup')">Setup</h2>
				<div id="setup">
					<p class="ghost">
<?Lassoscript
// Manage Statuses
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Status" class="menuBoxContentLink"><b>Statuses</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Status" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Status" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Status" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Resolutions
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Resolution" class="menuBoxContentLink"><b>Resolutions</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Resolution" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Resolution" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Resolution" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Severities
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Severity" class="menuBoxContentLink"><b>Severities</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Severity" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Severity" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Severity" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Operating Systems
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=OS" class="menuBoxContentLink"><b>Operating Systems</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=OS" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=OS" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=OS" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Browsers
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Browser" class="menuBoxContentLink"><b>Browsers</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Browser" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Browser" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Browser" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Manage Versions
?>					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Version" class="menuBoxContentLink"><b>Versions</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?New=Y&DataType=Version" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=Version" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=Version" class="menuBoxContentLink">Delete</a>
					</p>
<?Lassoscript

/If;

// Manage Workgroups
// Display only if Superadmin logged in
	If: (Var:'svUserPrivs_Priv') == 'Superadmin';
?>
					<p class="ghost">
					<a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=WG&New=Y" class="menuBoxContentLink"><b>Workgroups</b></a><br>
					&nbsp;<a href="http://[$svDomain]/admin/setup_add.lasso?DataType=WG&New=Y" class="menuBoxContentLink">Add</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_edit.lasso?DataType=WG&New=Y" class="menuBoxContentLink">Edit</a>&nbsp;&nbsp;| <a href="http://[$svDomain]/admin/setup_delete.lasso?DataType=WG&New=Y" class="menuBoxContentLink">Delete</a>
					</p>
					<p class="ghost">
<?Lassoscript
// Maintenance
	'\t\t\t\t\t<a href="/maintenance/maintenance.lasso" class="menuBoxContentLink"><b>Maintenance</b></a>\n';
?>
					</p>
					<p class="ghost">
<?Lassoscript
// System Settings
	'\t\t\t\t\t<a href="http://'($svDomain)'/admin/sys_editrecord.lasso?New=Y" class="menuBoxContentLink"><b>System Settings</b></a>\n';
			'\t\t\t\t\t</p>\n';
			'\t\t\t\t</div><!-- 144 -->\n';
			'\t\t\t</div><!-- 144 -->\n';
		/If;
/If;
?>
				</td><!-- 149 -->
			</tr>
<!-- Admin END -->
	<tr>
		<td>
		<div id="niftysidebar2" class="niftysidebar">
			<h2 onclick="ToggleDisplay('links')">Links</h2>
			<div id="links">
				<p class="ghost">
<?Lassoscript
// Support Form
	'\t\t\t\t\t<a href="http://'($svDomain)'/support.lasso" class="menuBoxContentLink"><b>Support Request</b></a><br>\n';

// Get Folders from the /help folder
Inline: -Nothing, -Username=$svSiteUsername, -Password=$svSitePassword;
	Local:'Result' = '';
	Local:'WhichDir' = string;
	Local:'WhichDir' = '/help/';
	Local:'File_Listing' = string;
	Local:'File_Listing' = (Named_Param:'-Directory');
	Local:'x' = integer;
	// List the directory recursively
	Local:'x' = 0;
	Inline: -Nothing, -Username=$svSiteUsername, -Password=$svSitePassword;
		#File_Listing = (File_ListDirectory: (#WhichDir));
		If: $svDebug == 'Y';
			'30: File_Listing = ' #File_Listing' <br>\r';
		/If;
	/Inline;
	// Display files in the directory
	Loop: (#File_Listing->Size);
		If: $svDebug == 'Y';
			'44: Loop_Count = ' (Loop_Count) '<br>\r';
		/If;
		If:(Loop_Count) != #x;
			// This gets the filename
			Local:'ThisFile' = (#File_Listing)->(get:(Loop_Count));
				// Display file if not = .DS_Store or disabled with the SkipChar
				If: !((#ThisFile)->BeginsWith('.'));
					Local('DirectoryName_Clean' = (#ThisFile));
					#DirectoryName_Clean->RemoveTrailing('/');
					// Build the link
					'\t\t\t\t<a href="/help/'(#DirectoryName_Clean)'" class="menuBoxContentLink"><b>' (#DirectoryName_Clean) '</b></a>\n';
					If: ((Loop_Count) >> 1) && ((Loop_Count) != #x);
						'\t\t\t\t<br>\n';
					/If;
				/If;
		/If;
	/Loop;
/Inline;
?>
				</div><!-- 196 -->
			</div><!-- 196 NIftySidebar -->
		</td>
	</tr>
</table>
<!--NAVBAR END-->
