End mod echo '
  • Greinastjri
  • '; // N grein if(!$_GET) { echo '
    '; echo 'Stofna nja grein'; echo '
    '; echo '
    '; echo ' '; echo 'Tegund: '; echo '
    '; echo '
    '; echo '
    '; } // N grein endar if($_GET["save"] == "true") { notify("Breytingar vistaar!"); } // Tengja grein vi myndasafn if($_GET["action"] == "gallery") { if($_POST["selector"]) { $id = $_POST["id"]; $gallery = $_POST["gallery"]; $result = mysql_query("insert into za_article_galleries values('','$id','$gallery')") or die(mysql_error()); notify("Myndasafn tengt vi grein"); } else { if(!is_numeric($_GET["id"])) { die("Security error('id')!"); } // form selector echo '
    '; echo 'Tengja grein vi myndasafn'; echo '
    '; $result = mysql_query("select * from za_file_collections order by id desc") or die("Villa fyrirspurn"); echo 'Myndasafn: '; echo ''; echo ''; echo '
    '; echo ''; } } // Breytingahamur if($_GET["action"] == "edit") { echo '
    '; $artid = $_GET["artid"]; $getpage = mysql_query("select * from za_articles where id = $artid limit 0,1") or die("Villa fyrirspurn"); if(mysql_num_rows($getpage) != 0) { while($row = mysql_fetch_array($getpage)) { $id = $row["id"]; $title = $row["caption"]; $body = stripslashes($row["body"]); $summary = stripslashes($row["summary"]); $time = $row["time"]; $type = $row["type"]; //fjallaflagi $trip_grade = $row["trip_grade"]; $display_pic = $row["display_pic"]; $map = $row["map"]; $published = $row["published"]; $short = $row["stuttur_titill"]; //fjallaflagi } } echo '
    '; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //kort me grein echo ''; //kort me grein endar //optional greinar - breytt config_env.php echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //opt greinar enda //fjallaflagi - velja forsumynd $get_albumresult = mysql_query("select * from za_article_galleries where article = '$id'"); echo ''; if(mysql_num_rows($get_albumresult) > 0) { echo ''; } else { echo ''; } //tgfa echo ''; //tgfa endar echo ''; echo ''; echo ''; echo ''; echo '
    '; echo 'Titill
    '; echo '
    '; echo '
    Dagsetning: ('.substr($time,0,10).')
    '; echo '
    '; echo '
    '; echo '
    '; echo '
    Stuttur titill:
    '; echo '
    '; echo '
    '; echo '
    Kort me grein:
    '; echo ''; if($map) { echo ' '; } echo '
    '; if($art_opt_display1) { echo '
    '.$art_opt_1.' (opt_1):
    '; echo '
    '; } echo '
    '; if($art_opt_display2) { echo '
    '.$art_opt_2.' (opt_2):
    '; echo '
    '; } echo '
    '; if($art_opt_display3) { echo '
    '.$art_opt_3.' (opt_3):
    '; echo '
    '; } echo '
    '; $album_row = mysql_fetch_array($get_albumresult); $album_id = $album_row["gallery"]; $get_album_result = mysql_query("select * from za_files where collection = '$album_id'"); echo 'Forsumynd:
    '; echo ''; if($display_pic) { echo ' '; } echo '
    '; echo '
    Forsumynd
    '; echo ''; echo '
    '; echo '
    tgfustaa
    '; if($published == 1) { $pubattrib_a = 'selected="selected"'; } else { $pubattrib_b = 'selected="selected"'; } echo ''; if($published == 1) { $imgpub = 'images/yes.gif'; } else { $imgpub = 'images/no.gif'; } echo '  '; echo '
    '; echo 'Tegund:
    '; echo '
    '; echo 'Erfileikastig:
    '; echo '
    '; echo ''; echo '
    '; echo 'Inngangur'; echo ''; echo ''; echo ''; echo ''; echo '
    '; echo '
    '; echo '
    Greinartexti
    '; echo '
    '; echo ''; echo '
    '; echo ''; echo ''; echo ''; echo '
    '; echo '
    '; echo '
    '; } // Breytingahamur endar // greinalisti echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //gamla //$result = mysql_query("select * from za_articles order by id desc") or die("Villa fyrirspurn"); //nja $result = mysql_query("SELECT za_articles.id,za_articles.published, za_articles.caption, za_articles.body, za_articles.time, za_articles.type, za_article_types.caption AS tegund, za_articles.summary, za_articles.author, za_articles.trip_grade, za_articles.display_pic FROM za_articles INNER JOIN za_article_types ON za_articles.type = za_article_types.id ORDER BY ID DESC"); if(mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result)) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $author_split = explode(" ",$row["author"]); $first_name = $author_split[0]; echo ''; if($row["published"] == 1) { $imgpub = 'images/yes.gif'; $pubtitle = 'tgefin'; } else { $imgpub = 'images/no.gif'; $pubtitle = 'tgefin'; } echo ''; echo ''; } } echo '
    #Titill greinar:Tegund:Agerir:MyndasafnDagsetningHfundurtgefin
    '.$row["id"].''.$row["caption"].''.$row["tegund"].''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $article_id = $row["id"]; $myndasafn = mysql_query("select * from za_article_galleries where article = '$article_id' order by id desc limit 1"); while($myndasafn_data = mysql_fetch_array($myndasafn)) { echo $myndasafn_data["gallery"]; } echo ''.substr($row["time"],0,10).''.$first_name.'
    '; include("footer.php"); ?>