require "include/common.php"; require "include/shell.php"; require_once "include/interfaces.php"; require_once "include/sql.php"; // Определение сессии и сессионных переменных session_start(); $userid = $_SESSION['userid']; $userif = $_REQUEST['userif']; if($userif) $_SESSION['ifid'] = (int)$userif; elseif(!$_SESSION['ifid']) $_SESSION['ifid'] = 1; $ifid = $_SESSION['ifid']; $if = LoadInterface($ifid); if($if['id'] == 1) { $iseng = FALSE; $nnm = "name"; } else { $iseng = TRUE; $nnm = "engname"; } $pageid = 10; FormHeader(FALSE,$userid); $judgeid = (int)$_REQUEST[judgeid]; if(!$judgeid) { $outtext = "
| $lt | |||
| ".$r[$nnm]." $addtxt | \n"; $outtext .= "".ShowNames($r['countryid'],"countries",$iseng)." | \n"; $outtext .= "{$r['cnt']} {$if['judges_shows']} | \n"; $outtext .= "{$r['description']} | \n"; $outtext .= "

| ";
$outtext .= "".$r[$nnm]." ".ConvertDate($r['showdate'])." ".ShowNames($r['statusid'], "showstatus", $iseng).""; $outtext .= " | ";
$outtext .= "";
$dsh = mysql_query("SELECT sr.dogid, sr.titleid, st.$nnm AS tname FROM showresults AS sr, showtitles AS st WHERE sr.showid = {$r['id']} AND sr.titleid=st.id AND sr.titleid != 0 ORDER BY st.rang");
while($rsh = mysql_fetch_array($dsh)) $outtext .= DogFullName($rsh['dogid'],TRUE)." - {$rsh['tname']} "; $outtext .= " | ";
$outtext .= "";
$dst = mysql_query("SELECT markid, SUM(1) AS cnt FROM `showresults` WHERE showid={$r['id']} AND markid>0 GROUP BY markid");
while($rst = mysql_fetch_array($dst)) $outtext .= ShowNames($rst['markid'],'marktype', $iseng). " - {$rst['cnt']} "; $outtext .= " | ";
$outtext .= "