public function setItems() { // Items at level $date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s"); // Order number $orderQ = new Query("matruschka"); if ($parent) { $orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1); $order = $orderQ->getResultRow('mOrderNo') + 1; } else { $order = 1; } $orderNo = $this->matruschka ? $this->matruschka->orderNo : $order; $this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 200 x _ px", 1); $this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "KnappTitel (Mest för navigering i adminsidan)", 0); $this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild t.ex (bild1.gif,bild2.gif)", 0); $this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text", 0); $this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0); $this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0); $this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0); $this->items[2][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 200 x _ px", 1); $this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0); $this->items[2][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[2][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text (All text här)", 0); $this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0); }
public function setItems() { // Items at level $date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s"); // Order number $orderQ = new Query("matruschka"); if ($_GET['parent']) { $orderQ->whereQuery("mOrderNo", "mParent", $_GET['parent'], 'mOrderNo', 'DESC', 1); $order = $orderQ->getResultRow('mOrderNo') + 1; } else { $order = 1; } $orderNo = $this->matruschka ? $this->matruschka->orderNo : $order; $this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0); $this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild", 0); $this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0); $this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Översta rubriken, ", 0); $this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till rubriker.", 0); $this->items[2][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Bildspelstitel", 0); $this->items[2][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Texten", 0); $this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till bildspel.", 0); $this->items[3][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[3][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild 400 x _ px ", 1); $this->items[3][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[3][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer.", 0); }
public function showActual() { $id = (int) $_GET['id']; if (Helper::givesResult($this->table, "rowid", $id)) { $q = new Query($this->table); $q->whereLeftJoinImageQuery("*", "rowid", $id, "rowid", "DESC"); $personal = new Query("personal"); $personal->whereQuery("*", "username", $q->getResultRow("published_by"), "rowid", "ASC", "1"); ?> <div class="newsHeader"><span class="dateAuthor"> <?php echo date("Y-m-d", strtotime($q->getResultRow("date"))) . ' ' . $personal->getResultRow("first_name") . ' ' . $personal->getResultRow("last_name"); ?> </span><br /><br /> <span class="newsHeaderFont"><?php echo $q->getResultRow("title"); ?> </span> </div> <div class="newsDescActual"><span class="boldGrey"><?php echo nl2br(strip_tags($q->getResultRow("description"), '<a><b><br><strong>')); ?> </span></div> <div class="newsPicActual"> <?php if ($q->getResultRow("image_id") > 0) { ?> <table><tr><td> <?php echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . $q->getResultRow("file") . '&width=340" alt="' . $q->getResultRow("name") . '" />'; ?> </td> </tr> <tr> <td align="right" class="smallGrey2"> <?php if ($q->getResultRow("photo") != "") { echo '<span class="smallGrey">Foto: ' . $q->getResultRow("photo") . '</span>'; } ?> </td> </tr> </table> <?php } ?> </div> <?php echo nl2br(strip_tags($q->getResultRow("text"), '<a><b><br><strong>')); ?> <br /><br /> <?php } }
private function getActive($id, $searched) { $q = new Query("matruschka"); $q->whereQuery("*", "mRowid", $id, "mRowid", "DESC", 0); if ($q->getResultRow("mRowid") == $searched) { return 1; } if ($q->getResultRow("mParent") == "") { return 0; } else { return $this->getActive($q->getResultRow("mParent"), $searched); } }
public function setItems() { // Items at level $date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s"); // Order number $orderQ = new Query("matruschka"); if ($parent) { $orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1); $order = $orderQ->getResultRow('mOrderNo') + 1; } else { $order = 1; } $orderNo = $this->matruschka ? $this->matruschka->orderNo : $order; $this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text till vänster", 0); $this->items[0][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten till höger", 0); $this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); }
public function setItems() { // Items at level $date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s"); // Order number $orderQ = new Query("matruschka"); if ($parent) { $orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1); $order = $orderQ->getResultRow('mOrderNo') + 1; } else { $order = 1; } $orderNo = $this->matruschka ? $this->matruschka->orderNo : $order; $this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 250 x _ px", 1); $this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel. (För adminsidan)", 1); $this->items[0][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten under bilden", 1); $this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 1); }
public function setItems() { // Items at level $date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s"); // Order number $orderQ = new Query("matruschka"); if ($_GET['parent']) { $orderQ->whereQuery("mOrderNo", "mParent", $_GET['parent'], 'mOrderNo', 'DESC', 1); $order = $orderQ->getResultRow('mOrderNo') + 1; } else { $order = 1; } $orderNo = $this->matruschka ? $this->matruschka->orderNo : $order; $this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild 400 x _ px.", 1); $this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Rubriktitel (för navigering på adminsidan)", 0); $this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild (t.ex: bild1.gif,gid2.gif)", 0); $this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "", 0); $this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0); $this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Rubriktitel", 0); $this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0); $this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0); $this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummerför underlänkarna i Menyn", 0); $this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[3][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 400px bred", 1); $this->items[3][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel (fyll endast i denna vid 3 nivåer)", 0); $this->items[3][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[3][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Beskrivningen under bilden.", 0); $this->items[3][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten bredvid bilden", 0); $this->items[3][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[3][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Numret som man trycker på. Nolla läggs till automatisk. Vid 3 nivåer i menyn blir det ordningsnumret i menyn.", 0); $this->items[4][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 400px", 1); $this->items[4][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0); $this->items[4][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Beskrivningen under bilden.", 0); $this->items[4][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten bredvid bilden", 0); $this->items[4][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0); $this->items[4][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Numret som man trycker på. Nolla läggs till automatisk.", 0); }
public function set($ID) { $q = new Query("matruschka"); $q->whereQuery("*", "mRowid", $ID, "mRowid", "ASC", 1); $this->parent = $q->getResultRow("mParent"); $this->title = $q->getResultRow("mTitle"); $this->buttonTitle = $q->getResultRow("mButtonTitle"); $this->buttonImage = $q->getResultRow("mButtonImage"); $this->title = $q->getResultRow("mTitle"); $this->text = $q->getResultRow("mText"); $this->orderNo = $q->getResultRow("mOrderNo"); $this->level = $q->getResultRow("mLevel"); $this->description = $q->getResultRow("mDescription"); $this->pubDate = $q->getResultRow("mPubDate"); $this->published = $q->getResultRow("mPublished"); $this->adminLevel = $q->getResultRow("mAdminLevel"); $this->showStyle = $q->getResultRow("mShowStyle"); $this->lang = $q->getResultRow("mLang"); $this->setImages(); $this->setShowAtPlaces(); $this->setBelongingPlaces(); }
<?php include "admin_header.php"; $query = "SELECT * FROM vimmel_images WHERE image_id='" . $_GET['image_id'] . "' AND category='" . $_GET['category'] . "'"; $result = mysql_query($query) or die(mysql_error()); $rows = mysql_num_rows($result); if (isset($_GET['action']) && $_GET['action'] == "add_image" && $rows == 0) { $query = "INSERT INTO vimmel_images SET image_id='" . $_GET['image_id'] . "',category='" . $_GET['category'] . "', published_by='" . $_SESSION['admin_logged'] . "', date=CURRENT_TIMESTAMP"; $result = mysql_query($query) or die(mysql_error()); } $vimmelQ = new Query("vimmel_categories"); $vimmelQ->whereQuery("*", "rowid", $_GET['category'], "rowid", "ASC", 1); echo "<h2>" . $vimmelQ->getResultRow("title") . "</h2>"; echo nl2br($vimmelQ->getResultRow("description")); ?> <h4>Klicka på en bild för att lägga till en liten text.</h4> <?php $rad = 0; //altaernerar färg $images_per_row = 6; $pagesize = 60; $recordstart = (int) $_GET['recordstart']; //ändra $recordstart = isset($_GET['recordstart']) ? $_GET['recordstart'] : 0; //ändra recordstart variabelnamn $query = "SELECT * FROM vimmel_images \n\t\tLEFT JOIN bilder\n\t\tON image_id = bilder.id\n\t\tWHERE vimmel_images.category='" . $_GET['category'] . "'\n\t\tORDER BY vimmel_images.date DESC \n\t\tLIMIT " . $recordstart . " , " . $pagesize . " "; $result = mysql_query($query) or die(mysql_error()); //sidnummer under ?>
<?php } $paging; $query = new Query("advertisement"); if (isset($_GET['category'])) { $query->whereQuery("*", "category", $_GET['category'], "date", "DESC", 1000); $paging = new Paging($query, 20); $paging->where("*", "category", $_GET['category'], "date", "DESC"); } else { $query->makeQuery("*", "date", "DESC", 100); $paging = new Paging($query, 20); $paging->makePagingQuery(); } while ($row = mysql_fetch_assoc($paging->getResult())) { $getCategory = new Query("advertisement_categories"); $getCategory->whereQuery("*", "rowid", $row['category'], "rowid", "ASC", 1000); ?> <table border="0" cellpadding="0" cellspacing="0" class="demoTable"> <tr> <td class="tdPadding" colspan="2"><span class="boldGreyLighter"><?php echo $row['title']; ?> </span><span class="smallGrey"> - <?php echo $getCategory->getResultRow("category"); ?> </span><br /><br /> </td> </tr>
private function newEntryPlace() { echo "Skapat"; $image = $_POST['image']; $title = $_POST['title']; $description = $_POST['description']; $parent = $_POST['parent']; $requiredTitle = $_POST['requiredTitle']; $requiredDescription = $_POST['requiredDescription']; $requiredText = $_POST['requiredText']; $requiredComments = $_POST['requiredComments']; $requiredImage = $_POST['requiredImage']; $requiredRate = $_POST['requiredRate']; $pubDate; if ($published == 1) { $pubDate = date("Y-m-d H:i:s"); } else { $pubDate = ""; } $q = new Query('entryPlaces'); $q->whereQuery("*", "title", $title, "title", "DESC", 0); if ($q->getNumRows() == 0) { $query = "INSERT INTO entryPlaces \n\t\t\t\t\tSET image='{$image}',\n\t\t\t\t\t\ttitle='{$title}',\n\t\t\t\t\t\tdescription='{$description}',\n\t\t\t\t\t\tpubDate='{$pubDate}',\n\t\t\t\t\t\trequiredTitle='{$requiredTitle}',\n\t\t\t\t\t\trequiredDescription='{$requiredDescription}',\n\t\t\t\t\t\trequiredText='{$requiredText}',\n\t\t\t\t\t\trequiredComments='{$requiredComments}',\n\t\t\t\t\t\trequiredImage='{$requiredImage}',\n\t\t\t\t\t\trequiredRate='{$requiredRate}'"; $result = mysql_query($query) or die(mysql_error()); } }
<?php include "header_inc.php"; ?> <div id="centerDiv"> <div class="newsBg"> <?php if (isset($_GET['category']) && Helper::isInt($_GET['category'])) { $category = new Query("vimmel_categories"); $category->whereQuery("*", "rowid", $_GET['category'], "date", "DESC", 1); echo '<span class="boldWhite">' . $category->getResultRow("title") . '</span><br />'; echo '<span class="smallWhite">' . nl2br($category->getResultRow("description")) . '</span>'; if (Helper::isInt($_GET['id']) && Helper::hasValue($_GET['id']) && Helper::givesResult("vimmel_images", "rowid", $_GET['id'])) { $query = new Query("vimmel_images"); $query->whereLeftJoinImageQuery("*", "rowid", $_GET['id'], "rowid", "ASC"); $image = new ShowImages($query); ?> <div class="showImg"> <br /> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><?php echo $image->showImage(350); ?> </td> </tr> <tr> <td align="right" class="smallGrey2"><?php
<?php include "header_inc.php"; echo '<div id="centerDiv">'; echo '<div class="newsBg">'; if (isset($_GET['id']) && Helper::isInt($_GET['id']) && Helper::givesResult("personal", "rowid", $_GET['id'])) { $personal = new Query("personal"); $personal->whereQuery("*", "rowid", $_GET['id'], "rowid", "ASC", 1); $topQ = new Query("top40"); $topQ->whereQuery("*", "top40Username", $personal->getResultRow("username"), "top40ID", "ASC", 40); echo '<div class="newsHeaderActual">'; echo '<span class="newsHeaderFont">'; echo 'Topplistan cd & dvd, ' . $personal->getResultRow("first_name") . ' ' . $personal->getResultRow("last_name"); echo '</span>'; echo '</div>'; echo '<br/>'; echo "<ol >"; while ($row = mysql_fetch_object($topQ->getResult())) { echo '<li style="font-weight:bold">'; echo $row->top40Group . ' - <span style="color:#000000;">' . $row->top40Album . '</span>'; echo '</li>'; } echo "</ol>"; } echo '</div>'; echo '</div>'; include "footer.php";
<?php include "admin_header.php"; ?> <h2>Prenumeranter</h2> <a href="?type=try">Prov prunumeranter</a> | <a href="?type=year">1 års prenumeranter</a> <br/> <br/> <?php if (isset($_GET['id'])) { $prenQ = new Query("pren"); $prenQ->whereQuery("*", "PrenId", $_GET['id'], "PrenId", "DESC", 1); ?> <table cellspacing="0" rules="rows" border="1" style="height:50px;border-collapse:collapse;"> <tr> <td>PrenId</td> <td><strong><?php echo $prenQ->getResultRow("PrenId"); ?> </strong></td> </tr> <tr> <td>PrenToName</td> <td><strong><?php echo $prenQ->getResultRow("PrenToName"); ?> </strong></td> </tr> <tr> <td>PrenToCO</td>
/** * Om man skapar ett barn */ private function createChild() { // hämta displaystyle $q = new Query('matruschka'); $q->whereQuery("*", 'mRowid', $this->parent, 'mRowid', "DESC", 1); $style = $q->getResultRow('mShowStyle'); $this->level = $q->getResultRow('mLevel') + 1; if ($style == "Agree") { $this->showStyle = new AdminAgree(); } else { if ($style == "ImageShow") { $this->showStyle = new AdminImageShow(); } else { if ($style == "TextShow") { $this->showStyle = new AdminTextShow(); } else { if ($style == "Start") { $this->showStyle = new AdminStart(); } else { if ($style == "Gallery") { $this->showStyle = new AdminGallery(); } else { if ($style == "Contact") { $this->showStyle = new AdminContact(); } } } } } } $this->showStyle->setParent($this->parent); $this->showStyle->setItems(); $this->showStyle->setupBelongingPlaces($_GET['lang']); $this->showStyle->setupShowAtPlaces($_GET['lang']); }
/** * Listar alla på förstasidan, dvs level=0 */ private function showTable2($class) { $q = new Query("matruschka"); $q->whereQuery("*", "mLevel", 0, "mLang", "DESC", 0); echo '<br/><br/>'; echo '<table class="' . $class . '" cellpadding="0" cellspacing="0">' . "\n"; echo '<th> </th>'; echo '<th>Title</th>'; echo '<th>Sub cat´s</th>'; echo '<th>Show style</th>'; echo '<th>Order no.</th>'; echo '<th>Lang</th>'; echo '<th>Published</th>'; //echo '<th align="left">Publiceringsdatum</th>'; //echo '<th align="left">Senast uppdaterad</th>'; //echo '<th align="left">Adminlevel</th>'; echo '<th> </th>'; echo '<th> </th>'; $i = 0; while ($row = mysql_fetch_object($q->getResult())) { $ssThumb; $imgQ = new Query("matruschkaImages"); $imgQ->whereQuery('*', 'miMatruschkaID', $row->mRowid, 'miMatruschkaID', 'DESC', 2); $img = $imgQ->getResultRow('miFilename'); if ($row->mShowStyle == "ImageShow") { $ssThumb = AdminImageShow::$thumbnail; } elseif ($row->mShowStyle == "TextShow") { $ssThumb = AdminTextShow::$thumbnail; } elseif ($row->mShowStyle == "ImageShow2") { $ssThumb = AdminImageShow2::$thumbnail; } elseif ($row->mShowStyle == "Agree") { $ssThumb = AdminAgree::$thumbnail; } elseif ($row->mShowStyle == "Start") { $ssThumb = AdminStart::$thumbnail; } // Fyll på med fler echo "<tr>\n"; echo '<td class="td' . $i . '"><img src="image_crop.php?source=' . Settings::getUploadedImages() . '/' . $img . '&dest=&thumb_size=40" /></td>' . "\n"; echo '<td class="td' . $i . '">'; if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) { echo '<a href="?ID=' . $row->mRowid . '">'; echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle; echo '</a>'; } else { echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle; } echo "</td>\n"; echo '<td class="td' . $i . '">'; $subQ = new Query("matruschka"); $subQ->whereQuery("mRowid", "mParent", $row->mRowid, "mRowid", "ASC", 0); echo $subQ->getNumRows(); echo "</td>\n"; echo "<td valign=\"bottom\" class=\"td{$i}\">"; echo "<span onclick=\"MM_openBrWindow('" . Settings::$customGraphics . $ssThumb . "','Preview','width=500,height=500')\" style=\"cursor: hand; cursor: pointer;\">"; echo $row->mShowStyle; echo '</span>'; echo "</td>\n"; echo '<td class="td' . $i . '">' . $row->mOrderNo . '</td>' . "\n"; echo '<td class="td' . $i . '">' . $row->mLang . '</td>' . "\n"; echo '<td class="td' . $i . '">'; echo $row->mPublished ? '<span style="color:#339900">Yes</span>' : '<span style="color:#FF0000">No</span>'; echo "</td>\n"; //echo '<td valign="bottom">'.$row->mPubDate.'</td>'."\n"; //echo '<td valign="bottom">'.$row->mUpdateDate.'</td>'."\n"; //echo '<td valign="bottom">'.$row->mAdminLevel.'</td>'."\n"; echo '<td class="td' . $i . '">'; if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) { echo '<a href="?ID=' . $row->mRowid . '">Edit</a>'; } else { echo ' '; } echo '</td>' . "\n"; echo '<td class="td' . $i . '">'; if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) { echo '<a href="?action=Remove&mID=' . $row->mRowid . '&ID=' . $this->ID . '" name="removeButton">Remove</a>'; } else { echo ' '; } echo '</td>' . "\n"; echo '</tr>' . "\n"; $i++; $i = $i % 2; } echo '</table>'; }
public function showReview() { if (Helper::hasValue($_GET['id'])) { $query = new Query($this->q->getTable()); $query->whereLeftJoinImageQuery("*", "rowid", $_GET['id'], "date", "ASC"); ?> <div class="newsHeader"><span class="dateAuthor"><?php echo date("y-m-d", strtotime($query->getResultRow("date"))); ?> </span> <br /> <span class="newsHeaderSmaller"><?php echo $query->getResultRow("title"); ?> </span></div> <div class="showImg"> <?php if (Helper::hasValue($query->getResultRow("image_id"))) { ?> <table><tr><td> <?php echo Image::displayImage($query->getResultRow("file"), 340, "", $query->getResultRow("name")); ?> </td> </tr> <tr> <td align="right" class="smallGrey2"> <?php if ($query->getResultRow("photo") != "") { echo '<span class="smallGrey">Foto: ' . $query->getResultRow("photo") . '</span>'; } ?> </td> </tr> </table> <?php } ?> </div> <div class="textContainer"><?php echo nl2br($query->getResultRow("text")); ?> <br /><br /> <!-- <a href="<?php echo $query->getResultRow("link_url"); ?> "><?php echo $query->getResultRow("link_url"); ?> </a> <br /><br />--> <span class="smallGrey"> <?php $personalInfo = new Query("personal"); $personalInfo->whereQuery("*", "username", $query->getResultRow("published_by"), "username", "ASC", 1); echo "Av: " . $personalInfo->getResultRow("first_name") . " " . $personalInfo->getResultRow("last_name"); ?> </span> </div> <?php } }
<br/> </form> <?php $pagesize = 40; $recordstart = (int) $_GET['recordstart']; $recordstart = isset($_GET['recordstart']) ? $_GET['recordstart'] : 0; $query = "SELECT * FROM competitions\n\t\tORDER BY date DESC LIMIT " . $recordstart . " , " . $pagesize . " "; $result = mysql_query($query) or die(mysql_error()); echo '<table cellpadding="3" cellspacing="2" border="0">'; echo '<th align="left">Titel</th><th align="left">Datum</th><th align="left">Skribent</th><th align="left">Svar</th><th align="left">Publicerad?</th><th> </th>'; while ($row = mysql_fetch_assoc($result)) { $answersQ = new Query("competition_answers"); $answersQ->whereQuery("*", "answerComp_id", $row['rowid'], "answerRowid", "DESC", 100000); echo '<tr> <td align="left"><a href="admin_comp_edit.php?id=' . $row['rowid'] . '" class="klass1" > ' . $row['title'] . '</a></td> <td align="left">' . $row['date'] . '</td> <td align="left">' . $row['published_by'] . '</td> <td align="left"><a href="admin_comp_answers.php?id=' . $row['rowid'] . '">' . $answersQ->getNumRows() . '</a></td> <td align="left">'; if ($row['active'] == 1) { echo "JA"; } else { echo "NEJ"; } echo '</td> <td align="left"><a href="admin_comp_action.php?id=' . $row['rowid'] . '&action=remove"><img src="graphics/remove.jpg" width="10" border="0"/></a></td> </tr>'; $rad++;
<?php include "admin_header.php"; $title = Helper::safeSql($_POST['title']); $description = Helper::safeSql($_POST['description']); ?> <h2>Vimmelbilder</h2> Skapa en kategori att lägga bilder i.<br/> Klicka sedan på din nyskapade kategori i listan nedan. <?php if ($_GET['action'] == "edit") { $catQ = new Query("vimmel_categories"); $catQ->whereQuery("*", "rowid", $_GET['id'], "rowid", "DESC", 1); ?> <h4>Kategorinamn</h4> <form action="admin_vimmel_action.php" method="post"> <input name="title" type="text" size="50" value="<?php echo htmlspecialchars($catQ->getResultRow("title"), ENT_QUOTES); ?> "> <h4>Beskrivning</h4> <textarea name="description" cols="50" rows="10"><?php echo $catQ->getResultRow("description"); ?> </textarea><br/> <h4>Datum</h4> <input name="date" type="text" maxlength="19" value="<?php echo $catQ->getResultRow("date"); ?> "><br/><br/> <input name="id" type="hidden" value="<?php
"><?php echo $query->getResultRow("link_url"); ?> </a> <br /> </div> <?php } ?> <br /> <?php $demoQuery = new Query("demos"); $demoQuery->whereQuery("*", "active", 1, "date", "DESC", 1000); $paging = new Paging($demoQuery, 30); $paging->where(); $demoss = new ShowDemos($demoQuery); $demoss->listDemos($paging); ?> <?php $paging->displayLinks("se", "smallPink", "smallGrey"); ?> </div> <?php include "footer.php";
<?php include "header_inc.php"; ?> <div id="centerDiv"> <div class="newsBg"> <?php $review = new Query("recensioner"); $review->whereQuery("*", "active", 1, "date", "DESC", 10000); $paging = new Paging($review, 20); $paging->where(); $reviewShow = new Review($review); $reviewShow->showReview(); $reviewShow->listReviews($paging); ?> <?php echo $paging->previousShow("se", "smallPink") . ' ' . $paging->nextShow("se", "smallPink") . '<br />' . $paging->linksShow2("se", "smallGray", "smallPink"); ?> </div> </div> <?php include "footer.php";
</head> <?php if (!isset($_GET) || empty($_GET)) { print "<body style=\"background-color:#a9a9a9\">\n"; } else { print "<body>"; } function __autoload($class_name) { $directorys = array('php_classes/', 'php_classes/custom/admin/', 'php_classes/custom/site/'); foreach ($directorys as $directory) { if (file_exists($directory . $class_name . '.class.php')) { require_once $directory . $class_name . '.class.php'; return; } } } $db = new DB(); if (eregi("^[0-9]{1,4}\$", $_GET['ID'])) { $q = new Query("matruschka"); $q->whereQuery("mRowid", "mRowid", $_GET['ID'], "mRowid", "ASC", 1); if ($q->getNumRows() > 0) { $ID = $_GET['ID']; } } /* Startar programmet */ new Main($ID); ?> </body> </html>
} ?> <div id="competition"> <div class="veckansFragaBg"><span class="boldWhite"></span></div> <div align="center"><span class="boldWhite">Läs den hetaste </span><span class="boldPink2"><a href="/blogg">hårdrocksbloggen</a></span><span class="boldWhite"> eller regga dig för att </span><span class="boldPink2"> <a href="http://closeupmagazine.net/blogg/wp-login.php?action=register">börja blogga!</a></span></div> <div class="leftBoxFooter"></div> </div> <?php $voteQ = new Query("vote_group"); $voteQ->whereQuery("*", "active", 1, "rowid", "DESC", 1); if ($voteQ->getNumRows() > 0) { while ($row = mysql_fetch_assoc($voteQ->getResult())) { $vote_itemsQ = new Query("vote_group_items"); $vote_itemsQ->whereQuery("*", "group_id", $row['rowid'], "rowid", "ASC", 3); $item1 = mysql_result($vote_itemsQ->getResult(), 0, "rowid"); $item2 = mysql_result($vote_itemsQ->getResult(), 1, "rowid"); $item3 = mysql_result($vote_itemsQ->getResult(), 2, "rowid"); $group = $row['rowid']; ?> <div id="vote"> <div class="competitionBg"></div> <div class="leftTextMargin"> <span class="boldWhite"><?php echo $row['title']; ?> </span> <span class="boldWhite"><?php echo $row['description']; ?> </span> <span class="lightGrey">