Commit 525354f3 authored by Langston Ball's avatar Langston Ball

Refs #2797 - Fix issue with qorbiter not returning images by correcting php calls to the database.

parent 79bda144
Pipeline #682 passed with stage
in 58 seconds
......@@ -5,7 +5,7 @@ $con= mysqli_connect("localhost", $user, $pass); // connection
if (!$con) { die('Could not Connect'.mysqli_error($con)); //error messaging
$connMessage="Fail";
print_r($connMessage);
print_r($connMessage);
};
if ($con) { mysqli_select_db($con, "pluto_media") or die(mysqli_error($con)); //connect to media db or error out
$connMessage="Conn Good";
......@@ -25,7 +25,7 @@ else if ($test=="atr"){
}
else if($test=="imdb"){
imdbImage($_GET['file'],36);
imdbImage($con, $_GET['file'],36);
}
else if ($test==="screensaver"){
screensaverImg($val);
......@@ -47,7 +47,7 @@ function attributeImage($fileName, $atr){
}
function imdbImage($imdbID, $type ){
function imdbImage($connect, $imdbID, $type ){
$filemarker = substr_replace($imdbID, "", 0, 2);
......@@ -65,8 +65,9 @@ $sql ="SELECT File_Attribute.FK_File, Picture.PK_Picture, Picture.Extension, Fil
.$filemarker
." && Attribute.FK_AttributeType=".$type;
$cleansql = mysqli_real_escape_string($sql);
$res=mysqli_query($cleansql) or die("mysql error");
$cleansql = mysqli_real_escape_string($connect, $sql);
$res=mysqli_query($connect, $cleansql) or die( "MySQL error ".mysql_errno().": ".mysql_error($connect)."\n<br>When executing:<br>\n$res\n<br>" );
while($row = mysqli_fetch_array($res)){
$file=$row['PK_Picture'].".".$row['Extension'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment