<?php
session_start();
include ('head.php');
$q2=mysql_query("select * from tanzim ");
$cd2=mysql_fetch_assoc($q2);

if (isset($_POST['okqes']))
{
	include_once ('jdf.php');
	$t=jdate('Y/m/d');
	$s=jdate('H:i:s');

	mysql_query(" insert into `site_ask` (date,time,name,tell,mail,matn)
	VALUES ('{$t}','{$s}','{$_POST['name']}','{$_POST['tell']}','{$_POST['mail']}','{$_POST['matn']}')");

	echo"<script>window.alert('اطلاعات ذخیره شد ، در اسرع وقت پاسخ داده خواهد شد');</script>";
}
?>
	<tr background="images/bcg13.jpg">
		<td  rowspan="2" align="center" valign="top" colspan="4" height="420" background="images/bcg13.jpg">
			<?php
			if (isset($_GET['say']))
			{
			?>
			<script type ="text/javascript" >
			function funs(){
      		if ((document.form2.name.value)=="")
	  		{
	        alert("لطفا نام و نام خانوادگی را وارد نماييد");
	        document.form2.name.focus();
	        return false;
			}
		    if ((document.form2.tell.value)=="")
	  		{
	        alert("لطفا شماره تماس را وارد نماييد");
	        document.form2.tell.focus();
	        return false;
	  		}
			if ((document.form2.mail.value)=="")
	  		{
	        alert("لطفا ایمیل را وارد نماييد");
	        document.form2.mail.focus();
	        return false;
	  		}
	  		if ((document.form2.matn.value)=="")
	  		{
	        alert("لطفا پرسش/مطلب را وارد نماييد");
	        document.form2.matn.focus();
	        return false;
	  		}
           	return true;
  			}
			</script>
			<br/><br/><br/><br/><br/><br/><br/><br/>
			<form action="index1.php?say=1" method="post" name="form2" id="form2"  onsubmit="return funs();">
			<table border="1" width="60%"  background="images/body.jpg">
				<tr>
					<td colspan="2" align="right">
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						ارسال سوالات برای مدیریت سایت:
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*نام و نام خانوادگی:
					</td>
					<td>
						<input name="name" id="name" type="text" tabindex="1" size="50">
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*شماره تماس:
					</td>
					<td>
						<input name="tell" id="tell" type="text" tabindex="2" size="50">
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*ایمیل:
					</td>
					<td>
						<input name="mail" id="mail" type="text" tabindex="3" size="50">
					</td>
				</tr>
				<tr align="center">
					<td align="center" colspan="2">
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*درج پرسش/مطلب:
						<br/>
						<textarea tabindex="4" name="matn" id="matn" cols="50" rows="8"  style="font-family:B Nazanin;font-size:14pt"><?php echo $v33['matn']; ?></textarea>
					</td>
				</tr>
				<tr align="center">
					<td colspan="2" align="center">
						<button  tabindex="5" name="okqes" title="ارسال جهت مدیر سایت"  type="submit" ><img src="images/40.png"  name="Add"  border="0" width="25" height="25" ></button>
					</td>
				</tr>
			</table>
			</form>
			<?php
			}
			elseif (isset($_GET['pas']))
			{
			if (isset($_POST['getpass']))
			{
				if (isset($_POST['forgotpass']))
				$kindd='1';
				elseif (isset($_POST['newmember']))
				$kindd='2';

				include_once ('jdf.php');
				$t=jdate('Y/m/d');

				mysql_query(" insert into `ozv_passget` (id,kind,fname,lname,faname,jen,bearthdate,sh_t,code_melli,onvan,date,address,pass)
				VALUES ('{$_POST['id']}','{$kindd}','{$_POST['fname']}','{$_POST['lname']}','{$_POST['faname']}','{$_POST['jen']}','{$_POST['bearthdate']}','{$_POST['sh_t']}'
				,'{$_POST['code_melli']}','عضو','{$t}','{$_POST['address']}','{$_POST['pass']}')");

				echo"<script>window.alert('اطلاعات ذخیره شد ، در اسرع وقت پاسخ داده خواهد شد');</script>";
			}
			?>
			<script type ="text/javascript" >
			function funs(){
      		if ((document.form1.nk.value)=="")
	  		{
	        alert("لطفا نام كاربري را وارد نماييد");
	        document.form1.nk.focus();
	        return false;
			  }
		    if ((document.form1.pass.value)=="")
	  		{
	        alert("لطفا رمزعبور را وارد نماييد");
	        document.form1.pass.focus();
	        return false;
	  		}

           	return true;
  			}
			</script>
			<br/><br/><br/><br/><br/><br/><br/><br/>
			<form action="log.php" method="post" name="form1" id="form1"  onsubmit="return funs();">
			<table border="1" width="39%"  background="images/body.jpg">
				<tr>
					<td colspan="2" align="right">
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						ورود به سیستم
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						نام کاربری:
					</td>
					<td>
						<input name="nk" id="nk" type="text" tabindex="1" style="font-family:B Nazanin;font-size:14pt">
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						رمز عبور:
					</td>
					<td>
						<input name="pass" id="pass" type="password" tabindex="2" style="font-family:B Nazanin;font-size:14pt">
					</td>
				</tr>
				<tr align="center">
					<td colspan="2" align="center">
						<button  tabindex="3" name="sub" title="ورود"  type="submit" ><img src="images/40.png"  name="Add"  border="0" width="25" height="25" ></button>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center" bgcolor="#FFFFFF" height="50" valign="middle">
						<span style="font-family:B Nazanin;font-size:12pt;color:purple">
						<a href="log.php?bdr=1" style="text-decoration:none;color:purple">
						<b>ورود به کتابخانه بدون رمــــــز
						</a>
					</td>
				</tr>
				<tr align="right">
					<td colspan="2" align="right">

						<span style="font-family:B Nazanin;font-size:12pt;color:blue">
						<br/>
						<a href="index1.php?forgotpass" style="text-decoration:none">
						رمز خود را فراموش کرده ام
						</a>
						<br/>
						<br/>
						<a href="index1.php?newmember" style="text-decoration:none">
						ثبت نام
						</a>
						<br/>
						<br/>
					</td>
				</tr>
			</table>
			</form>
			<?php
			}
			elseif (isset($_GET['forgotpass']) or isset($_GET['newmember']))
			{
			?>
			<script type ="text/javascript" >
			function funs1(){
      		if ((document.form1.fname.value)=="")
	  		{
	        alert("لطفا نام را وارد نماييد");
	        document.form1.fname.focus();
	        return false;
			}
			if ((document.form1.lname.value)=="")
	  		{
	        alert("لطفا نام خانوادگی را وارد نماييد");
	        document.form1.lname.focus();
	        return false;
			}
			if ((document.form1.faname.value)=="")
	  		{
	        alert("لطفا نام پدر را وارد نماييد");
	        document.form1.faname.focus();
	        return false;
			}
			if ((document.form1.sh_t.value)=="")
	  		{
	        alert("لطفا شماره تماس را وارد نماييد");
	        document.form1.sh_t.focus();
	        return false;
			}
		    if ((document.form1.pass.value)=="")
	  		{
	        alert("لطفا رمزعبور را وارد نماييد");
	        document.form1.pass.focus();
	        return false;
	  		}

           	return true;
  			}
			</script>
			<br/><br/><br/><br/><br/><br/><br/><br/>
			<form action="index1.php?pas" method="post" name="form1" id="form1"  onsubmit="return funs1();">
			<?php
			if (isset($_GET['forgotpass']))
			{
			?>
			<input type="hidden" name="forgotpass" value="1">
			<?php
			}
			if (isset($_GET['newmember']))
			{
			?>
			<input type="hidden" name="newmember" value="1">
			<?php
			}
			?>

			<table border="1" width="70%"  height="400" background="images/body.jpg" style="font-family:B Nazanin;font-size:14pt">
				<tr>
					<td colspan="2" align="right" bgcolor="#FFFFFF">
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						ثبت مشخصات:
					</td>
				</tr>
				<?php
				if (isset($_GET['forgotpass']))
				{
				$namkarbari="*رمز عبور جدید :";
				?>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>

						کد عضویت :
					</td>
					<td>
						<input name="id" id="id" type="text" tabindex="1" size="15">
					</td>
				</tr>
				<?php
				}
				else
				{
				$namkarbari="*رمز عبور :";
				?>
					<input name="id" id="id" type="hidden" value="">
				<?php
				}
				?>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*نام :
					</td>
					<td>
						<input name="fname" id="fname" type="text" tabindex="1" size="40">
					</td>
				</tr>
				<tr align="center">
					<td>
						<span style="font-family:B Nazanin;font-size:14pt"><b>
						*نام خانوادگی:
					</td>
					<td>
						<input name="lname" id="lname" type="text" tabindex="1" size="40">
					</td>
				</tr>
				<tr align="center" style="font-family:B Nazanin;font-size:14pt">
					<td><b>
						*نام پدر :
					</td>
					<td>
						<input name="faname" id="faname" type="text" tabindex="2" size="40">
					</td>
				</tr>
				<tr align="center" style="font-family:B Nazanin;font-size:14pt">
					<td><b>
						جنسیت :
					</td>
					<td>
						<span class="blacktext">مرد</span>
						<input type="radio" name="jen" tabindex="2" value="مرد" checked>
			            <span class="blacktext">زن</span>
			            <input type="radio" name="jen" tabindex="2" value="زن">
					</td>
				</tr>
				<tr align="center" style="font-family:B Nazanin;font-size:14pt">
					<td><b>
						*شماره تماس :
					</td>
					<td>
						<input name="sh_t" id="sh_t" type="text" tabindex="2" size="40" lang="english" style="font-family:Calibri (Body)">
					</td>
				</tr>
				<tr align="center">
					<td><b>
						کد ملی :
					</td>
					<td>
						<input name="code_melli" id="code_melli" type="text" tabindex="2" size="40">
					</td>
				</tr>
				<tr align="center">
					<td><b>
						تاریخ تولد :
					</td>
					<td>
						<input name="bearthdate" id="bearthdate" type="text" tabindex="2" size="40">
					</td>
				</tr>
				<tr align="center">
					<td><b>
						<?php echo $namkarbari; ?>
					</td>
					<td>
						<input name="pass" id="pass" type="text" tabindex="2" size="40">
					</td>
				</tr>
				<tr align="center">
					<td colspan="2" align="center">
						<button  tabindex="3" name="getpass" title="ثبت اطلاعات"  type="submit" ><img src="images/40.png"  name="Add"  border="0" width="25" height="25" ></button>
					</td>
				</tr>
			</table>
			</form>
			<?php
			}
			elseif (isset($_GET['book']) or isset($_POST['nambook']))
			{
			?>
			<div align="center" style="overflow:auto;height:960px" >
			<table border="1" align="center" width="100%" >
				<form action="index1.php" method="post">
				<tr>
					<td background="images/bcg12.jpg" colspan="2" align="center" height="55" valign="middle">
						<table width="100%" align="center" border="0">
							<tr>
								<?php
								if (isset($_GET['groupname']))
								{
								?>
								<td  width="50"></td>
								<td  width="50"></td>
								<?php
								}
								?>
								<td align="center">
									<span style="font-family:B Nazanin;font-size:16pt"><b>
									جستجو براساس نام کتاب:
									<input type="text" name="nambook" size="15" style="font-family:B Nazanin;font-size:14pt">
									<button  tabindex="3" name="sub11" title="ورود"  type="submit" ><img src="images/12.png"  name="Add"  border="0" width="20" height="17" ></button>
								</td>
								<?php
								if (isset($_GET['groupname']))
								{
								?>
								<td background="images/choob.jpg" width="50">
									<a href="index1.php?book=1&groupname=<?php echo $_GET['groupname']; ?>&&groupname1=بزرگان"   style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:14pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									بزرگان
									</span>
									</a>
								</td>
								<td background="images/choob.jpg" width="50">
									<a href="index1.php?book=1&groupname=<?php echo $_GET['groupname']; ?>&&groupname1=سایرین"   style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:14pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									سایرین
									</span>
									</a>
								</td>
								<?php
								}
								?>
							</tr>
						</table>
					</td>
				</tr>
				</form>
				<tr>

					<?php
					$opp=0;
					if (isset($_GET['ippic']))
					$q3=mysql_query("select * from pic where (ip='{$_GET['ippic']}') order by olaviat ");
					elseif (isset($_GET['groupname']))
					{
					if (isset($_GET['groupname1']))
					$q3=mysql_query("select * from pic where (group_name='{$_GET['groupname']}' and group_name1='{$_GET['groupname1']}') order by olaviat ");
					else
					$q3=mysql_query("select * from pic where (group_name='{$_GET['groupname']}') order by olaviat ");
					}
					elseif (isset($_POST['nambook']))
					{
					$q='onvan';
					$qq=$_POST['nambook'];
					$q3=mysql_query("select * from pic where ($q like'%$qq%') order by olaviat ");
					}
					else
					$q3=mysql_query("select * from pic order by olaviat ");
					while($cd3=mysql_fetch_assoc($q3))
					{
					if ($opp==2 or $opp==4 or $opp==6 or $opp==8 or $opp==10 or $opp==12 or $opp==14 or $opp==16 or $opp==18 or $opp==20 or $opp==22 or $opp==24
					or $opp==26 or $opp==28 or $opp==30 or $opp==32 or $opp==34 or $opp==36 or $opp==38 or $opp==40 or $opp==42 or $opp==44 or $opp==46
					or $opp==48 or $opp==50 or $opp==52 or $opp==54 or $opp==56 or $opp==58 or $opp==60 or $opp==62 or $opp==64 or $opp==66 or $opp==68
					or $opp==70 or $opp==72 or $opp==74 or $opp==76 or $opp==78 or $opp==80 or $opp==82 or $opp==84 or $opp==86 or $opp==88 or $opp==90
					or $opp==92 or $opp==94 or $opp==96 or $opp==98 or $opp==100 or $opp==102 or $opp==104 or $opp==106 or $opp==108 or $opp==110 or $opp==112
					or $opp==114 or $opp==116 or $opp==118 or $opp==120 or $opp==122 or $opp==124 or $opp==126 or $opp==128 or $opp==130 or $opp==132 or $opp==134
					or $opp==136 or $opp==138 or $opp==140 or $opp==142 or $opp==144 or $opp==146 or $opp==148 or $opp==150 or $opp==152 or $opp==154 or $opp==156
					or $opp==158 or $opp==160 or $opp==162 or $opp==164 or $opp==166 or $opp==168 or $opp==170 or $opp==172 or $opp==174 or $opp==176 or $opp==178
					or $opp==180 or $opp==182 or $opp==184 or $opp==186 or $opp==188 or $opp==190 or $opp==192 or $opp==194 or $opp==196 or $opp==198 or $opp==200
					or $opp==202 or $opp==204 or $opp==206 or $opp==208 or $opp==210 or $opp==212 or $opp==214 or $opp==216 or $opp==218 or $opp==220 or $opp==222)
					{
					echo "</tr>";
					}
					$txt11=substr($cd3['sharh'],0,110);
					?>
					<td align="center" valign="top" height="70" width="50%"><br/>
					<?php	echo "<span style='font-family:B Nazanin;font-size:15pt'><b>".$cd3['onvan'].'</span><br/>';
					if (isset($_GET['ippic']))
					{
					?>
					<img src="images/book_know/<?php echo $cd3['name']; ?>" height="280" width="200">
					<?php
					}
					else
					{
					    if (isset($_GET['groupname']))
					    {
					        ?>
					        <img src="images/book_know/<?php echo $cd3['name']; ?>" height="250" width="200">
					        <?php
					    }
					    else
					    {
					        ?>
					        <img src="images/book_know/<?php echo $cd3['name']; ?>" height="250" width="200">
					        <?php
					    }
					}
					?>
					<table width="100%">
					<?php
					if (isset($_GET['ippic']) AND $cd3['manba']!==" ")
					{
					?>
					<tr>
						<td align="right">
							<span>
								<a target="_blank" href="<?php echo $cd3['manba']; ?>"  target="_blank" >
								منبع:
								<?php echo $cd3['manba']; ?>
								</a>
							</span>
						</td>
					</tr>
					<?php
					}
					?>
					<tr>
						<td bgcolor="#FFFFFF" align='center'>
							<span  style="font-family:B Nazanin;font-size:14pt">
							<?php
							if (isset($_GET['ippic']))
							{
								?><textarea tabindex="4" name="matn" id="matn" cols="110" rows="10" readonly style="font-family:B Nazanin;font-size:14pt"><?php echo $cd3['sharh']; ?></textarea><?php
							}
							else
							{
								echo $txt11;	?>
								<a style="color:blue" href="index1.php?book=1&&ippic=<?php echo $cd3['ip']; ?>">ادامه مطلب...</a>
							<?php
							}
							?>
						</td>
					</tr>
					</table>

					</td>
					<?php
					$opp++;
					}
					?>

				</tr>
			</table>
			</div>
			<?php
			}
			elseif (isset($_GET['book6']))
			{
			?>
			<table border="0" align="center" width="100%" >
				<form action="index1.php" method="post">
				<tr>
					<td background="images/bcg12.jpg" colspan="2" align="center" height="55" valign="middle">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						جستجو براساس نام کتاب:
						<input type="text" name="nambook" size="15" style="font-family:B Nazanin;font-size:14pt">
						<button  tabindex="3" name="sub11" title="ورود"  type="submit" ><img src="images/12.png"  name="Add"  border="0" width="20" height="17" ></button>
					</td>
				</tr>
				</form>
				<tr>
					<td  align="center" >
						<table align="center" width="100%" border="0">
							<tr><td height="150"></td></tr>
							<tr>
								<td width="60"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=تفاسیر"  title="تفاسیر" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									 تفاسیر
									 </a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=فضائل"  title="فضائل" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									فضائل
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=احادیث"  title="احادیث" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									 احادیث
									 </a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=اخلاق"  title="اخلاق" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									 اخلاق
									 </a>
								</td>
								<td width="60"></td>
							</tr>
							<tr><td height="50"></td></tr>
							<tr>
								<td width="60"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=ادیان"  title="ادیان" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									ادیان
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=تفاسیر"  title="تفاسیر" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									عقاید
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=عقاید"  title="عقاید" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									علماء و رجال
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=فقه"  title="فقه" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									فقه
									</a>
								</td>
								<td width="60"></td>
							</tr>
							<tr><td height="50"></td></tr>
							<tr>
								<td width="60" ></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=ادبیات"  title="ادبیات" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									ادبیات
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=دائرة المعارف"  title="دائرة المعارف" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									دائرة المعارف
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1&groupname=تاریخ"  title="تاریخ" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									تاریخ
									</a>
								</td>
								<td width="40"></td>
								<td width="100" height="50" align="center" background="images/choob.jpg">
									<a href="index1.php?book=1"  title="لیست کلی" style="color:black;text-decoration:none">
									<span style="font-family:B Titr;font-size:16pt" onmouseover="this.style.color='blue'" onmouseout="this.style.color='black'">
									لیست کلی کتب
									</a>
								</td>
								<td width="60"></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<?php
			}
			else
			{
			?>
			<table border="0" align="center" width="80%">
				<tr>
					<td align="right" height="70">
						<br/>
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline1']; ?>
					</td>
				</tr>
				<tr align="right">
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline2']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline3']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline4']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline5']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline6']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline7']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline8']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline9']; ?>
					</td>
				</tr>
				<tr>
					<td align="right" height="50">
						<span style="font-family:B Nazanin;font-size:16pt"><b>
						<?php echo $cd2['homline10']; ?>
					</td>
				</tr>
			</table>
			<?php
			}
			?>
		</td>
		<td  rowspan="2" valign="top">
			<table width="100%" align="center" border="1"  onmouseover="this.style.backgroundColor='#<?php echo $abc['iconcolor2']; ?>';" onmouseout="this.style.backgroundColor='#<?php echo $abc['iconcolor1']; ?>';" bgcolor="#<?php echo $abc['iconcolor1']; ?>">
				<tr>
					<td align="center" valign="middle">
						<span style="font-family:B Nazanin;font-size:12pt"><b><?php echo $cd2['action1']; ?><BR/>
						<img src="images/action/1.jpg" height="160" width="70%" onmouseover="this.width=300;this.height=300" onmouseout="this.width=150;this.height=150"><BR/>
					</td>
				</tr>
				<tr>
					<td align="center">
						<span style="font-family:B Nazanin;font-size:12pt"><b><?php echo $cd2['action2']; ?><BR/>
						<img src="images/action/2.jpg" height="160" width="70%" onmouseover="this.width=300;this.height=300" onmouseout="this.width=150;this.height=150"><BR/>
					</td>
				</tr>
				<tr>
					<td align="center">
						<span style="font-family:B Nazanin;font-size:12pt"><b><?php echo $cd2['action3']; ?><BR/>
						<img src="images/action/3.jpg" height="160" width="70%" onmouseover="this.width=300;this.height=300" onmouseout="this.width=150;this.height=150"><BR/>
					</td>
				</tr>
				<tr>
					<td align="center">
						<span style="font-family:B Nazanin;font-size:12pt"><b><?php echo $cd2['action4']; ?><BR/>
						<img src="images/action/4.jpg" height="160" width="70%" onmouseover="this.width=300;this.height=300" onmouseout="this.width=150;this.height=150"><BR/>
					</td>
				</tr>
				<tr>
					<td align="center">
						<span style="font-family:B Nazanin;font-size:12pt"><b><?php echo $cd2['action5']; ?><BR/>
						<img src="images/action/5.jpg" height="160" width="70%" onmouseover="this.width=300;this.height=300" onmouseout="this.width=150;this.height=150"><BR/>
					</td>
				</tr>
			</table>
		</td>
		<td valign="top" height="750">
			<table width="100%" align="center" border="0">
				<tr align="center">
					<td width="20%"></td>
					<td align="center" height="750" width="60%"><br/><br/>
					<marquee onmouseover="this.stop()" onmouseout="this.start()" align="center"  scrollamount="2" scrolldelay="60" width="100%" direction="up" height="400" align="center">
					<?php
					$q3=mysql_query("select * from pic order by olaviat ");
					while($cd3=mysql_fetch_assoc($q3))
					{
					?>
					<?php	echo '<span style="font-family:B Nazanin;font-size:14pt"><b>'.$cd3['onvan'].'</span></b><br/>';	?>
					<img src="images/book_know/<?php echo $cd3['name']; ?>" height="150" width="80%"><BR/>
					<?php
					}
					?>
					</marquee>
					</td>
					<td width="20%"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="6" valign="top" align="right" height="150">
			<table width="100%" border="0">
				<tr background="images/bcg12.jpg">
					<td align="right" width="100%" >
						<span style="font-family:B Nazanin;font-size:13pt"><b>&nbsp;&nbsp;
						لینک ها :
					</td>
				</tr>
				<tr>
					<td align="right" width="100%">
					<table width="100%" align="center" border="1">
				<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount="3" scrolldelay="25" direction="up" height="70" align="center">
						<?php
						if (!$cd2['linkname1']==""){	echo "<a href=".$cd2['linkaddres1']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname1']."</a><br/><br/>";	}
						if (!$cd2['linkname2']==""){	echo "<a href=".$cd2['linkaddres2']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname2']."</a><br/><br/>";	}
						if (!$cd2['linkname3']==""){	echo "<a href=".$cd2['linkaddres3']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname3']."</a><br/><br/>";	}
						if (!$cd2['linkname4']==""){	echo "<a href=".$cd2['linkaddres4']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname4']."</a><br/><br/>";	}
						if (!$cd2['linkname5']==""){	echo "<a href=".$cd2['linkaddres5']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname5']."</a><br/><br/>";	}
						if (!$cd2['linkname6']==""){	echo "<a href=".$cd2['linkaddres6']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname6']."</a><br/><br/>";	}
						if (!$cd2['linkname7']==""){	echo "<a href=".$cd2['linkaddres7']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname7']."</a><br/><br/>";	}
						if (!$cd2['linkname8']==""){	echo "<a href=".$cd2['linkaddres8']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname8']."</a><br/><br/>";	}
						if (!$cd2['linkname9']==""){	echo "<a href=".$cd2['linkaddres9']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname9']."</a><br/><br/>";	}
						if (!$cd2['linkname10']==""){	echo "<a href=".$cd2['linkaddres10']." target='_blank'  style='text-decoration:none;color:black;font-family:B Nazanin;font-size:13pt'><b>".$cd2['linkname10']."</a><br/><br/>";	}
						?>
				</marquee>
					</table>
					</td>
			</table>
            <?php
 if($_GET[msg]=='1')
   {
     echo"<script>alert('نام کاربری یا رمز عبور اشتباه می باشد');</script>";
     echo"<script>window.location='index.php'</script>";
   }
   if($_GET[notime]=='1')
   {
     echo"<script>window.alert('زمان عضویت شما به پایان رسیده است. برای تمدید عضویت به کتابخانه مراجعه فرمایید');</script>";
     echo"<script>window.location='index.php'</script>";
   }
?>
		</td>
	</tr>
</table>
</body>
</html>