echo $use_doc_editor == 1 && ($which_editor == 2 || $which_editor == 4) ? $displayStyle : 'none';
?>
">
          <td colspan="2"><div class='split'></div></td>
        </tr>
    <tr id='imRow1' class='row3' style="display: <?php 
echo $im_plugin == 1 && $use_doc_editor == 1 && ($which_editor == 2 || $which_editor == 4) ? $displayStyle : 'none';
?>
">
          <td nowrap class="menuHeader" valign="top"><b><?php 
echo $_lang["im_plugin_base_dir_title"];
?>
</b></td>
          <td>
            <input onChange="documentDirty=true;" type='text' maxlength='255' style="width: 300px;" name="im_plugin_base_dir" value="<?php 
echo isset($im_plugin_base_dir) ? $im_plugin_base_dir : getImageBaseDir();
?>
">
            <br />
          </td>
        </tr>
    <tr id='imRow2' class='row3' style="display: <?php 
echo $im_plugin == 1 && $use_doc_editor == 1 && ($which_editor == 2 || $which_editor == 4) ? $displayStyle : 'none';
?>
">
          <td>&nbsp;</td>
          <td class='comment'><?php 
echo $_lang["im_plugin_base_dir_message"];
?>
</td>
        </tr>
Example #2
0
function sachenView($ID)
{
    global $tablePrefix, $CmsLinkInfo;
    $imageBaseDir = getImageBaseDir();
    $cap_mbi = getDbText("sachen_mbi");
    $cap_info = getDbText("sachen_info");
    $cap_price = getDbText("sachen_price");
    $cap_amount = getDbText("sachen_amount");
    $cap_flavor = getDbText("sachen_flavor");
    $cap_explain = getDbText("sachen_explain");
    $cap_overall = getDbText("sachen_overall");
    $marksAndMBI = calcMarksAndMBIForItem($ID);
    echo <<<EOT
\t       
\t     <BR>

\t\t<table width="700" border="0" cellspacing="0" cellpadding="0" bgcolor="#669900">
              <tr valign="top"> 
                <td height="3"> 
                  <table width="700" border="0" cellspacing="1" cellpadding="0">
                    <tr bgcolor="#99CC33"> 
                      <td colspan="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><img src="images/spacer.gif" width="10" height="10" border="0"><b>{$cap_mbi}</b></font>
\t\t\t\t<a href="{$CmsLinkInfo}#MBI" target="_blank"><img src="images/ico_info.gif" width="13" height="13" alt="{$cap_info}" border="0"></a></td>
                    </tr>
                    <tr bgcolor="#cccc99"> 
                      <td width="209" height="15"><img src="images/spacer.gif" width="10" height="10" border="0"></td>
                      <td width="65" height="15"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$cap_price}</font></div></td>
                      <td width="109" height="15"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">{$cap_amount}</font></div></td>
                      <td width="84" height="15"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$cap_flavor}</font></div></td>
                      <td width="233" height="15"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$cap_explain}</font></div></td>
                    </tr>
EOT;
    $sachenMax = 15;
    $dunno = "---";
    $MBImult = 0;
    $MBIadd = 0;
    $sachenCount = 0;
    $sacheNameResult = mysql_query("SELECT ID, name FROM " . $tablePrefix . "sachen_name ORDER BY ID") or die("itemView.php;sachenView(): Database error (" . mysql_error() . ")");
    while (list($sacheID, $sacheName) = mysql_fetch_row($sacheNameResult)) {
        $sacheResult = mysql_query("SELECT preis, menge, geschmack, bild FROM " . $tablePrefix . "sachen WHERE itemID={$ID} AND sacheID={$sacheID}") or die("itemView.php;sachenView(): Database error (" . mysql_error() . ")");
        if (!(list($preis, $menge, $geschmack, $bild) = mysql_fetch_row($sacheResult))) {
            $preis = $dunno;
            $menge = $dunno;
            $geschmack = $dunno;
            $bild = "";
        }
        if (!$preis) {
            $preis = $dunno;
        }
        if ($preis != $dunno) {
            $preis = sprintf("%1.2f", $preis);
        }
        if (!$menge) {
            $menge = $dunno;
        }
        if (!$geschmack) {
            $geschmack = $dunno;
        }
        $preisnote = "";
        if ($marksAndMBI["{$sacheID}_preisnote"]) {
            $preisnote = " <font color=gray>(" . $marksAndMBI["{$sacheID}_preisnote"] . ")</font>";
        }
        if ($marksAndMBI[$sacheID]) {
            $brotLaenge = 60 * (5 - $marksAndMBI[$sacheID]);
            $brotMsg = "&nbsp";
            // tiny bread is shown in brot-cell if mark is 5
        } else {
            $brotLaenge = 0;
            $brotMsg = "";
            // nothing is shown in brot-cell
        }
        echo <<<EOT
                  \t <tr valign="center" bgcolor="#CCCC99"> 
                     \t<td width="209" height="2"><img src="images/spacer.gif" width="10" height="10">
EOT;
        if ($bild == "") {
            echo "<img src=\"images/ico_foto_nix.gif\" width=\"15\" height=\"15\">";
        } else {
            echo "<a href=\"{$imageBaseDir}{$bild}\" onmouseover=\"showSachenImage('{$imageBaseDir}{$bild}');\" onmouseout=\"hideSachenImage();\" target=\"_sacheBild\"><img src=\"images/ico_foto.gif\" width=\"15\" height=\"15\" border=\"0\"></a>";
        }
        echo <<<EOT
\t\t\t\t\t\t\t\t <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>{$sacheName}</b></font>
\t\t\t\t\t\t\t\t</td>
                     \t<td width="65" height="2"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><nobr>{$preis}{$preisnote}</nobr></font></div></td>
                     \t<td width="109" height="2"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">{$menge}</font></div></td>
                     \t<td width="84" height="2"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">{$geschmack}</font></div></td>
                     \t<td width="233" height="2"> 
                          <table width="{$brotLaenge}" border="0" cellspacing="0" cellpadding="0" background="images/brot-balken2.gif">
                        \t <tr> 
                           \t<td>{$brotMsg}</td>
                        \t </tr>
                          </table>
                     \t</td>
                  \t </tr>

EOT;
    }
    if ($marksAndMBI['MSI']) {
        $MBI = $marksAndMBI['MSI'];
        $brotLaenge = 60 * (5 - $MBI);
        $brotMsg = "&nbsp";
        // tiny bread is shown in brot-cell if mark is 5
    } else {
        $MBI = "---";
        $brotLaenge = 0;
        $brotMsg = "";
        // nothing is shown in brot-cell
    }
    echo <<<EOT
                    <tr valign="top" bgcolor="#CCCC99"> 
                      <td width="209"> 
                        <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Speisen-Index</b></font><img src="images/spacer.gif" width="10" height="10"></div>
                      </td>
                      <td width="65"> 

                        <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>{$MBI}</b></font></div>
                      </td>
                      <td width="109"> 
                        <div align="center"><img src="images/spacer.gif" width="10" height="10"></div>
                      </td>
                      <td width="84"> 
                        <div align="center"><img src="images/spacer.gif" width="10" height="10"></div>
                      </td>
                      <td width="233"> 
                          <table width="{$brotLaenge}" border="0" cellspacing="0" cellpadding="0" background="images/brot-balken2.gif">
                        \t <tr> 
                           \t<td>{$brotMsg}</td>
                        \t </tr>

                          </table>
                      </td>
                    </tr>
EOT;
    return $marksAndMBI;
}