ok
Direktori : /home/importfo/public_html/importfolio.in/admin/ |
Current File : //home/importfo/public_html/importfolio.in/admin/function.php |
<?php function SelectTableRecords($fild1=null,$fied2=null){ include("config.php"); $query="SELECT * FROM cate"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['cat_id']]=$row['c_name']; } return $data; } function machincate($fild1=null,$fied2=null){ include("config.php"); $query="SELECT * FROM cate"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['slug']]=$row['c_name']; } return $data; } function application($fild1=null,$fied2=null){ include("config.php"); $query="SELECT * FROM `spare_parts` WHERE s_id"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['s_id']]=$row['spare_name']; } return $data; } function machinparts($fild1=null,$fied2=null){ include("config.php"); $query="SELECT * FROM `spare_cat_main`"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['spare_id']]=$row['status']; } return $data; } function machinsubparts($fild1=null,$fied2=null){ include("config.php"); $query="SELECT * FROM `spare_parts`"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['s_id']]=$row['spare_name']; } return $data; } function parts($fild1=null,$fied2=null,$fied3=null){ include("config.php"); $query="SELECT * FROM `spare_cat_main`"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['machin_slug']]=$row['machine_name']; } return $data; } function parts1($fild1=null,$fied2=null,$fied3=null){ include("config.php"); $query="SELECT * FROM `spare_cat_main` where status='Therapy'"; $result = mysqli_query ($db,$query); //print_r($result); die; while ( $row = mysqli_fetch_array($result)) { $data[$row['machin_slug']]=$row['machine_name']; } return $data; } function compress($source, $destintion, $quality){ $info = getimagesize($source); if ($info['mime'] == 'image/jpeg') { $image = imagecreatefromjpeg($source); } else if($info['mime'] == 'image/png') { $image = imagecreatefrompng($source); } else if($info['mime'] == 'image/jpg') { $image = imagecreatefromjpg($source); } imagejpeg($image,$destintion,$quality); return $destintion; } ?>