Example #1
0
                } else {
                    //echo "accepted";
                    $GLOBALS['newname'] = $newname;
                    return true;
                }
            }
            //else for extension known.
        }
        //make sure image is not empty
    }
    //recheck is POST isset
}
//end function POSTIMAGE
// main logic:
if (isset($_POST['Submit'])) {
    if (post_image() == True) {
        $imgnamepath = $GLOBALS['newname'];
        $imgnameonly = $GLOBALS['img_name_only'];
        echo "Posted Image successfully! <br />";
        echo "<img src='{$imgnamepath}' width='300'/>";
        echo "<input type='hidden' id='postedOK' value='1' />";
        echo "<input type='hidden' id='filename' value='{$imgnameonly}' />";
        //echo "<div id='posted'></div>";
    } else {
        echo "<input type='hidden' id='postedOK' value='0' />";
    }
} else {
    echo "<input type='hidden' id='postedOK' value='0' />";
}
?>
	</p>
Example #2
0
 function post_quote()
 {
     $file = get_random_file();
     if (!array_contains($file)) {
         post_image();
         persist();
         // as uploaded
     }
 }
Example #3
0
    add_js_jquery('
  hljs.tabReplace = "    ";
  hljs.initHighlightingOnLoad();', 'assets/js/highlight.pack.js', 'link');
}
?>
<h1><?php 
echo $title;
?>
</h1>

<div class="content">
    <?php 
if (isset($image)) {
    ?>
    <?php 
    echo post_image($image, $created_at->sec, $title);
    ?>
    <?php 
}
?>
    <?php 
echo $content;
?>
    <?php 
$last_update = $updated_at->sec != '' ? $updated_at->sec : $created_at->sec;
?>
    <?php 
if ($last_update < now() - 5184000) {
    ?>
    <div class="alert-message block-message warning">
        Bu yazı en son <?php