include "resources/dbase.php"; ?>
//////////language map//////////////
$query_language=mysql_query("select id,code from rasool_forign_language");
$query_materials=mysql_query("select code,id from rasool_forign_materials");
$lang_count=mysql_num_rows($query_language);
?>
while($language_result=mysql_fetch_array($query_language))
{
$language_array[$language_result['code']]=$language_result['id'];
?>
}
while($material_result=mysql_fetch_array($query_materials))
{
$material_array[$material_result['code']]=$material_result['id'];
?>
}
//////////language map//////////////
if (isset($_REQUEST['lang'])) {
$langCode = (get_magic_quotes_gpc()) ? $_REQUEST['lang'] : addslashes($_REQUEST['lang']);
$langCode = (strlen($_REQUEST['lang']) > 4) ? "eng" : $_REQUEST['lang'];
$functio="getcontent('steady','sera','$langCode')";
}
/////////////array of books and its contents///////////
foreach($language_array as $languag_element)
{
$query_books=mysql_query("select id,name,material from rasool_forign_books where lang=$languag_element");
?>
while($books_result=mysql_fetch_array($query_books))
{
$books_id_array[$languag_element][$books_result['material']]=$books_result['id'];// array contains all books ids known by book material kind
?>
$books_name_array[$languag_element][$books_result['id']]=$books_result['name']; // array contains all books names known by book id
?>
$query_contents=mysql_query("select id from rasool_forign_contents where bookId=$books_result[id] order by id");
$i=0;?>
while($qury_contents=mysql_fetch_array($query_contents))
{
$contents_array[$books_result['id']][$i]=$qury_contents['id'];
?>
$i++;
}
}
}
/////////////array of books and its contents///////////
$lng=$langCode;
if(!isset($_REQUEST['lang']))
{
?>
}
else
{
?>
$page="1"; ?>
|
|
|
|
|
|
|
|
|
|
|
}
?>