On this code $appendPath
was created for myFieldName['filename']
How would I add $appendimagePath
to this code for myFieldName['visual']
?
$result = mysql_query($sql);
//print $sql;
if($result){
$line = mysql_fetch_assoc($result);
$myFile = $line[$myFieldName['filename']];
if(file_exists($myFile)){
pushfile($myFile, $action);
} else {
echo ("&retval=error 1 : file doesn't exist"." ".$_REQUEST['theID']);
}
} else {
echo "&retval=error 2 : No results from query!";
}
exit;
} else {
$count=0;
$sendback = "";
$AmyDataSetup = array();
$AqueryValues = explode("|", $queryValue);
for($i=0;$i<sizeof($AqueryValues);$i++){
$query = "SELECT * FROM ".$table_files." WHERE file like '%.mp3' ";
$result = mysql_query($query);
if($result){
while ($line = mysql_fetch_assoc($result)) {
$lineClean = array();
foreach($line as $key=>$value){
if($count==0){
array_push($AmyDataSetup, $key);
}
if($key == $myFieldName['filename']){
if($forceTrailingSlash){
$myFile = forceTrailingSlash($appendPath).$value;
} else {
$myFile = @$appendPath.$value;
}
if(@$appendField != ''){
if($forceTrailingSlash){
$myFile = forceTrailingSlash(@$line[@$appendField]).$value;
} else {
$myFile = @$line[@$appendField].$value;
}
}
$lineClean[] = rawurlencode($myFile);
} else {
$lineClean[] = rawurlencode($value);
}
}
$sendback .= "&item$count=".implode("|", $lineClean);
$count++;
}
}
}
$myDataSetup = implode("|", $AmyDataSetup);
@mysql_free_result($result);
mysql_close($link);
$sendback .= "&totalitems=$count";
$sendback .= "&datasetup=$myDataSetup";
$sendback .= "&my_filename=".$myFieldName['filename'];
$sendback .= "&my_artist=".$myFieldName['artist'];
$sendback .= "&my_title=".$myFieldName['title'];
$sendback .= "&my_visual=".$myFieldName['visual'];
$sendback .= "&my_link=".$myFieldName['link'];
$sendback .= "&my_id=".$myFieldName['uniqueID'];
print ("$sendback");
}
?>