connection = false; $this->result = false; $this->record = false; $this->error = false; } function connect() { if ($this->persistent) $this->connection = mysql_pconnect($this->host,$this->user,$this->password); else $this->connection = mysql_connect($this->host,$this->user,$this->password); if (!is_resource($this->connection)) { return false; } if(!$this->select_db()) { return false; } return true; } function select_db() { if (!is_resource($this->connection)) { return false; } if (!mysql_select_db($this->database, $this->connection)) { return false; } return true; } function query($sql = '') { $this->result = mysql_query($sql,$this->connection) or die(mysql_error()); if (!$this->result) return false; else return true; } function count_rec($table , $field_id, $field_id_value, $where_clause) { if($where_clause){ $sql = "SELECT count(*) from $table "; //. $where_clause; } else{ $sql = "SELECT count(*) from $table where $field_id=$field_id_value"; } $count=@mysql_fetch_array(mysql_query($sql)); return $count[0]; } function count_rec_simple($table , $field_id, $field_id_value, $where_clause) { if($where_clause){ $sql = "SELECT count(*) from $table $where_clause "; //. $where_clause; } else{ $sql = "SELECT count(*) from $table"; } $count=mysql_fetch_array(mysql_query($sql)); return $count[0]; } function fetch_array() { if ($this->result) { $this->record = mysql_fetch_array($this->result); if (!$this->record) return false; else return true; } return false; } function affected_rows() { return mysql_affected_rows($this->connection); } function num_rows() { return mysql_num_rows($this->result); } function getmax($table,$field) { if(!$this->query("SELECT max($field) FROM $table")) return false; if(!$this->fetch_array()) return false; return $this->record[0]; } function get_sum($table,$field) { if(!$this->query("Select sum($field) From $table")) return false; if(!$this->fetch_array()) return false; return $this->record[0]; } function last_insert_id() { return mysql_insert_id(); } function update_field($table, $update_field, $update_field_value, $id_field, $id_field_value) { $sql = "UPDATE $table SET $update_field='$update_field_value' WHERE $id_field = '$id_field_value'"; if(!$this->query($sql)) return false; return true; } function update_num_field($table, $update_field, $update_field_value, $id_field, $id_field_value) { $sql = "UPDATE $table SET $update_field=$update_field_value WHERE $id_field = '$id_field_value'"; if(!$this->query($sql)) return false; return true; } function increment_field($table, $increment_field, $id_field, $id_field_value) { $sql = "UPDATE $table SET $increment_field=$increment_field+1 WHERE $id_field = '$id_field_value'"; if(!$this->query($sql)) { return false; } return true; } function insert_field($table, $field, $value) { $sql = "INSERT INTO $table ($field) VALUES ($value)"; if(!$this->query($sql)) return false; return true; } function exist($table, $field, $field_value,$where_clause=false) { if($where_clause) $sql = "SELECT * FROM $table ".$where_clause; else $sql = "SELECT $field FROM $table WHERE $field = '$field_value'"; if(!$this->query($sql)) return false; if(!$this->fetch_array()) return 0; return true; } function return_field($table, $field_id, $field_id_value, $field_text, $where_clause=false) { if($where_clause) $sql = "SELECT $field_text FROM $table ".$where_clause; else $sql = "SELECT $field_text FROM $table WHERE $field_id = '$field_id_value'"; if(!is_resource($this->connection)) { if(!$this->connect()) { return false; } } if(!$this->query($sql)) { return false; } if(!$this->fetch_array()) { return false; } return $this->record[0]; //die("Connection Problem 15"); return false; } function free_result() { @mysql_free_result($this->result); $this->result = false; $this->record = false; return true; } function close() { @mysql_close($this->connection); return true; } function __destruct() { $this->close(); $this->host = NULL; $this->user = NULL; $this->password = NULL; $this->database = NULL; $this->persistent = NULL; $this->connection = NULL; $this->result = false; $this->record = false; } function get_array($table, $field_id, $field_text,$where='',$defaultval='',$defaultshow='') { $sql = "SELECT $field_id, $field_text FROM $table $where"; $this->query($sql); $values = array(); $count = 1; //print "
$sql";
		if($defaultval!=''){
				$code_values .= $defaultval . ",";
		        $user_values .= $defaultshow . ",";
			}
		while($this->fetch_array())
		{
		    //print mysql_num_rows($this->result) . "
"; //print $count . "
"; if($defaultval!='' && mysql_num_rows($this->result) == $count) { $code_values .= $this->record[0]; $user_values .= $this->record[1]; } else { $code_values .= $this->record[0] . ","; $user_values .= $this->record[1] . ","; } $count++; } $values[0] = $code_values; $values[1] = $user_values; return $values; } function get_column($table, $field, $where='') { $sql = "SELECT $field FROM $table $where"; $this->query($sql); $values = array(); //print "
$sql";
		while($this->fetch_array()){
			$values[] = $this->record[0];
		
		}
		return $values;
		
    }

    
    function get_assoc($sql)
    {   
		if(!$this->query($sql))
		{
			return false;
		}
		else
		{
			$count = 0;
			$array = array();
			while ($row = mysql_fetch_assoc($this->result))
			{
			   $array[$count++] = $row;
			}
			return $array;
		}
    }    



    function get_assoc2($sql)
    {   
		if(!$this->query($sql))
			return false;
		else
			return mysql_fetch_assoc($this->result);
    }    

}
?>




Islamic Tasawwuf



 





















	

Contact Us

Adarah Naqshbandiah Owaisiah

Mehmoodabad colony Ferdousiah St.
Khanewal Rd. Multan Pakistan

Mobile :+92-300-8445232
+92-308-7404600
E-mail : info@islamictasawwuf.com

Please complete the following information.

Islamic Tasawwuf

Name$name_c
Email$email_c
Phone$phone_c
Comment$comment_c
"; //--------------- $realname = 'Islamic Tasawwuf'; $sendermail = 'info@islamictasawwuf.com'; //$sendermail = 'sadia@dev.controloye.com'; $headers = "From: $realname<$sendermail>\nReply-To: $realname<$sendermail>\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $email_func = mail($to,$subject, $message, $headers); $msg = 'We have saved your comments Thank you for visiting here...!!'; } ?>
Name
Email
Phone
Comment
 

Audio

Articles

Videos

" ; } $imh++ ; } echo "" ; ?>