File: 0.01.0a/pages/main.php (View as HTML)

  1: <?php 
  2: /* -------------------------------------------------------------
  3: This file is part of FreeDESK
  4: 
  5: FreeDESK is (C) Copyright 2012 David Cutting
  6: 
  7: FreeDESK is free software: you can redistribute it and/or modify
  8: it under the terms of the GNU General Public License as published by
  9: the Free Software Foundation, either version 3 of the License, or
 10: (at your option) any later version.
 11: 
 12: FreeDESK is distributed in the hope that it will be useful,
 13: but WITHOUT ANY WARRANTY; without even the implied warranty of
 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15: GNU General Public License for more details.
 16: 
 17: You should have received a copy of the GNU General Public License
 18: along with FreeDESK.  If not, see www.gnu.org/licenses
 19: 
 20: For more information see www.purplepixie.org/freedesk/
 21: -------------------------------------------------------------- */
 22: 
 23: global $DESK;
 24: 
 25: $DESK->Skin->IncludeFile("main_start.php");
 26: 
 27: $DESK->Skin->IncludeFile("main_left_start.php");
 28: 
 29: //
 30: 
 31: 
 32: 
 33: $teamusers = $DESK->RequestManager->TeamUserList();
 34: 
 35: echo "<ul class=\"leftpane\">\n";
 36: foreach($teamusers as $team)
 37: {
 38: 	echo "<li>";
 39: 	if ($team['view']) echo "<a href=\"#!/requests/".$team['id']."\" onclick=\"DESK.mainPane(".$team['id'].")\">";
 40: 	echo $team['name'];
 41: 	if ($team['view']) echo "</a>";
 42: 	if (is_array($team['items']) && (sizeof($team['items'])>0))
 43: 	{
 44: 		echo "\n<ul class=\"leftpane_sub\">\n";
 45: 		foreach($team['items'] as $member)
 46: 		{
 47: 			echo "<li>";
 48: 			if ($team['team'])
 49: 				$t=$team['id'];
 50: 			else
 51: 				$t=0;
 52: 			if ($member['view']) echo "<a href=\"#!/requests/".$member['username']."/".$t."\" onclick=\"DESK.mainPane(".$t.",'".$member['username']."')\">";
 53: 			echo $member['realname'];
 54: 			if ($member['view']) echo "</a>";
 55: 			echo "</li>\n";
 56: 		}
 57: 		echo "</ul>\n";
 58: 	}
 59: 	echo "</li>\n";
 60: }
 61: echo "</ul>\n";
 62: //
 63: 
 64: 
 65: 
 66: $DESK->Skin->IncludeFile("main_left_finish.php");
 67: 
 68: $DESK->Skin->IncludeFile("main_right_start.php");
 69: ?>
 70: 
 71: This text will vanish now...
 72: 
 73: <?php
 74: $DESK->Skin->IncludeFile("main_right_finish.php");
 75: 
 76: $DESK->Skin->IncludeFile("main_finish.php");
 77: 
 78: echo "<script type=\"text/javascript\">\n";
 79: echo "DESK.mainPane(0,'".$DESK->ContextManager->Session->username."');\n";
 80: if ($DESK->Configuration->Get("refresh.disable",0) != 1)
 81: 	echo "DESK.startRefresh(".$DESK->Configuration->Get("refresh",30).");\n";
 82: echo "</script>\n";
 83: 
 84: ?>
 85: