/** * Inenhåller menun som passar till Art * subkategprierna ordnas efter orderNo i matrushkan. */ public function setContent() { $q = new Query("matruschkaShowAtPlaces"); $q->showAt($this->title, $this->m->lang, "msapOrderNo", "ASC", 100); $i = 1; while ($row = mysql_fetch_object($q->getResult())) { $this->content .= '<div class="leftMenu">'; $this->content .= '<span class="subSecTitle">' . $row->mButtonTitle . '</span>'; $qq = new Query("matruschka"); $qq->whereCustom("mButtonTitle, mRowid", "mParent = '" . $row->mRowid . "' AND mPublished='1' AND mLang='" . $this->m->lang . "' ", "mOrderNo", "ASC", 0); if ($qq->getNumRows()) { // om det finns nån som har denna som parent $this->content .= '<div class="subSection">'; while ($row2 = mysql_fetch_object($qq->getResult())) { /** Svart om aktiv **/ if ($this->getActive($this->m->ID, $row2->mRowid) == 1) { $this->content .= '<span class="sideMenuActive"><a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . '</a></span><br/>'; } else { $this->content .= '<a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . '</a><br/>'; } } $this->content .= '</div>'; } $this->content .= '</div>'; if ($i != $q->getNumRows()) { $this->content .= '<img src="' . Settings::$graphics . 'stripes.gif" />' . "\n"; } $i++; } }
public function setContent() { $q = new Query("matruschkaShowAtPlaces"); $q->showAt("Menubar", $this->m->lang, "mOrderNo", "ASC", 10); $a = array(); $i = 0; while ($row = mysql_fetch_object($q->getResult())) { // Get the id and image $a[$i][0] = $row->mRowid; $a[$i][1] = $row->mButtonTitle; $a[$i][2] = $row->mButtonImage; $i++; } for ($i = 0; $i < count($a); $i++) { $im = split(',', $a[$i][2]); $this->content .= '<span class="menuItem">' . "\n"; $this->content .= "<a href=\"?ID=" . $a[$i][0] . "\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('" . $im[1] . "','','" . Settings::$graphics . "menu/" . $this->m->lang . "/" . $im[1] . "',1)\">"; // Den man är inne på blir röd $image = $this->getActive($this->m->ID, $a[$i][0]) ? $im[1] : $im[0]; $this->content .= '<img src="' . Settings::$graphics . 'menu/' . $this->m->lang . '/' . $image . '" alt="' . $im[1] . '" name="' . $im[1] . '" border="0" id="' . $im[1] . '" />'; $this->content .= '</a>'; if ($i < count($a) - 1) { $this->content .= '<img src="' . Settings::$graphics . 'menu/' . $this->m->lang . '/stripe.gif" width="7" height="12" />'; } $this->content .= "</span>\n"; } }
/** * InenhÃ¥ller menun som passar till Art * subkategprierna ordnas efter orderNo i matrushkan. */ public function setContent() { $q = new Query("matruschkaShowAtPlaces"); $qq = new Query("matruschka"); $qqq = new Query("matruschka"); $q->showAt($this->title, $this->m->lang, "mOrderNo", "ASC", 100); $i = 1; while ($row = mysql_fetch_object($q->getResult())) { $this->content .= '<div class="leftMenu">'; $this->content .= '<span class="subSecTitle">' . $row->mButtonTitle . "</span>\n"; $qq->whereCustom("mButtonTitle, mRowid", "mParent = '" . $row->mRowid . "' AND mPublished='1' AND mLang='" . $this->m->lang . "' ", "mOrderNo", "ASC", 0); // om det finns nån som har denna som parent if ($qq->getNumRows()) { /* Fulhack för att få första i galleriet rosa */ $i = 0; $this->content .= '<div class="subSection">'; while ($row2 = mysql_fetch_object($qq->getResult())) { $qqq->whereCustom("mButtonTitle, mRowid, mTitle", "mParent = '" . $row2->mRowid . "' \n AND mPublished='1' \n AND mButtonTitle NOT LIKE ''\n AND mLang='" . $this->m->lang . "' ", "mOrderNo", "ASC", 0); /** Om det är den trenivåare **/ if ($qqq->getNumRows()) { $this->content .= '<span class="subSecTitle">' . $row2->mButtonTitle . "</span>\n"; $this->content .= '<div class="subSection">'; while ($row3 = mysql_fetch_object($qqq->getResult())) { /** Rosa om aktiv **/ if ($this->getActive($this->m->ID, $row3->mRowid) == 1) { $this->content .= '<span class="sideMenuActive"><a href="?ID='; $this->content .= $row3->mRowid . '">' . $row3->mButtonTitle . "</a></span><br/>\n"; } else { $this->content .= '<a href="?ID=' . $row3->mRowid . '">' . $row3->mButtonTitle . "</a><br/>\n"; } } $this->content .= "</div>\n"; // subSection inre } else { /** Om det är en vanlig blir det en länk**/ /** Rosa om aktiv **/ /** Fulhack - Rosa om man klickat på galleriet */ if ($this->getActive($this->m->ID, $row2->mRowid) == 1 || $this->m->showStyle == "Gallery" && $i == 0 && $this->m->level == 0) { $this->content .= '<span class="sideMenuActive"><a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . "</a></span><br/>\n"; } else { $this->content .= '<a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . "</a><br/>\n"; } } /* Fulhack */ $i++; } $this->content .= "</div>\n"; //subSection yttre } $this->content .= "</div>\n"; // leftMenu if ($i != $q->getNumRows()) { $this->content .= '<img src="' . Settings::$graphics . 'stripes.gif" />' . "\n"; } $i++; } }