added print files view and delete
This commit is contained in:
@@ -463,4 +463,31 @@ class AdminModel extends Model
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectGroupPrintFiles(){
|
||||
$i = DB::select("SELECT ppl.TemplateCode, t.TemplateName, s.SportsName, tc.Category
|
||||
FROM print_pattern_list AS ppl
|
||||
INNER JOIN templates AS t ON t.TemplateCode = ppl.TemplateCode
|
||||
INNER JOIN sports AS s ON s.Id = t.SportsId
|
||||
INNER JOIN template_categories AS tc ON tc.Id = t.Category
|
||||
GROUP BY ppl.TemplateCode");
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectPrintFiles($tempCode){
|
||||
$i = DB::select("SELECT t.TemplateName, ppl.Id, ppl.Path, ppl.`Type`, ppl.Size from templates AS t
|
||||
INNER JOIN print_pattern_list AS ppl ON ppl.TemplateCode = t.TemplateCode
|
||||
WHERE t.TemplateCode = '$tempCode'
|
||||
ORDER BY ppl.`Type` ASC");
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function deletePrintFiles($id){
|
||||
$i = DB::table('print_pattern_list')
|
||||
->where("Id", $id)
|
||||
->delete();
|
||||
return $i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user