<?
include("header.html");

error_reporting(0); ini_set('display_errors', 0);
@header('Content-type: text/html;charset=windows-1256');
$server = "localhost";

$username = "user_name";

$password = "bass";

$database = "database";

//2552090_vbpdb53.awardspace.net
/*foreach($_GET as $KEy => $VAl){$$KEy=htmlspecialchars(strip_tags(addslashes($VAl))); }
foreach($_POST as $KEy => $VAl){$$KEy=htmlspecialchars(strip_tags(addslashes($VAl))); }
*/

$file = basename(str_replace(' ','_',$_GET[file]).'.'.$_GET[ext]);
$con = mysql_connect($server,$username,$password);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db($database, $con);
echo '<form>';

/*$Y = date ("Y");
  $D = date("d"); 
$M = date("m");
		*/
   /* if($city){
         $result=mysql_query("SELECT * FROM `citiestable` where cityNO=$city limit 1");
         $row = mysql_fetch_array($result, MYSQL_BOTH);

      include('./Salat.class.php');
      $Ar = new Salat;

      $Ar->setLocation($row[latitude],$row[longitude],$row[timeZone]);
      $Ar->setDate($D,$M,$Y);
      
      $times = $Ar->getPrayTime();

      echo '<b>'.$row[cityName].'</b><br />';
      echo date('l F j, Y').'<br /><br />';


   echo "[$row[dy]-$row[mo]-$row[yr]]".'<br /><br />';
      echo "<b class=hilight>Fajr:</b> {$times[0]}<br />";
      echo "<b class=hilight>Sunrise:</b> {$times[1]}<br />";
      echo "<b class=hilight>Zuhr:</b> {$times[2]}<br />";
      echo "<b class=hilight>Asr:</b> {$times[3]}<br />";
      echo "<b class=hilight>Maghrib:</b> {$times[4]}<br />";
      echo "<b class=hilight>Isha:</b> {$times[5]}<br />";
  }else if($country) {
        $result=mysql_query("SELECT * FROM `citiestable` where countryNO=$country");
    echo '<select name="city" size="1">';
	while ($row = mysql_fetch_array($result, MYSQL_BOTH))
    echo '<option value="'.$row[cityNO].'">'.$row[cityName].'</option>';
    echo '</select>';
    }else{
    $result=mysql_query("SELECT * FROM `countriestable`");
    echo '<select name="country" size="1">';
	while ($row = mysql_fetch_array($result, MYSQL_BOTH))
    echo '<option value="'.$row[countryNO].'">'.$row[countryName].'</option>';
    echo '</select>';

     }
*/

include_once("examples/hejri_calendar.php");
include_once("examples/kkk.php");
include('./Salat.class.php');

/*if ($time >=  date('00:13') AND 
$time <= date('23:59')) {
*/
	//$zdd = ("$zd-$zm");
	$zdd = ("$hd-$hm");
//$sari =  $vbulletin->userinfo['email'];
//$sari = $member['userid'];
//$userid = $this->post[userid];
//include_once("block/ahdath.php");
//include_once("block/azzan_functionss.php");
//$newusername = $getnewestmember['username'];  
//$today = date('m-d',TIMENOW);
//$today = hjdate('hj:I F-d',TIMENOW);
$ids = '0';
//$usergroupid = "1,2,3,4,5,6";

if($id){
// $uss = "1,2,3,4,5,6"; postusername
$result = mysql_query("
	SELECT sari
,post
,zo
	FROM rafia_ehdaa 
	WHERE  id= '$id' ");
	while($row = mysql_fetch_array($result)){
//$zdd =  $row['zo']; 
 $sari =  $row['sari']; 
extract($row);
 //$row = $apt->dbarray($result);
 //$id = $row['id'];
 //$row2 = $apt->dbarray($result2);
if($row)
{
$sari =  $row['sari']; 
     $row['sari']; 
$zo =  $row['zo']; 
       $row['post'];  
    // $row['zm'];
}}
}
/*$post = array( 'post_type' => 'portfolio_item',
 'posts-per-page' => 30, );
// $post = new WP_Query( $post); 
*/
//$sari  =  $json_django.utils.html($sari);
//$sari   = $_POST->format_data($sari);

//global $apt;
//global $_POST,$sari;
 /* $sari = stripslashes(check_html($post["sari"]));
$sari =$this->format_html_post($this->post->sari['sari']); 
$sari 	= $_POST->format_data(trim($_POST->post["sari"]));
  $sari =$_POST_format_html["sari"]; 
 $sari = $post($zb);
$sari= $algdeerclass->format_html_post($algdeerclass->post['sari']); */
$files = basename(str_replace(' ','_',$_GET[gd]).'.'.$_GET[gyy]);
$file_name = $_GET[file];
$d= $_GET[d];
if ($d=="0"){$rr="السبت";}
elseif ($d=="1"){$rr="الاحد";}
elseif ($d=="2"){$rr="الاثنين";}
elseif ($d=="3"){$rr="الثلاثاء";}
elseif ($d=="4"){$rr="الاربعاء";}
elseif ($d=="5"){$rr="الخميس";}
elseif ($d=="6"){$rr="الجمعة";}
$dys="$gy-$gm-$gd";
 // $hd= str_replace('.','',$hd);
echo  $zo ,$sari ,'<br>',$dys,'<br>',$id;

echo '<img src="'.$post.'"/>';
$deo="$post";
   // var $methodParams = array();

//@extract ($_POST);
//@extract ($_GET);
//$deo='<img src='.$deo.'/>';
//	global $ar;
//$sari  = $htmlspecialchars($post['sari']); 
echo  $rr;
include_once("hejri_calendar.php");
echo 
"<table width=75% cellpadding=2 cellspacing=0 border=1 class=blockrow><tr class=blockhead><td align=center><normalfont>الفجر</font></td><td align=center><normalfont>ألشروق</font></td><td align=center><normalfont>ألظهر</font></td><td align=center><normalfont>العصر</font></td><td align=center><normalfont>ألمغرب</font></td><td align=center><normalfont>ألعشاء</font></td></tr><tr class=blockrow><td align=center><normalfont>$fajr_prayer</font></td><td align=center><normalfont>$Shrouk_prayer</font></td><td align=center><normalfont>$zuhr_prayer</font></td><td align=center><normalfont>$asr_prayer</font></td><td align=center><normalfont>$maghrib_prayer</font></td><td align=center><normalfont>$esha_prayer</font></td></tr></table></center>",'<br>';
/*echo '<input type="submit" name="go" value="GO" /></form>';
*/
//$sari = $htmlspecialchars($sari);
session_start(); 

require_once('view_users.php');

if ($user_id =="1" and $bass =="nms"){
//apt->
$id ="$zb";
$Upda_news = mysql_query("UPDATE rafia_ehdaa SET zo='$zo', sari='$sari' WHERE id='$id' ");
}elseif ($user_id =="1" and $bass =="nmss"){
//$id ="";
$inn= mysql_query("insert into rafia_ehdaa (post,zo,zb,sari,name,time,ip,allow) values('$post','$zo','$zb','$sari','$name','$time','$ip','$allow')");
}else {echo "لاتنلك صلاحية";}
/*$_POST[] = array(
    'sari'=>'value',
    'lastname'=>'value',
    'email'=>'value',
    'address'=>'value'
        );
*/
//$first_name = mysqli_real_escape_string($db, $_POST['firstname']);
include("footer.htm");
//percent encoded
?>
/**/ 
<form action="index.php" type="text"  align="left"  method="post"> <br>
zb â€کذµâ€”:<input type="text" value="<?php echo $zb ?>" name="zb" size="4">
zo آ«ذ±آ ذ¶آ«ذپر‘ ذ³ذ‹ذ±آ« 7-8  آ«ذ±آ«ذ¶ذ± ذ³ذ´ آ«ذ±ذ½â€‌آ«â€” ذ½ذ¶ذ³: <input type="text" value="<?php echo $zo?>" name="zo" size="4">
bass آ«ذ±آ»آ«â€‌ذ¶â€”ر•:<input type="text" value="<?php echo $bass?>" name="bass" size="4">
 hdth آ«ذ±ذŒر•ذ‹ ذ½ر‘آ»ذ± آ«رڈذ¶آ«ر• ذµآ ذ³ذ±:<textarea type="textarea" height="500"  value="<?php echo $post_format_html['sari'];?>" name="sari" size="24" height="500"></textarea>

	<input type="submit" = value="Make Timetable">

</form>
