AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 13.58.103.70


Current Path : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/players/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/lang_fr/players/playersnew.php

<?php
//Include non-standard libraries
include('../../administration/lib/lists.php');
include('../../administration/lib/locations.php');


$mysql_host = "mysql-readwrite"; // master (Rum)
$mysql_user = "lhjmq";
$mysql_pass = "45GhiLk19cQ";
$mysql_link = mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass");
//$mysql_link = mysql_connect('209.104.115.214', 'Lhcarranza', '899357');
mysql_select_db('lhjmq_pii', $mysql_link);


//Default letter if none
if (!isset($_GET['letter'])) {
	$_GET['letter'] = "Guy";
} else {
	$_GET['search'] = strtoupper($_GET['search']);
}

$sql_segments = mysql_query($sql = 'SELECT r.id,r.info_basicrole, r.info_fname, r.info_lname, r.info_mname, r.info_datenais FROM register AS r, secur_usagersgroupes AS sug1, secur_usagersgroupes AS sug2 WHERE (r.info_fname LIKE "%'.$_GET['search'].'%" OR r.info_lname LIKE "%'.$_GET['search'].'%")AND r.sys_status IN ( 1, 0 ) AND (r.sys_scope =0 OR r.sys_scope =1 OR ( r.sys_scope =2 AND sug1.id_usager = r.sys_owner AND sug1.id_groupe = sug2.id_groupe AND sug2.id_usager = "") OR ( r.sys_scope =3 AND r.sys_owner = "" )) GROUP BY id ORDER BY info_lname, info_fname, info_datenais', $mysql_link);



//Modify the sort direction
if ($sortByMode != 'DESC') {
	$sortByMode = 'ASC';
}

//Loop each team and dump players in the sort array then sort it
$players = array();

if ($sortByMode == 'DESC') {  krsort($players); } else { ksort($players); }
unset($tmpplayers, $player, $teams, $team, $sep, $list);

?>

      <!--##### TAB DATE ##### -->
			<table width="621" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="../../images/tabbar/tabligneshadow.gif" width="621" height="3"></td>
          </tr>
          <tr>
            <td><img src="../../images/spacer.gif" width="1" height="5"></td>
          </tr>
      </table>

      <!--##### TAB DATE ##### -->
			<table width="621" border="0" cellspacing="0" cellpadding="3" class="outlinetab">
        <tr class="darkblueRow">
          			<!--<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=abreviation_1&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Eq</a></td>
          			<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=numero&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">#</a></td>
          			//-->
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=nom&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Nom</a></td>
					<!--<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=lnh&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">LNH</a></td>
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=id_type_pos&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Pos</a></td>
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=recrues&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">*</a></td>
					//-->
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=date_nais&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Date Nais.</a></td>
					<!--<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=taille&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Gr.</a></td>
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=poid&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Pds</a></td>
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=tir&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">L</a></td>
					<td nowrap><a href="index.php?page=36785432&letter=<?php echo $_GET['letter']; ?>&sortBy=lieu_nais&sortByMode=<?php if ($sortByMode == "ASC") { echo "DESC"; } else { echo "ASC"; } ?>" class="lnkHdr12px">Lieu Nais.</a></td>
					//-->
        </tr>
				<?php
				$rowClass = "list2Reg";
				//foreach ($players as $player) {


				while($sql_segment = mysql_fetch_assoc($sql_segments)){





					/*$inteams = get_participating_teams_on($mysql_link, $sql_segment['id'], date('Y-m-d'), false);
					$teamdata = team_get_data($mysql_link, array_keys($inteams), date('Y-m-d'));
					echo '<pre>';
					print_r($teamdata);
					echo '</pre>';
					$idents = get_ident_status($mysql_link, $sql_segment['id'], array_keys($inteams), date('Y-m-d'));
					*/


					if (substr($rowClass, 0, 5) == "list1") {
						$rowClass = "list2Reg";
					} else {
						$rowClass = "list1Reg";
					}
				?>
        <tr class="<?php echo $rowClass; ?>">
          <!--<td nowrap class="blackText9px"><?php echo $player['team_data']['hist_abbrev']; ?></td>
          <td align="right" nowrap class="blackText9px"><?php if ($player['ident_file']['histo_addeddata2'] != '') { echo $player['ident_file']['histo_addeddata2']; } ?></td>
          //-->
					<td nowrap>
						<?if ($sql_segment['info_basicrole'] == "6" || $sql_segment['info_basicrole'] == "4"){?>
							<a href="../index.php?page=2147483647&id_register=<?php echo $sql_segment['id']; ?>" class="lnkBase9px">
						<?}else{?>
							<a href="../index.php?page=2147483648&id_register=<?php echo $sql_segment['id']; ?>" class="lnkBase9px">
						<?}
						//echo $sql_segment['info_basicrole'];
						?>
					<?php echo $sql_segment['info_lname'] . ", " . $sql_segment['info_fname']; ?></a></td>
					<!--<td nowrap class="blackText9px"><?php echo $player['register_file']['info_lnhequipe']; ?></td>
					<td nowrap class="blackText9px"><?php echo $player['ident_file']['description_fr']; ?></td>
					<td nowrap class="blackText9px"><?php echo (($player['register_file']['info_flags'] & 32) == 32 ? '*' : ''); ?></td>//-->
					<td nowrap class="blackText9px"><?php if ($sql_segment['info_datenais'] == '0000-00-00' || $sql_segment['info_datenais'] == '1900-01-01') { echo "-"; } else { echo $sql_segment['info_datenais']; } ?></td>
					<!--
					<?php
					//Calculate the height
					$feet = floor($player['phys_file']['phys_height'] / 12);
					$inch = $player['phys_file']['phys_height'] % 12;
					// Modify by MT : 11/09/2002
					if ($player['phys_file']['phys_weight'] <= 0) {
						$player['phys_file']['phys_weight'] = '-';
					}
					?>

          <td nowrap class="blackText9px"><?php echo ($player['phys_file']['phys_height'] < 36 ? '-' : $feet . "'" . str_pad($inch, 2, '0', STR_PAD_LEFT) . "&quot;"); ?></td>
					<td nowrap class="blackText9px"><?php echo $player['phys_file']['phys_weight']; ?></td>
					<?php
					if ($player['phys_file']['phys_shot'] == PHYS_SHOT_LEFT) {
						$tir = "G";
					} else if ($player['phys_file']['phys_shot'] == PHYS_SHOT_RIGHT) {
						$tir = "D";
					} else {
						$tir = '-';
					}
					?>
          <td nowrap class="blackText9px"><?php echo $tir; ?></td>
				  <td nowrap class="blackText9px"><?php echo $player['location_file']['complete_address']; ?></td>
				  //-->
        </tr>
				<?php
				}
				?>
      </table>
			<br /><span class="BlackText9px">*: Recrue</span><br />
			<br />
      <table width="621" border="0" cellspacing="0" cellpadding="0" bgcolor="#546085">
        <tr>
          <td><img src="../../images/spacer.gif" width="621" height="1"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>