0) { if ($inDB == 'Y') $query = "UPDATE wallpapers SET school_num = $school_num,category = $category WHERE thumbnail = '$thumbnail'"; else $query = $table->BuildInsert(); db_query($query); } else { // If this image is in the db then remove it to unassign it if ($inDB == 'Y') { db_query("DELETE FROM wallpapers WHERE thumbnail = '$thumbnail'"); } } } $form_message = getLanguageText('RECORD-UPDATED-MSG'); $naction = "view"; break; default: $naction = "view"; break; } // // List all records if naction is "view" // if ($naction == "view") { $scriptName = str_replace("/m/data1/app.hotlunches.net/","",__FILE__); include "help.docs.php"; // Get list of images to display // $query = "SELECT wc.category_title,w.* " . // "FROM wallpapers AS w, wallpaper_categories AS wc " . // "WHERE wc.record_num = w.category " . // "AND school_num IN (0,$school_num) " . // "ORDER BY category_title,thumbnail"; // $results = db_query($query); ?>
0) { $row = db_fetch_array($results); $schoolNum = $row['school_num']; $catNum = $row['category']; $inDB = 'Y'; } ?>