/** * Returns the Associations object that holds the associations * data for the called class. * * @return Associations */ public function getAssociations() { return Associations::forClass(get_called_class()); }
function show_doc_sub_block($dupes = array()) { $assocs = new Associations(); $delopts = new Associations(); $assocs->load_by_service_and_table($_REQUEST["svc"], "size"); $delopts->load_by_service_and_table($_REQUEST["svc"], "delivery"); if (count($delopts->items)) { printf("<tr><td class=\"order_heading\">Document Submission</td></tr>"); printf("<tr><td class=\"order_detail\">"); printf("<table id=\"dupe_table\" width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">"); printf("<thead>"); printf("<tr>"); printf("<td class=\"style20\">FILE SUBMISSION</td>"); if ($_REQUEST["svc"] != 6) printf("<td align=\"center\" class=\"style20\">SIZES</td>"); printf("</tr>"); printf("</thead>"); printf("<tbody>"); printf("<tr>"); printf("<td style=\"border-top:solid 1px rgb(83,121,164)\">"); printf("<select name=\"delivery[]\" class=\"style4\" id=\"delivery0\" >"); printf("<option value=\"\">*** SELECT ***</option>"); foreach ($delopts->items as $a) { printf("<option value=\"%s\" %s>%s</option>", $a->target->code, ($_REQUEST["sizes"][$i] == $a->target->code ? "selected" : ""), $a->target->descr); } printf("</select>"); printf("<span id=\"filewrap0\"><input type=\"hidden\" name=\"delfile[]\" id=\"delfile0\" value=\" \"></span>"); printf("</td>"); printf("<td align=\"center\" style=\"border-top:solid 1px rgb(83,121,164)\">"); //don't show sizes for scanning if ($_REQUEST["svc"] != 6) { printf("<select name=\"sizes[]\" class=\"style4\" id=\"sizes0\">"); foreach ($assocs->items as $a) { printf("<option value=\"%s\" %s>%s</option>", $a->target->code, ($_REQUEST["sizes"][$i] == $a->target->code ? "selected" : ""), $a->target->descr); } printf("</select>"); } printf("</td>"); printf("</tr>"); printf("</tbody>"); printf("<tfoot>"); printf("<tr><td colspan=\"5\"> </td></tr>"); printf("<tr><td colspan=\"5\">"); printf("<i>If your originals are being picked up by Soho, please remember to include a printout of this order with the package.</i>"); printf("</td></tr>"); if ($_REQUEST["svc"] == 5) { printf("<tr><td colspan=\"5\">"); printf("<i>For Copy Shop orders, only PDF files may be submitted. We do not accept Microsoft Word documents.</i>"); printf("</td></tr>"); } printf("</tfoot>"); printf("</table>"); printf("</td></tr>"); } }