new class Ssettings to get videopath from db
add test - failing remove useless videopath and tvpath from app.js
This commit is contained in:
		
							
								
								
									
										22
									
								
								api/SSettings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								api/SSettings.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
class SSettings
 | 
			
		||||
{
 | 
			
		||||
    private $database;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * SSettings constructor.
 | 
			
		||||
     */
 | 
			
		||||
    public function __construct() {
 | 
			
		||||
        $this->database = Database::getInstance();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getVideoPath() {
 | 
			
		||||
        $query = "SELECT video_path from settings";
 | 
			
		||||
 | 
			
		||||
        $result = $this->database->getConnection()->query($query);
 | 
			
		||||
 | 
			
		||||
        $r = mysqli_fetch_assoc($result);
 | 
			
		||||
        return $r['video_path'];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user