예제 #1
0
function simple_table_format_cell($index, $row, $name)
{
    $val = errorOnEmpty(htmlspecialchars($row[$name]), $name);
    // special cases
    if ($name == 'layout_owner_lastname') {
        $val = errorOnEmpty(htmlspecialchars($row["layout_owner_firstname"] . " " . $row["layout_owner_lastname"]), "name");
    } else {
        if ($name == 'layout_owner_firstname') {
            return;
        } else {
            if ($name == 'layout_photo_url') {
                $val = '<a href="' . $row[$name] . '">Description & Photos</a>';
            } else {
                if ($name == 'layout_dispatched_by1') {
                    if (strlen($row['layout_dispatched_by2']) > 0) {
                        $val = errorOnEmpty(htmlspecialchars($row["layout_dispatched_by1"] . "/" . $row["layout_dispatched_by2"]), "dispatch");
                    }
                } else {
                    if ($name == 'layout_dispatched_by2') {
                        return;
                    }
                }
            }
        }
    }
    echo "  <td>\n";
    echo "    <span class=\"et-" . $name . "\">\n";
    echo "      <a name=\"" . $row[$name] . "\"></a>\n";
    echo "     " . $val;
    echo "      </span> \n";
    echo "  </td>\n";
}
예제 #2
0
 public function format_subitem($result, $i, $url = NONE)
 {
     global $event_tools_href_add_on;
     // layout on layout tour
     // line 2 - scale, owner name, layout name (links)
     echo "<tr class=\"et-tour-layout-tr2\">\n";
     echo "<td class=\"et-tour-td1\"><span class=\"et-tour-layout-scale\">" . errorOnEmpty(htmlspecialchars(mysql_result($result, $i, "layout_scale")), "scale") . "</span></td>\n";
     echo "<td colspan=\"3\" class=\"et-tour-td2\"><span class=\"et-tour-layout-owner\">" . "<a href=\"" . $url . mysql_result($result, $i, "layout_id") . "\">" . htmlspecialchars(mysql_result($result, $i, "layout_owner_firstname")) . " " . htmlspecialchars(mysql_result($result, $i, "layout_owner_lastname")) . "</a></span></td>\n";
     echo "<td colspan=\"4\" class=\"et-tour-td3\"><span class=\"et-tour-layout-name\">" . "<a href=\"" . $url . mysql_result($result, $i, "layout_id") . "\">" . warnOnEmpty(htmlspecialchars(mysql_result($result, $i, "layout_name")), "layout name") . "</a></span></td>\n";
     echo "</tr>\n";
     // line 3 - size, scenery, control, access, url
     echo "<tr class=\"et-tour-layout-tr3\">\n";
     echo "<td class=\"et-tour-td1\"><span class=\"et-tour-layout-size\">" . warnOnEmpty(htmlspecialchars(mysql_result($result, $i, "layout_size")), "size") . "</span></td>\n";
     $scenery = warnOnEmpty(htmlspecialchars(mysql_result($result, $i, "layout_scenery")), "scenery");
     if (mysql_result($result, $i, "layout_scenery") != '') {
         $scenery = 'Scenery: ' . $scenery;
     }
     echo "<td class=\"et-tour-td2\"><span class=\"et-tour-layout-scenery\">" . $scenery . "</span></td>\n";
     echo "<td class=\"et-tour-td3\"><span class=\"et-tour-layout-control\">" . warnOnEmpty(htmlspecialchars(mysql_result($result, $i, "layout_control")), "control") . "</span></td>\n";
     echo "<td class=\"et-tour-td4\"><span class=\"et-tour-layout-access\">" . warnOnEmpty(mysql_result($result, $i, "accessibility_display"), "accessibility") . "</span></td>\n";
     echo "<td colspan=\"4\" class=\"et-tour-td4\"><span class=\"et-tour-owner-url\">\n";
     echo "    <a " . $event_tools_href_add_on . " href=\"" . mysql_result($result, $i, "layout_owner_url") . "\">" . mysql_result($result, $i, "layout_owner_url") . "</a>\n";
     echo "</span></td>\n";
     echo "</tr>\n";
     // not used:  prototype, era, main length, plan type, ops scheme
     // line 4 - description, preferring short
     echo "<tr class=\"et-tour-layout-tr4\">\n";
     echo "<td colspan=\"8\" class=\"et-tour-td1\"><span class=\"et-tour-layout-desc\">";
     if (mysql_result($result, $i, "layout_short_description") == '') {
         echo errorOnEmpty(mysql_result($result, $i, "layout_long_description"), "no short or long description");
     } else {
         echo mysql_result($result, $i, "layout_short_description");
     }
     echo "</span></td>\n";
     echo "</tr>\n";
 }
예제 #3
0
function list_misc_events($result, $i)
{
    echo '<hr><h4>' . errorOnEmpty(mysql_result($result, $i, "number"), "number") . ' ';
    echo errorOnEmpty(mysql_result($result, $i, "name"), "event name") . '</h4>';
    echo 'description:  ' . warnOnEmpty(mysql_result($result, $i, "description"), "description") . '<br>';
    echo "<p>\n";
    echo 'status code:  ' . warnOnEmpty(mysql_result($result, $i, "status_code"), "status code") . '<br>';
    echo 'event number:  ' . errorOnEmpty(mysql_result($result, $i, "number"), "number") . '<br>';
    echo 'start date:  ' . errorOnEmpty(mysql_result($result, $i, "start_date"), "start") . '<br>';
    echo 'end date:  ' . errorOnEmpty(mysql_result($result, $i, "end_date"), "end") . '<br>';
    echo 'location:  ' . mysql_result($result, $i, "location_name") . '<br>';
    echo 'event URL:  ' . mysql_result($result, $i, "clinic_url") . '<br>';
}