*** admin_header.php	2011-05-23 07:25:35.000000000 -0400
--- admin_header.php	2011-05-28 23:11:06.000000000 -0400
***************
*** 26,31 ****
--- 26,35 ----
  # 100802-2127 - Changed Admin to point to links page instead of Phones listings
  # 100831-2255 - Added password strength checking function
  # 100914-1311 - Removed other links for reports-only users
+ # 101022-1323 - Added IGU_selectall function
+ # 101107-1133 - Added auto-refresh code
+ # 110215-1720 - Added the Add a new lead link
+ # 110322-1228 - Added user ID logged in as next to Logout link
  #
  
  
***************
*** 446,451 ****
--- 450,474 ----
  	<?php
  
  #### Javascript for auto-generate of user ID Button
+ if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
+ 	{
+ 	?>
+ 	var ar_seconds=<?php echo "$SSadmin_modify_refresh;"; ?>
+ 
+ 	function modify_refresh_display()
+ 		{
+ 		if (ar_seconds > 0)
+ 			{
+ 			ar_seconds = (ar_seconds - 1);
+ 			document.getElementById("refresh_countdown").innerHTML = "<font color=black> screen refresh in: " + ar_seconds + " seconds</font>";
+ 			setTimeout("modify_refresh_display()",1000);
+ 			}
+ 		}
+ 
+ 	<?php
+ 	}
+ 
+ #### Javascript for auto-generate of user ID Button
  if ( ($ADD==1) or ($ADD=="1A") )
  	{
  	?>
***************
*** 614,619 ****
--- 637,665 ----
  	}
  
  
+ ### Javascript for shift end-time calculation and display
+ if ( ($ADD==3111) or ($ADD==4111) or ($ADD==5111) )
+ 	{
+ 	?>
+ 	function IGU_selectall(temp_count,temp_fields)
+ 		{
+ 		var fields_array=temp_fields.split('|');
+ 		var inc=0;
+ 		while (temp_count >= inc)
+ 			{
+ 			if (fields_array[inc].length > 0)
+ 				{
+ 				document.getElementById(fields_array[inc]).checked=true;
+ 			//	document.admin_form.fields_array[inc].checked=true;
+ 				}
+ 			inc++;
+ 			}
+ 		}
+ 
+ 	<?php
+ 	}
+ 
+ 
  ### select list contents generation for dynamic route displays in call menu and in-group screens
  if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511) or ($ADD==3111) or ($ADD==2111) or ($ADD==2011) or ($ADD==4111) or ($ADD==5111) )
  	{
***************
*** 1011,1017 ****
  echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen, print, projection\"  href=\"../csslibs/goiframe2.css\"></link>\n";
  echo "<script type=\"text/javascript\" src=\"../includes/goiframe2.js\"></script>\n";
  echo "</head>\n";
! echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
  echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
  
  $stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled from system_settings;";
--- 1057,1071 ----
  echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen, print, projection\"  href=\"../csslibs/goiframe2.css\"></link>\n";
  echo "<script type=\"text/javascript\" src=\"../includes/goiframe2.js\"></script>\n";
  echo "</head>\n";
! if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
! 	{
! 	echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"modify_refresh_display();\">\n";
! 	}
! else
! 	{
! 	echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
! 	}
! 
  echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
  
  $stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled from system_settings;";
***************
*** 1172,1177 ****
--- 1226,1233 ----
  			</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
  			<a href="admin_search_lead.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Search For A Lead </a>
  			</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
+ 			<a href="admin_modify_lead.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Lead </a>
+ 			</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
  			<a href="<?php echo $ADMIN ?>?ADD=121"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $DNClink ?> </a>
  			</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
  			<a href="./admin_listloader_third_gen.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Load New Leads </a>
***************
*** 1399,1405 ****
  </span>
  
  <TABLE BGCOLOR=#EFEFEF cellpadding=2 cellspacing=0 WIDTH=<?php echo $page_width ?> HEIGHT=15>
! <TR BGCOLOR=#616161><TD ALIGN=LEFT BGCOLOR=#616161><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><a href="<?php echo $admin_home_url_LU ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>HOME</a> | <A HREF="../agc/timeclock.php?referrer=admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1> Timeclock</A> | <a href="<?php echo $ADMIN ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo date("l F j, Y G:i:s A") ?> &nbsp; </B></TD></TR>
  
  <TR BGCOLOR=#616161>
  
--- 1455,1461 ----
  </span>
  
  <TABLE BGCOLOR=#EFEFEF cellpadding=2 cellspacing=0 WIDTH=<?php echo $page_width ?> HEIGHT=15>
! <TR BGCOLOR=#616161><TD ALIGN=LEFT BGCOLOR=#616161><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><a href="<?php echo $admin_home_url_LU ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>HOME</a> | <A HREF="../agc/timeclock.php?referrer=admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1> Timeclock</A> | <a href="<?php echo $ADMIN ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a> <FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>(<?php echo $PHP_AUTH_USER ?>)</FONT></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo date("l F j, Y G:i:s A") ?> &nbsp; </B></TD></TR>
  
  <TR BGCOLOR=#616161>
  
