All pastes #129692 Raw Edit

Miscellany

public text v1 · immutable
#129692 ·published 2006-08-13 16:49 UTC
rendered paste body
<?php
require('connect.php');
require('setting.php');
session_start();
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}


?>
<?
require('connect.php');
require('setting.php');
$query_team1 = "SELECT team_name FROM team ORDER BY team_name ASC";
$team1 = mysql_query($query_team1, $db) or die(mysql_error());
$row_team1 = mysql_fetch_assoc($team1);
$totalRows_team1 = mysql_num_rows($team1);

$query_team2 = "SELECT team_name FROM team ORDER BY team_name ASC";
$team2 = mysql_query($query_team2, $db) or die(mysql_error());
$row_team2 = mysql_fetch_assoc($team2);
$totalRows_team2 = mysql_num_rows($team2);
?>
<html>
<head>
<title>Website Title</title>
<link rel="stylesheet" href="../skins/wave/styles.css" />
<meta name="description" content="Website description" />
<meta name="keywords"    content="Website Keywords" />
<style type="text/css">
<!--
.ar11 {font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #000000;
}
.style18 {font-size: 12pt}
.style19 {color: #5C5C5C}
.style20 {font-size: 11px; font-family: Arial, Helvetica, sans-serif;}
.style21 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #5C5C5C; }
.style22 {color: #FFFFFF}
.style24 {font-weight: bold}
.style25 {color: #FFFFFF; font-weight: bold; }
.style26 {color: #000000}
.style27 {color: #000000; font-weight: bold; }
.style16 {font-size: 8pt}
.style1 {font-size: 9px}
-->
  </style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Layer1" style="position:absolute; width:100%; height:115px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000;">
  <form name="form1" method="POST" action="roster_load.php" enctype="multipart/form-data">
    <table width="75%" border="0" cellpadding="4" cellspacing="0" bordercolor="#000000">
      <tr>
        <td width="19%" nowrap>&npsp;</td>
        <td width="7%" nowrap>Teams </td>
        <td width="68%" nowrap>&npsp;</td>
      </tr>
      <tr>
        <td nowrap>Team Roster</td>
        <td nowrap><font size="1">
          <select name="team1" id="team1">
            <?php
do {  
?>
            <option value="<?php echo $row_team1['team_name']?>"<?php if (!(strcmp($row_team1['team_name'], $row_team1['team_name']))) {echo "SELECTED";} ?>><?php echo $row_team1['team_name']?></option>
            <?php
} while ($row_team1 = mysql_fetch_assoc($team1));
  $rows = mysql_num_rows($team1);
  if($rows > 0) {
      mysql_data_seek($team1, 0);
	  $row_team1 = mysql_fetch_assoc($team1);
  }
?>
          </select>
        </font></td>
        <td nowrap><span class="style1">
          <input type="file" name="form_data1" size="40">
        </span>            </td>
      </tr>
      <tr>
        <td nowrap>&npsp;</td>
        <td nowrap>&npsp;</td>
        <td nowrap><input type='hidden' name='date' value='<? echo date( 'y-m-d H:i:s' ); ?>' >
            <span class="style4">
            <input type="hidden" name="ip" value="<? echo "$REMOTE_ADDR"; ?>">
            <input name="team4" type="hidden" id="team42" value="<? print $_SESSION['MM_Username']; ?>">
          </span></td>
      </tr>
      <tr>
        <td nowrap>&npsp;</td>
        <td nowrap>&npsp;</td>
        <td nowrap><input type="submit" name="Submit" value="Submit"></td>
      </tr>
    </table>
    <input type="hidden" name="MM_insert" value="form1">
  </form>
</div>
<tr>
</body>
</html>