Example #1
0
 public static function OutputLogoImages()
 {
     $stdout = "";
     // ------------------------------------------------------------------------
     // Output drop-down list
     // ------------------------------------------------------------------------
     $stdout .= event::outputEventDropdown(array(), "logotype images", "", true);
     // ------------------------------------------------------------------------
     if (!isset($_REQUEST["confid"]) || empty($_REQUEST["confid"])) {
         return $stdout;
     }
     // ------------------------------------------------------------------------
     // GPC
     // ------------------------------------------------------------------------
     // Must be after call to event::outputEventDropdown() where $GLOBALS["confid"] is set.
     if (!isset($GLOBALS["confid"])) {
         functions::gpc_declare_input("confid", array(), false);
     }
     // Enforce only single event
     $confid = is_array($GLOBALS["confid"]) ? current($GLOBALS["confid"]) : $GLOBALS["confid"];
     // ------------------------------------------------------------------------
     // Obtain data
     // ------------------------------------------------------------------------
     $event = self::getEventByAgendaid($confid);
     if (!is_array($event)) {
         return $stdout . PADDED_HR . "<div class='box error padding background'>" . "<strong>The event you selected does not exist</strong>. Please select another event." . "</div>\r\n";
     }
     $img_path[103] = $event["image"];
     $img_path[206] = str_replace($event["subpath"], "206/" . $event["subpath"] . "_206", $event["image"]);
     foreach ($img_path as $key => $path) {
         $img[$key] = file_exists(INCLEVEL . $path) ? "<p><a href='" . $path . "'><strong>" . $path . "</strong></a></p>\r\n" . "<p><a href='" . $path . "'><img src='" . $path . "' alt=''></a></p>\r\n" : "<em>This file does not exist</em>";
     }
     $stdout .= PADDED_HR . "<h2 class='bottommargin'>" . $event["title"] . "</h2>\r\n" . "<div class='col c1of2'>\r\n" . "  <h4>Logo size: 103 x 103 px</h4>\r\n" . "  <p>" . $img[103] . "</p>\r\n" . "</div> <div class='col c2of2 divider'>\r\n" . "  <h4>Logo size: 206 x 206 px</h4>\r\n" . "  <p>" . $img[206] . "</p>\r\n" . "</div><div style='clear:both'><br></div>\r\n";
     return $stdout;
 }