Location: PHPKode > projects > PI-FIND > pi-find/include/trad.php
<?php
session_start();
include("./lang.php");

?>
<html>
<head><TITLE>PI-FIND</TITLE>
<TITLE>PI-FIND</TITLE>
	<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body>
<center>
<?php

$idCatMc=$_GET['id'];
$lblmc=$_POST['lbl'];
include("../include/connect.php");
$sqlC1="SELECT COUNT(*)AS Expr1000 FROM CATMOTCLEES WHERE id_cat_mc=".$idCatMc." OR ( id_origine=".$idCatMc.");";
	$rqC1=odbc_do($cnx,$sqlC1); 
	$rsC1=odbc_fetch_object($rqC1);
	$nbtrad=$rsC1->Expr1000;
$sqlC2="SELECT * FROM CATMOTCLEES WHERE id_cat_mc=".$idCatMc." OR ( id_origine=".$idCatMc.");";
	$rqC2=odbc_do($cnx,$sqlC2); 

$sql1="SELECT COUNT(*)AS Expr1000 FROM lg;";
	$rq1=odbc_do($cnx,$sql1); 
	$rs1=odbc_fetch_object($rq1);
	$nblg=$rs1->Expr1000;
	
$sql2="SELECT code_langue,lg FROM lg ORDER BY lg ASC ;";
		
echo"<form method='post' action='./vtrad.php?id=".$idCatMc."'>".
		lg45."<br><input name='lbl' type='text' size='20' ><br>";
		
	
echo"&nbsp;<select name='Codelg' onchange='this.form.elements[\"lblg\"].options[this.form.elements[\"lblg\"].selectedIndex]=this.form.elements[\"Codelg\"].selectedIndex ' >";
	$rq2=odbc_do($cnx,$sql2); 
		echo"<option value=''></option>";
		for($j=0; $j<$nblg; $j++){
			$rs2=odbc_fetch_object($rq2);
				$lbClg=$rs2->code_langue;
				$lblg=$rs2->langue;
	        echo"<option value='".$lbClg."'>".$lblg."&nbsp;-&nbsp;".$lbClg."</option>";
		}
		echo"</select>&nbsp;".
		"<input type='submit' value='".lg09."' >&nbsp;".
		"<input type='button' value='".lg28."' onClick='javascript:history.back()'></form>";
		
	echo"<form method='post' action='./vtrad2.php?nb=".$nbtrad."'>";
	FOR($i=0;$i<$nbtrad;$i++){
		$rsC2=odbc_fetch_object($rqC2);
			$lbmc=$rsC2->lbl_motclees;
			$cdlg=$rsC2->code_langue;
			$id_cat_mc=$rsC2->id_cat_mc;
		echo"<input name='lbl".$i."' type='text' size='15' value='".$lbmc."' >".
			"<input name='Codelg".$i."' type='text' size='2' DISABLED value='".$cdlg."' >".
			"<input name='idmc".$i."' type='HIDDEN' value='".$id_cat_mc."' >".
			"<br>";
	}
	echo"<input type='submit' value='".lg09."' ></form>";
odbc_close($cnx);

?>
</center>
</body>
</html>
Return current item: PI-FIND