86
Ә қосымшасы
PHP-дің рограммалық коды
$db = mysql_connect ("localhost","root","");
mysql_select_db ("tolk_slovar",$db);
$result1 = mysql_query("SELECT meta_1,meta_2,meta_3,meta_4,meta_5,meta_6 FROM titulka
WHERE id_p='1'");
$myrow=mysql_fetch_array($result1);
$result = mysql_query("SELECT 1 FROM `tolykSlovar` WHERE 0");
if (!$result){
mysql_query("CREATE TABLE tolykSlovar
(
id int NOT NULL AUTO_INCREMENT ,
PRIMARY KEY (`id`),
soz_kz varchar(100),
soz_ru varchar(100),
soz_en varchar(100),
anyktama text
)");
for($i=1;$i<=3;$i++){
if($i==1){
$tehsl = mysql_query("SELECT soz_kz,soz_ru,soz_en,anyktama FROM tehSlovar",$db);
$n = mysql_num_rows($tehsl);
for($j=0;$j<$n;$j++){
$sozkz=mysql_result($tehsl,$j,"soz_kz");
$sozru=mysql_result($tehsl,$j,"soz_ru");
$sozen=mysql_result($tehsl,$j,"soz_en");
$anykt=mysql_result($tehsl,$j,"anyktama");
mysql_query ("INSERT INTO tolykSlovar (soz_kz,soz_ru,soz_en,anyktama)
VALUES('$sozkz','$sozru','$sozen','$anykt')");
}
}
else if($i==2){
$infsl = mysql_query("SELECT soz_kz,soz_ru,soz_en,anyktama FROM infSlovar",$db);
$n = mysql_num_rows($infsl);
for($j=0;$j<$n;$j++){
$sozkz=mysql_result($infsl,$j,"soz_kz");
$sozru=mysql_result($infsl,$j,"soz_ru");
$sozen=mysql_result($infsl,$j,"soz_en");
$anykt=mysql_result($infsl,$j,"anyktama");
$tehsl = mysql_query("SELECT anyktama FROM tehSlovar where soz_kz='$sozkz'",$db);
$nn = mysql_num_rows($tehsl);
if($nn>0){
$anykt_teh=mysql_result($tehsl,$nn-1,"anyktama");
}
else{
$anykt_teh="Bauyrzhan Makhsotov";
87
}
if($anykt!=$anykt_teh){
Ә қосымшасының жалғасы
mysql_query ("INSERT INTO tolykSlovar (soz_kz,soz_ru,soz_en,anyktama)
VALUES('$sozkz','$sozru','$sozen','$anykt')");
}
}
}
else{
$fizsl = mysql_query("SELECT soz_kz,soz_ru,soz_en,anyktama FROM fizSlovar",$db);
$n = mysql_num_rows($fizsl);
for($j=0;$j<$n;$j++){
$sozkz=mysql_result($fizsl,$j,"soz_kz");
$sozru=mysql_result($fizsl,$j,"soz_ru");
$sozen=mysql_result($fizsl,$j,"soz_en");
$anykt=mysql_result($fizsl,$j,"anyktama");
$tehsl = mysql_query("SELECT anyktama FROM tehSlovar where soz_kz='$sozkz'",$db);
$nn1 = mysql_num_rows($tehsl);
$infsl = mysql_query("SELECT anyktama FROM infSlovar where soz_kz='$sozkz'",$db);
$nn2 = mysql_num_rows($infsl);
if($nn1>0){
$anykt_teh=mysql_result($tehsl,$nn1-1,"anyktama");
}
else{
$anykt_teh="Askar Almukhametov";
}
if($nn2>0){
$anykt_inf=mysql_result($infsl,$nn2-1,"anyktama");
}
else{
$anykt_inf="Almukhametov Askar";
}
if($anykt!=$anykt_teh && $anykt!=$anykt_inf){
mysql_query ("INSERT INTO tolykSlovar (soz_kz,soz_ru,soz_en,anyktama)
VALUES('$sozkz','$sozru','$sozen','$anykt')");
}
}
}
}
}
if (isset($_POST['3']) == 'yes')
{
if(isset($_POST['2']))
{
echo "
";
}
}
if (isset($_POST['4']) == 'yes')
{
88
if(isset($_POST['2']))
{
Ә қосымшасының жалғасы
echo "
";
}
}
if (isset($_POST['5']) == 'yes')
{
if(isset($_POST['2']))
{
echo "
";
}
}
if (isset($_POST['6']) == 'yes')
{
if(isset($_POST['2']))
{
echo "
";
}
}
?>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Главная страница
Достарыңызбен бөлісу: |