Current File : /home/inlingua/www/sensoriumpsychologists.com/backup/franchise_between/accounts_banks_funcs.php |
<?php
require_once("../../franchise_back/database_func.php");
class accounts_funcs
{
private $branch;
private $name,$item_name,$created_by,$created_browser,$created_ip,$updated_by,$updated_browser,$updated_ip,$updated_date;
public function __construct()
{
$this->branch="";
$this->name="";
$this->item_name="";
$this->created_by="";
$this->created_browser="";
$this->created_ip="";
$this->updated_by="";
$this->updated_browser="";
$this->updated_ip="";
$this->updated_date="0000-00-00 00:00:00";
}
public function set_value($variable_name,$new_value)
{
switch($variable_name)
{
case 'branch':$this->branch=$new_value;break;
case 'name':$this->name=$new_value;break;
case 'item_name':$this->item_name=$new_value;break;
case 'created_by':$this->created_by=$new_value;break;
case 'created_browser':$this->created_browser=$new_value;break;
case 'created_ip':$this->created_ip=$new_value;break;
}
}
public function view_all_banks_select()
{
$columns_array=array("table_id","name");
$table_name="shristi_banks";
$conditions=" ORDER BY name ";
$mysql_obj=new mysql_functions_class;
$mysql_obj->open_connection();
$res=$mysql_obj->select_simple($table_name,$columns_array,$conditions);
while($detail=$res->fetch_assoc())
{
echo("<option value=\"".$detail['table_id']."\">".$detail['name']."</option>");
}
$mysql_obj->close_connection();
}
public function get_admission_fees()
{
$columns_array=array("amount");
$table_name="shristi_fees_structure";
$conditions=" WHERE fees_type='admission'";
$mysql_obj=new mysql_functions_class;
$mysql_obj->open_connection();
$res=$mysql_obj->select_simple($table_name,$columns_array,$conditions);
$mysql_obj->close_connection();
if($res->num_rows==1)
{
$detail=$res->fetch_assoc();
$admission_fees=$detail['amount'];
return $admission_fees;
}
else
{
echo("Error : Couldn't fetch fees structure..Please contact administrator");
exit();
}
}
}
?>