Example #1
0
 public function setContent()
 {
     $q = new Query("matruschka");
     $this->content = '<span class="style2">';
     $this->content .= 'copyright © 2009 Mats &Aring;berg | <a href="http://rocafuerte.se" target="self">rocafuerte design</a>' . "\n";
     $this->content .= '<br/><br/>';
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='SWE'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= '<a href="?ID=' . $q->getResultRow("mRowid") . '">Swedish</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ENG'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">English</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ITA'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">Italian</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ESP'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">Spanish</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='FRA'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">France</a>';
     }
     $this->content .= '</span>';
 }
Example #2
0
 /**
  * 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++;
     }
 }
Example #3
0
 /**
  * Denna kan se lite annorlunda ut eftersom det är en showStyle.
  * Det kanske inte innehåller specifik footer och header.
  */
 public function showContent()
 {
     $q = new Query("matruschka");
     $q->whereCustom("mRowid", "mShowStyle='Start' AND mLang='SWE'", "mRowid", "DESC", 1);
     $qq = new Query("matruschka");
     $qq->whereImage("mShowStyle='Agree' ", "ASC", 1);
     $ret = '<div id="self">';
     $ret .= '<div class="centerTextBox2"><img src="graphics/autograf.jpg" />';
     $ret .= "</div>\n";
     $ret .= '<div id="agree">';
     $ret .= '<img src="admin/' . Settings::$uploaded_images . '/' . $qq->getResultRow("miFilename") . '" width="250" alt="Agree"/>';
     $ret .= "</div>\n";
     $ret .= '<div class="centerTextBox">';
     $ret .= '<div class="alignRight">';
     $ret .= '<span class="style1"><em>';
     $ret .= $qq->getResultRow("imagesName");
     $ret .= "</em></span></div>\n";
     $ret .= '<p>';
     $ret .= '<span class="style1"><strong>';
     $ret .= '<br/>';
     $ret .= $qq->getResultRow("mText");
     $ret .= "</strong></span><br /><br />\n";
     $ret .= '<a href="?ID=' . $q->getResultRow("mRowid") . '" target="_self"><img src="graphics/agree.gif" width="74" height="15" border="0" /></a>';
     $ret .= "</p>\n";
     $ret .= "</div>\n";
     $ret .= "</div>\n";
     return $ret;
 }
Example #4
0
 /**
  * Fyll i manuellt vad som ska vara i headern.
  */
 public function setHeader()
 {
     $q = new Query("matruschka");
     $q->whereCustom("mRowid", "mShowStyle='Start' AND mLang='" . $this->m->lang . "'", "mRowid", "DESC", 1);
     $this->header = '<div id="top"><a href="?ID=' . $q->getResultRow($mRowid) . '" >';
     $this->header .= '<img src="graphics/logo.gif" alt="Mats &Aring;berg" border="0" />';
     $this->header .= '</a>';
 }
Example #5
0
 /**
  * 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++;
     }
 }
Example #6
0
 /**
  * Tilldelan matrushkan. Om inget ID finns så sätts den 
  * till de som man bestämt skall vara förstasidan.
  */
 private function setMatruschka()
 {
     if (eregi("^[0-9]{1,7}\$", $this->ID)) {
         $this->m = new Matruschka($this->ID);
     } else {
         $q = new Query('matruschka');
         $q->whereCustom("mRowid", "mShowStyle='Agree' AND mLang='SWE'", "mRowid", "DESC", 1);
         $this->m = new Matruschka($q->getResultRow("mRowid"));
     }
 }
Example #7
0
 /**
  * Denna kan se lite annorlunda ut eftersom det är in showStyle.
  * Det kanske inte innehåller secifikt footer och header.
  */
 public function showContent()
 {
     $q = new Query("matruschka");
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='" . $this->m->lang . "' AND mPublished='1'", "mRowid", "DESC", 1);
     $ret = '<img src="graphics/start_pic.jpg" />';
     $ret .= '<div id="textBox1"><span class="style1">';
     $ret .= $q->getResultRow("mDescription");
     $ret .= '</span></div>';
     $ret .= '<div id="textBox2"><span class="style1">';
     $ret .= $q->getResultRow("mText");
     $ret .= '<div class="alignRight"><span class="style2"><strong>';
     $ret .= 'Mats &Aring;berg';
     $ret .= '</strong></span></div>';
     $ret .= '</div>';
     return $ret;
 }
Example #8
0
<form action="<?php 
$_SERVER['PHP_SELF'];
?>
" method="post">


<h2>Topp 40</h2>

Grupp - Album
<ol>
<?php 
$form = new Form();
$q = new Query("top40");
for ($i = 1; $i <= 40; $i++) {
    $q->whereCustom("*", "top40Username = '******'admin_logged'] . "' AND top40ID = '{$i}' ", "top40ID", "ASC", 100);
    $group = htmlspecialchars($q->getResultRow("top40Group"), ENT_QUOTES);
    $album = htmlspecialchars($q->getResultRow("top40Album"), ENT_QUOTES);
    echo '<li>' . $form->textField("group[]", $group, "field") . " - " . $form->textField("album[]", $album, "field") . '</li>';
}
?>

</ol>

<input type="submit" name="action" value="Uppdatera"/>
</form>
<?php 
if ($_POST['action'] == "Uppdatera") {
    echo "Uppdaterat!";
}
echo '<br /><br /><a href="admin_personal.php">Tillbaka</a>';
Example #9
0
    <?php 
    while ($row = mysql_fetch_object($prenQ->getResult())) {
        echo '<tr><td><a href="?id=' . $row->PrenId . '">' . $row->PrenToName . '</a></td>';
        echo '<td>' . $row->PrenToEmail . '</td>';
        echo '<td>' . $row->PrenRegisterDate . '</td>';
        echo '<td><b>' . $row->PrenFromNumber . '</b></td>';
        echo '<td><a href="admin_subscribers_action.php?action=remove&id=' . $row->PrenId . '&type=try"><img src="graphics/remove.jpg" alt="Ta bort" border="0" width="10"/></a></td></tr>';
    }
    ?>
</table>
<?php 
} else {
    if ($_GET['type'] == "year") {
        $prenQ = new Query("pren");
        // Doesnt escape '
        $prenQ->whereCustom("*", "PrenFromNumber = '0'", "PrenRegisterDate", "DESC", 10000000);
        ?>
<h4>1 &aring;rs prenumeranter</h4>
<table>
  <th align="left">Namn</th>
    <th align="left">E-mail</th>
    <th align="left">Datum</th>
    <th>&nbsp;</th>
    <?php 
        while ($row = mysql_fetch_object($prenQ->getResult())) {
            echo '<tr><td><a href="?id=' . $row->PrenId . '">' . $row->PrenToName . '</a></td>';
            echo '<td>' . $row->PrenToEmail . '</td>';
            echo '<td>' . $row->PrenRegisterDate . '</td>';
            echo '<td><a href="admin_subscribers_action.php?action=remove&id=' . $row->PrenId . '&type=year"><img src="graphics/remove.jpg" alt="Ta bort" border="0" width="10"/></a></td></tr>';
        }
        ?>
Example #10
0
</p></span> </div>
		<div class="newsPicActual">
		<?php 
    echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . mysql_result($result, 0, "file") . '&width=512" alt="#' . mysql_result($result, 0, "number") . ' l&ouml;sning"/>';
    ?>
		 </div>
	
	<?php 
}
?>
<br/>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php 
$query = new Query(monthly_magazine);
$query->whereCustom("*", "crossword > 0", "number", "DESC", 1000);
$paging = new Paging($query, 30);
$paging->whereCustom();
while ($row = mysql_fetch_assoc($paging->getResult())) {
    echo '<tr>';
    echo '<td class="trBorderBottom" width="70">';
    echo '<span class="smallPink">';
    echo '#' . $row['number'];
    echo '</span>';
    echo '</td>';
    echo '<td class="trBorderBottom">';
    echo '<span class"smallGrey">';
    echo '<a href="?id=' . $row['rowid'] . '">';
    echo 'Korsordsl&ouml;sning';
    echo '</a>';
    echo '</span>';