if (!is_logged_in()) { add_message("Musíte sa prihlásiť."); redirect("/prihlasenie"); } if (is_post()) { $post_id = add_post(); // ak sa nám podarilo pridať článok if ($post_id) { // skusíme pridať aj obrázok addImage($post_id); // a presmerujeme redirect("clanok/" . $post_id); } } $tags = get_tags(); include_header(array("title" => "Pridanie článku")); ?> <h1 class="text-center">Nový článok</h1> <form method="post" enctype="multipart/form-data"> <label for="title"><strong>Názov článku:</strong></label> <input type="text" name="title" id="title" value="<?php echo isset($_POST["title"]) ? $_POST["title"] : ""; ?> "> <label for="text"><strong>Text článku:</strong></label> <textarea name="text" id="text"><?php echo isset($_POST["text"]) ? $_POST["text"] : "";
<?php $posts = get_posts(); include_header(array("title" => "Články")); ?> <h1 class="text-center">Články</h1> <?php if (count($posts)) { foreach ($posts as $post) { ?> <div class="post extra-padding"> <h2><a href="<?php echo $post["link"]; ?> "><?php echo $post["title"]; ?> </a></h2> <div class="post-info"> Napísal <a href="<?php echo $post["user_link"]; ?> "><strong><?php echo $post["user_name"]; ?> </strong></a> dňa <?php echo $post["created_at"];
if (!$post) { show_404(); } // ak prihlásený užívateľ nie je majteľom článku, zobrazíme 404 stránku if (!is_owner($post)) { show_404(); } // ak bol na túto stránku odoslaný formulár... if (is_post()) { // ... vymažeme článok ... if (delete_post($post_id)) { // ... a ak sa úspešne vymazal, presmerujeme na úvodnú stránku redirect(); } } include_header(array("title" => "Vymazanie článku")); ?> <h1 class="text-center">Vymazanie článku</h1> <h2><?php echo $post["title"]; ?> </h2> <p><?php echo $post["teaser"]; ?> </p> <form method="post"> <input type="submit" value="Vymazať" onclick="return confirm('Naozaj chcete vymazať tento článok?')">
function content_55e44441c21315_45821929($_smarty_tpl) { if (!is_callable('smarty_modifier_replace')) { include '/var/www/includes/smartyv3/plugins/modifier.replace.php'; } ?> <script> var baseurl = '<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> '; var imageurl = '<?php echo $_smarty_tpl->tpl_vars['imageurl']->value; ?> '; </script> <script type="text/javascript"> var embedPlayerWidth = '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_width']; ?> '; var embedPlayerHeight = '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_height']; ?> '; var autoPlayEmbed = '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['autoplay_embed']; ?> '; var embed_type = '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type']; ?> '; function updateEmbed(width,height,autoplay) { $('#embed_code').val( $('#embed_code').val().replace(/width=\"([0-9]+)\"/g,'width="'+width+'"') ); $('#embed_code').val( $('#embed_code').val().replace(/height=\"([0-9]+)\"/g,'height="'+height+'"') ); $('#embed_code').val( $('#embed_code').val().replace(/width=([0-9]+)/g,'width='+width) ); $('#embed_code').val( $('#embed_code').val().replace(/height=([0-9]+)/g,'height='+height+'') ); } function switchEmbedCode(type) { if(embed_type==type) return false; else { embed_type = type; var alt_embed =$('#alternate_embed_code').val(); $('#alternate_embed_code').val($('#embed_code').val()); $('#embed_code').val(alt_embed); } } </script> <!-- Including JS Files--> <?php $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['type']->_loop = false; $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->JSArray; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) { $_smarty_tpl->tpl_vars['type']->_loop = true; ?> <?php $_smarty_tpl->tpl_vars['scope'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['scope']->_loop = false; $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['type']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['scope']->key => $_smarty_tpl->tpl_vars['scope']->value) { $_smarty_tpl->tpl_vars['scope']->_loop = true; $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['scope']->key; ?> <?php echo include_js(array('type' => $_smarty_tpl->tpl_vars['scope']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl); ?> <?php } } ?> <!-- Including JS Files--> <script type="text/javascript"> callURLParser(); </script> <!-- Including Plugin Headers --> <?php $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['type']->_loop = false; $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->header_files; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) { $_smarty_tpl->tpl_vars['type']->_loop = true; $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key; ?> <?php echo include_header(array('file' => $_smarty_tpl->tpl_vars['file']->value, 'type' => $_smarty_tpl->tpl_vars['type']->value), $_smarty_tpl); ?> <?php } ?> <!-- Ending Plugin Headers --> <?php if (@constant('THIS_PAGE') == 'upload') { ?> <link href="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/uploadify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/swfobject.js"></script> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/jquery.uploadify.v2.1.4.js"></script> <script type="text/javascript"> var jsURL = '<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> '; var uploadError = false; var file_name = '<?php echo $_smarty_tpl->tpl_vars['file_name']->value; ?> '; var lang = new Array(); lang['saveData'] = '<?php echo smarty_lang(array('code' => 'save_data'), $_smarty_tpl); ?> '; lang['savingData'] = '<?php echo smarty_lang(array('code' => 'saving'), $_smarty_tpl); ?> '; lang['remoteUploadFile'] = '<?php echo smarty_lang(array('code' => "remote_upload_file"), $_smarty_tpl); ?> '; lang['upload_video_button'] = '<?php echo smarty_lang(array('code' => "upload_video_button"), $_smarty_tpl); ?> '; var fileExt = '<?php echo smarty_modifier_replace($_smarty_tpl->tpl_vars['Cbucket']->value->list_extensions(), ",", ";"); ?> '; var uploadSwfPath = '<?php echo $_smarty_tpl->tpl_vars['uploaderDetails']->value['uploadSwfPath']; ?> '; var uploadScriptPath = '<?php echo $_smarty_tpl->tpl_vars['uploaderDetails']->value['uploadScriptPath']; ?> '; var time_stamp = <?php echo time(); ?> ; function show_error(msg,ID,fade) { $('#file_uploads'+ID+' .percentage') .after('<div class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+msg+'<\/div><\/div>'); if(fade){$('.uploadSuccessDiv').delay(3000).fadeOut('slow');} } function show_message(msg,ID,fade) { $('#uploadForm'+ID) .prepend('<div class=\"uploadSuccessDiv\"><div class=\"uploadSuccessMsg\">'+msg+'<\/div><\/div>'); if(fade){$('.uploadSuccessDiv').delay(3000).fadeOut('slow');} } function doUpdateVideo(formId,ID) { var formObjectData = $(formId).serialize(); //alert(serializedData); $('#updateVideoDataLoading').html('<img src="'+imageurl+'/ajax-loader.gif" />'); $('#cbSubmitUpload'+ID) .attr('disabled','disabled') .attr("value",lang.savingData) .attr("onClick","return false;"); $.post( baseurl+'/actions/file_uploader.php',formObjectData,function(data) { if(data.msg) show_message(data.msg,ID,true); if(data.error) show_error(data.error,ID,true); $('#updateVideoDataLoading').empty(); $('#cbSubmitUpload'+ID) .removeAttr("disabled") .attr("value",lang.saveData) .attr("onClick","doUpdateVideo('#uploadForm"+ID+"','"+ID+"')") },"json" ) } $(document).ready(function() { var instanceNumber = 0; function showUploadify(object) { $(object).uploadify({ 'uploader' : uploadSwfPath, 'scriptAccess' : 'always', 'script' : uploadScriptPath, 'cancelImg' : imageurl+'/cancel_upload.png', 'auto' : true, 'removeCompleted' : false, 'displayData' : 'both', 'fileExt' : fileExt, 'multi' : true, 'fileDesc' : 'Video Files', 'buttonText' : lang.upload_video_button, 'queueID' : 'fileUploadQueue', 'queueLimit' : 2, 'onOpen' : function(event,ID,fileObj) { uploadError = false; filename = new Date().getTime() + Math.round((99977 - 10016) * Math.random() + 1) ; $.ajax({ url: baseurl+'/actions/file_uploader.php', type: "POST", data:({"getForm":"get_form","title":fileObj.name,"objId":ID}), dataType: "text", success: function(data) { if(!uploadError) { $('#file_uploads'+ID).append(data); } } }); return true; }, 'onComplete' : function(event, ID, fileObj, response, data) { var resObj = eval('(' + response + ')'); var vid = ""; if(resObj.success=='yes') { var file_name = resObj.file_name; $.ajax({ url: baseurl+'/actions/file_uploader.php', type: "POST", data:({"insertVideo":"yes","title":fileObj.name,"file_name":file_name,'time_stamp' : time_stamp}), dataType: "text", success: function(data) { if(data.error) { show_error(data.error,ID,true); }else { vid = data.videoid; $("#uploadForm"+ID+" #title").after('<input type="hidden" name="videoid" value="'+vid+'" id="videoid" />') .after('<input type="hidden" name="updateVideo" value="yes" id="updateVideo" />'); $('#cbSubmitUpload'+ID) .before('<span id="updateVideoDataLoading" style="margin-right:5px"></span>') .removeAttr("disabled") .attr("value",lang.saveData) .attr("onClick","doUpdateVideo('#uploadForm"+ID+"','"+ID+"')"); doUpdateVideo('#uploadForm'+ID,ID); } } }); }else { $("#upload_form"+ID).empty().remove(); show_error(resObj.error,ID,false); uploadError = true; return false; } } }); } showUploadify('#file_uploads'); }); </script> <?php } else { ?> <script type="text/javascript"> window.onload = function() { <?php if ($_smarty_tpl->tpl_vars['total_quicklist']->value) { ?> load_quicklist_box(); <?php } ?> ini_cookies(); } </script> <?php } ?> <?php if (@constant('THIS_PAGE') == 'photo_upload') { ?> <link href="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/uploadify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/swfobject.js"></script> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['js']->value; ?> /uploadify/jquery.uploadify.v2.1.4.js"></script> <script type="text/javascript" language="javascript"> fileExt = '<?php echo $_smarty_tpl->tpl_vars['cbphoto']->value->extensions(); ?> ', lang = new Array(), pData = new Array(), ajaxImage = '<img src="'+imageurl+'/ajax-loader.gif" style="vertical-align:middle;" /> ', uploadError = false; <?php if ($_GET['collection']) { ?> <?php if (isset($_smarty_tpl->tpl_vars['cid'])) { $_smarty_tpl->tpl_vars['cid'] = clone $_smarty_tpl->tpl_vars['cid']; $_smarty_tpl->tpl_vars['cid']->value = $_smarty_tpl->tpl_vars['cbphoto']->value->decode_key($_GET['collection']); $_smarty_tpl->tpl_vars['cid']->nocache = null; $_smarty_tpl->tpl_vars['cid']->scope = 0; } else { $_smarty_tpl->tpl_vars['cid'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbphoto']->value->decode_key($_GET['collection']), null, 0); } ?> <?php if ($_smarty_tpl->tpl_vars['cbphoto']->value->is_addable($_smarty_tpl->tpl_vars['cid']->value)) { ?> collectionID = '<?php echo $_smarty_tpl->tpl_vars['cid']->value; ?> '; <?php } } ?> lang['browsePhrase'] = '<?php echo smarty_lang(array('code' => "browse_photos"), $_smarty_tpl); ?> '; lang['saveData'] = "<?php echo smarty_lang(array('code' => 'save_data'), $_smarty_tpl); ?> "; lang['savingData'] = "<?php echo smarty_lang(array('code' => 'saving'), $_smarty_tpl); ?> "; lang['upPhoto'] = "<?php echo smarty_lang(array('code' => 'update_photo'), $_smarty_tpl); ?> "; var uploadSwfPath = '<?php echo $_smarty_tpl->tpl_vars['photoUploaderDetails']->value['uploadSwfPath']; ?> '; var uploadScriptPath = '<?php echo $_smarty_tpl->tpl_vars['photoUploaderDetails']->value['uploadScriptPath']; ?> '; function photoMessage(message,ID,fade) { if(document.getElementById(ID+"Message")) $("#"+ID+"Message").children(":first-child").html(message).end().fadeIn('slow'); else { $("#Form"+ID).before('<div id=\"'+ID+'Message\" class=\"uploadSuccessDiv\"><div class=\"uploadSuccessMsg\">'+message+'<\/div><\/div>'); } if(fade) $("#"+ID+"Message").delay(300).fadeOut('slow'); } function photoError(message,ID,fade) { if(document.getElementById(ID+"Error")) $("#"+ID+"Error").children(":first-child").html(message).end().fadeIn('slow'); else { $("#Form"+ID) .before('<div id=\"'+ID+'Error\" class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+message+'<\/div><\/div>'); } if(fade) $("#"+ID+"Error").delay(3000).fadeOut('slow'); } function QueueLimitError(message,fade) { $("#photoUploadQueue") .before('<div id=\"QueueError\" style=\"margin-top:6px;\" class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+message+'<\/div><\/div>'); if(fade) $("#QueueError").delay(5000).fadeOut('slow'); } function insertAjaxPhoto(ID,filename,extension,server_url,folder) { var photoFields = $("#Form"+ID).serialize(); $.ajax({ url : baseurl+'/actions/photo_uploader.php', type : 'POST', dataType : 'json', data : photoFields+"&filename="+filename+"&ext="+extension+"&insertPhoto=yes&server_url="+server_url+ "&folder="+folder, beforeSend : function() { $("#cbSubmitUpload"+ID).html(ajaxImage+lang.savingData).attr('disabled','disabled'); }, success : function(data) { if(data.error) { photoError(data.error,ID,true); $("#cbSubmitUpload"+ID).html("Save Photo") .removeAttr('disabled').attr('onClick','insertAjaxPhoto("'+ID+'","'+filename+'","'+extension+'");'); } if(data.success) { photoMessage(data.success,ID,true); showPhotoPreview(ID,data.photoPreview); $("<input />").attr({ 'id' : 'photo_id', 'name' : 'photo_id', 'value' : data.photoID, 'type' : 'hidden' }).prependTo('#Form'+ID); $("#cbSubmitUpload"+ID).html(lang.upPhoto) .removeAttr('disabled').attr('onClick','updateAjaxPhoto("'+ID+'");'); } } }) } function updateAjaxPhoto(ID) { var updateFields = $("#Form"+ID).serialize(); $.ajax({ url : baseurl+'/actions/photo_uploader.php', type : 'POST', dataType : 'json', data : updateFields+"&updatePhoto=yes", beforeSend : function() { $("#cbSubmitUpload"+ID).html(ajaxImage+lang.upPhoto).attr('disabled','disabled'); }, success : function(data) { if(data.error) { photoError(data.error,ID,true); $("#cbSubmitUpload"+ID).removeAttr('disabled').html(lang.upPhoto); } if(data.success) { photoMessage(data.success,ID,true); $("#Form"+ID).hide(); $("#cbSubmitUpload"+ID).removeAttr('disabled').html(lang.upPhoto); if(!document.getElementById("toggle"+ID)) { $("<a></a>") .addClass('reUpdateButton') .attr({ "id" : "toggle"+ID, "href" : "#reUpdate", "onClick" : "$('#Form"+ID+"').toggle(); return false;", "title" : "Toggle Photo Form" }).html('Re-'+lang.upPhoto).appendTo("#photo_uploads"+ID+" .percentage").fadeIn(350); } } } }) } function showPhotoPreview(ID,preview) { var object = $("#"+ID+"Preview"), parentObj = object.parent(); var FinalPreview = new Image(); FinalPreview.src = preview; $(FinalPreview).load(function() { object.hide(); $("<img />") .addClass(object.attr('class')) .attr({ "id" : "FinalPreview"+ID, "src" : preview }).appendTo(parentObj).fadeIn('normal'); }); } function update_collection_selection(obj) { if($("#CollectionResult").css('display') == 'block') $("#CollectionResult").slideUp('fast'); var This = $(obj), thisObj = obj; This.attr('disabled','disabled'); This.after(ajaxImage); collectionID = thisObj.value; setTimeout(function(){ This.next().remove(); $("#CollectionResult").html("<div class='msg'>Collection Selected</div>").slideDown(350); This.removeAttr('disabled'); },1000); } $(document).ready(function() { function photoUploadify(object) { $(object).uploadify( { 'uploader' : uploadSwfPath, 'script' : uploadScriptPath, 'scriptAccess' : 'always', 'fileDataName' : 'photoUpload', 'cancelImg' : imageurl+'/cancel_upload.png', 'auto' : true, 'removeCompleted' : false, 'displayData' : 'both', 'fileExt' : fileExt, 'multi' : true, 'queueSizeLimit': '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['photo_multi_upload']; ?> ', 'fileDesc' : 'Photo Files', 'buttonText' : lang.browsePhrase, 'queueID' : 'photoUploadQueue', 'sizeLimit' : '<?php echo $_smarty_tpl->tpl_vars['cbphoto']->value->max_file_size; ?> ', 'onSelect' : function(event,ID,fileObj) { uploadError = false; $.ajax({ url : baseurl+'/actions/photo_uploader.php', dataType : 'json', type : 'POST', data : ({ "photoForm":"yes" , "objID":ID , "name":fileObj.name , "collection":collectionID }), success : function(data) { if(!uploadError) $("#photo_uploads"+ID).append(data['form']); } }); }, 'onComplete' : function(event,ID,fileObj,response,data) { var resObj = $.parseJSON(response); if(resObj.success == "yes") { insertAjaxPhoto(ID,resObj.filename,resObj.extension,resObj.server_url,resObj.folder); } }, 'onQueueFull' : function(event,queueSizeLimit) { QueueError = "I'm stuffed, "+queueSizeLimit+" is my limit. Thanks."; QueueLimitError(QueueError,true); return false; }, 'onError' : function(event,ID,fileObj,errorObj) { uploadError = true; } }); } photoUploadify('#photo_uploads'); }); </script> <?php } ?> <?php if (@constant('THIS_PAGE') == 'view_item') { ?> <script type="text/javascript"> var Seo = '<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['seo']; ?> '; onReload_item(); </script> <?php } ?> <?php if (@constant('THIS_PAGE') == 'watch_video' || $_smarty_tpl->tpl_vars['object']->value['videoid']) { ?> <?php if ($_smarty_tpl->tpl_vars['object']->value['videoid']) { if (isset($_smarty_tpl->tpl_vars['vdo'])) { $_smarty_tpl->tpl_vars['vdo'] = clone $_smarty_tpl->tpl_vars['vdo']; $_smarty_tpl->tpl_vars['vdo']->value = $_smarty_tpl->tpl_vars['object']->value; $_smarty_tpl->tpl_vars['vdo']->nocache = null; $_smarty_tpl->tpl_vars['vdo']->scope = 0; } else { $_smarty_tpl->tpl_vars['vdo'] = new Smarty_variable($_smarty_tpl->tpl_vars['object']->value, null, 0); } ?> <?php } ?> <meta property="og:title" content="<?php echo $_smarty_tpl->tpl_vars['vdo']->value['title']; ?> " /> <meta property="og:description" content="<?php echo preg_replace('!<[^>]*?>!', ' ', description($_smarty_tpl->tpl_vars['vdo']->value['description'])); ?> " /> <meta property="og:image" content="<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl); ?> " /> <?php if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['facebook_embed'] == 'yes') { ?> <meta property="og:type" content="video"> <meta property="og:video" content='<?php echo fb_embed_video(array('video' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl); ?> '> <meta property="og:video:height" content="259" /> <meta property="og:video:width" content="398" /> <meta property="og:video:type" content="application/x-shockwave-flash"> <?php } ?> <meta property='og:url' content='<?php echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl); ?> '/> <meta property='og:site_name' content='<?php echo $_smarty_tpl->tpl_vars['website_title']->value; ?> '/> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['object']->value['photo_id']) { ?> <meta property="og:title" content="<?php echo $_smarty_tpl->tpl_vars['object']->value['photo_title']; ?> " /> <meta property="og:description" content="<?php echo description($_smarty_tpl->tpl_vars['object']->value['photo_description']); ?> " /> <meta property="og:image" content="<?php echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['object']->value, 'size' => 'm', 'output' => 'non_html', 'alt' => $_smarty_tpl->tpl_vars['object']->value['photo_title']), $_smarty_tpl); ?> " /> <meta name="medium" content="image" /> <?php } ?> <?php if (@constant('THIS_PAGE') == 'view_channel') { ?> <meta property="og:title" content="<?php echo $_smarty_tpl->tpl_vars['user']->value['username']; ?> " /> <?php } ?> <?php if (@constant('THIS_PAGE') == 'videos') { ?> <meta property="og:description" content="this is a videos page of ClipBucket"/> <?php } ?> <script> $(function() { /*$( ".date_field" ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true, yearRange : "1901 : c" });*/ }); </script> <?php echo ANCHOR(array('place' => 'cb_head'), $_smarty_tpl); ?> <!-- ClipBucket version <?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->cbinfo['version']; ?> --><?php }
<?php if (is_logged_in()) { redirect(); } if (is_post()) { if (do_login()) { redirect(); } } if (isset($_COOKIE["email"])) { $_POST["email"] = $_COOKIE["email"]; } include_header(array("title" => "login")); ?> <div class="row"> <div class="col-md-4 col-md-offset-4"> <form id="login-form" method="post"> <div class="form-group"> <label for="inputEmail" class="sr-only">email address</label> <input type="email" name="email" id="inputEmail" class="form-control" placeholder="email address" value="<?php echo isset($_POST["email"]) ? plain($_POST["email"]) : ""; ?> " required autofocus> </div> <div class="form-group"> <label for="inputPassword" class="sr-only">password</label> <input type="password" name="password" id="inputPassword" class="form-control" placeholder="password" required>
<?php include_header('tags'); ?> <div class="wrapper"> <?php include_sidebar(); ?> <div id="right-content"> <h2 class="title-header"><?php single_tag_title(); ?> </h2> <div id="posts"> <?php $x = 0; ?> <?php if (have_posts()) { ?> <?php while (have_posts()) { the_post(); ?> <div class="shallow-post<?php if ($x % 2) { ?> alt<?php }
<?php // ak je človek prihlásený if (is_logged_in()) { // presmeruj ho na úvodnú stránku, pretože sa už nemusí prihlasovať redirect(); } if (is_post()) { if (do_register()) { redirect('/prihlasenie'); } } include_header(array("title", "Registrácia")); ?> <h1 class="text-center">Registrácia</h1> <div class="max-width-300px"> <form method="post"> <label for="name">Meno:</label> <input type="text" name="name" id="name" value="<?php echo isset($_POST["name"]) ? plain($_POST["name"]) : ""; ?> "> <label for="email">Email:</label> <input type="email" name="email" id="email" value="<?php echo isset($_POST["email"]) ? plain($_POST["email"]) : ""; ?> ">
function content_55e44441897a91_94399789($_smarty_tpl) { if (!is_callable('smarty_modifier_date_format')) { include '/var/www/includes/smartyv3/plugins/modifier.date_format.php'; } ?> <!DOCTYPE HTML> <html> <head> <?php if (in_dev()) { ?> <?php if (isset($_smarty_tpl->tpl_vars['cache_buster'])) { $_smarty_tpl->tpl_vars['cache_buster'] = clone $_smarty_tpl->tpl_vars['cache_buster']; $_smarty_tpl->tpl_vars['cache_buster']->value = microtime(true); $_smarty_tpl->tpl_vars['cache_buster']->nocache = null; $_smarty_tpl->tpl_vars['cache_buster']->scope = 0; } else { $_smarty_tpl->tpl_vars['cache_buster'] = new Smarty_variable(microtime(true), null, 0); } ?> <?php } else { ?> <?php if (isset($_smarty_tpl->tpl_vars['cache_buster'])) { $_smarty_tpl->tpl_vars['cache_buster'] = clone $_smarty_tpl->tpl_vars['cache_buster']; $_smarty_tpl->tpl_vars['cache_buster']->value = $_smarty_tpl->tpl_vars['Cbucket']->value->version; $_smarty_tpl->tpl_vars['cache_buster']->nocache = null; $_smarty_tpl->tpl_vars['cache_buster']->scope = 0; } else { $_smarty_tpl->tpl_vars['cache_buster'] = new Smarty_variable($_smarty_tpl->tpl_vars['Cbucket']->value->version, null, 0); } ?> <?php } ?> <script src="//code.jquery.com/jquery-latest.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var loading = '<i class="fa fa-spinner fa-spin"></i> <?php echo smarty_lang(array('code' => "loading"), $_smarty_tpl); ?> ...'; var baseurl = "<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> "; var imageurl = "<?php echo $_smarty_tpl->tpl_vars['imageurl']->value; ?> "; </script> <!-- custom scrollbars plugin --> <script src="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /js/jquery.mCustomScrollbar.concat.min.js"></script> <script> (function($){ $(window).load(function(){ $("#content_1").mCustomScrollbar({ scrollButtons:{ enable:true } }); }); })(jQuery); </script> <!-- ClipBucket v<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->version; ?> --> <meta name="copyright" content="ClipBucket - Integrated Units 2007 - <?php echo smarty_modifier_date_format(time(), "%Y"); ?> " /> <meta name="author" content="Arslan Hassan - http://clip-bucket.com/arslan-hassan" /> <meta name="author" content="Fawaz Tahir - http://clip-bucket.com/fawaz-tahir" /> <link rel="shortcut icon" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /favicon.ico"> <link rel="icon" type="image/ico" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /favicon.ico" /> <!-- RSS FEEDS --> <?php echo rss_feeds(array('link_tag' => true), $_smarty_tpl); ?> <meta name="keywords" content="<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['keywords']; ?> " /> <meta name="description" content="<?php echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['description']; ?> " /> <meta name="distribution" content="global" /> <title><?php echo cbtitle(array(), $_smarty_tpl); ?> </title> <link href='//fonts.googleapis.com/css?family=Rambla:400,700|Roboto:400,700|Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/bootstrap.min.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <?php if (this_page('index')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/home.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <?php } ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/main.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/ClipBucket.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/channel.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/groups.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> " /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/header.css?cache=<?php echo $_smarty_tpl->tpl_vars['cache_buster']->value; ?> "> <link href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/jquery.mCustomScrollbar.css" rel="stylesheet" /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/font-awesome.min.css"> <?php if (this_page('watch_video') || this_page('view_item') || this_page('view_channel')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/watch-video.css"> <?php } ?> <?php if (this_page('view_channel')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/view-channel-header.css"> <?php } ?> <?php if (this_page('photo_upload') || this_page('upload')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/uploader.css"> <?php } ?> <?php if (this_page('view_channel')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /css/view_channel.css"> <?php } ?> <?php if (this_page('signup')) { ?> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /styles/global/jquery_ui.css"> <?php } ?> <?php if (this_page('index')) { ?> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/custom-elements.js"></script> <?php } ?> <?php echo ANCHOR(array('place' => 'ajax_data'), $_smarty_tpl); ?> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /js/functions.js"></script> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /js/admin_functions.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/bootstrap.min.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/masonary.desandro.min.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /js/clipbucket.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/masonary.desandro.min.js"></script> <script src='https://www.google.com/recaptcha/api.js'></script <!-- Script For Home Page Videos Slider //--> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/jssor.slider.min.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/uslider_js/jquery.easing.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/uslider_js/jquery.mousewheel.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /js/uslider_js/jquery.ulslide.js?v=4"></script> <!-- Script For Home Page Videos Slider //--> <?php if (isset($_smarty_tpl->tpl_vars['quicklist'])) { $_smarty_tpl->tpl_vars['quicklist'] = clone $_smarty_tpl->tpl_vars['quicklist']; $_smarty_tpl->tpl_vars['quicklist']->value = json_encode($_smarty_tpl->tpl_vars['cbvid']->value->get_quicklist()); $_smarty_tpl->tpl_vars['quicklist']->nocache = null; $_smarty_tpl->tpl_vars['quicklist']->scope = 0; } else { $_smarty_tpl->tpl_vars['quicklist'] = new Smarty_variable(json_encode($_smarty_tpl->tpl_vars['cbvid']->value->get_quicklist()), null, 0); } ?> <script> $(document).ready(function(){ var quicklist_videos = '<?php echo $_smarty_tpl->tpl_vars['quicklist']->value; ?> '; if (quicklist_videos) quicklist_videos_check(quicklist_videos); loading = '<i class="fa fa-spinner fa-spin"></i> <?php echo smarty_lang(array('code' => "loading"), $_smarty_tpl); ?> ...'; /* var container = document.querySelector('.the_'); var msnry = new Masonry( container, { // options itemSelector: '.the-item', stamp : '.ad-box' }); */ // less.watch({ // poll : 300 // }); // For changing language on Click in footer $( 'ul#photos li:visible' ).each( function( i ){ $( this )[ (1&i) ? 'addClass' : 'removeClass' ]( 'photo-land-no' ); }); // Language change select code $('#lang_selector').change(function(){ var optionSelectedValue = $('#lang_selector option:selected').val(); if(optionSelectedValue) { var $currentLocation = window.location.href, matchedElement = $currentLocation.match(/\?/); if(matchedElement == null) { window.location = "?set_site_lang="+optionSelectedValue; } else { window.location = window.location+"&set_site_lang="+optionSelectedValue; } } }); }); </script> <?php echo include_header(array('file' => 'global_header'), $_smarty_tpl); ?> </head><?php }
<?php // ak je človek prihlásený if (is_logged_in()) { // presmeruj ho na úvodnú stránku, pretože sa už nemusí prihlasovať redirect(); } // ak bol odoslaný prihlasovací formulár, existujú premenné email a password if (is_post()) { // prihlás užívateľa if (do_login()) { redirect(); } } include_header(array("title" => "Prihlásenie")); ?> <h1 class="text-center">Prihlásenie</h1> <div class="max-width-300px"> <form method="post"> <label for="email">Email:</label> <input type="email" name="email" id="email" value="<?php echo isset($_POST["email"]) ? plain($_POST["email"]) : ""; ?> "> <label for="password">Heslo:</label> <input type="password" name="password" id="password">
<?php $tag = segment(2); if (!$tag) { show_404(); } $tag = urldecode($tag); $posts = get_posts_by_tag($tag); include_header(array("title" => "Tag " . $tag)); ?> <h1 class="text-center">Články s tagom <?php echo plain($tag); ?> </h1> <?php if (count($posts)) { foreach ($posts as $post) { ?> <div class="post"> <h2><a href="<?php echo $post["link"]; ?> "><?php echo $post["title"]; ?> </a></h2> <div class="post-info">
<?php if (!is_logged_in()) { redirect("login"); } if (is_post()) { if (edit_task(get_user_id(), segment(2))) { redirect("edit/" . segment(2)); } } $task = get_task(get_user_id(), segment(2)); if (!$task) { show_404(); } include_header(array("title" => "edit", "show_logout" => true)); ?> <div class="row"> <div class="col-md-12"> <form id="js-form-edit" method="post"> <div class="form-group"> <textarea class="form-control" name="text" id="js-text" rows="4" title=""><?php echo plain($task["task_text"]); ?> </textarea> </div> <div class="form-group"> <input name="id" type="hidden" value="<?php echo plain($task["task_id"]); ?> "> <button class="btn btn-sm btn-danger" type="submit">edit task</button>
// ak bol na túto stránku odoslaný formulár... if (is_post()) { // ... vymažeme článok ... if (edit_post($post_id)) { // ... a ak sa úspešne aktualizoval skúsime pridať alebo odstrániť obrázok... if ($post["has_image"] && isset($_POST["delete_image"])) { deleteImage($post_id); } else { addImage($post_id); } // ... a nakoniec presmerujeme na článok redirect("clanok/" . $post_id); } } $tags = get_tags($post["id"]); include_header(array("title" => "Úprava článku")); ?> <h1 class="text-center">Úprava článku</h1> <form method="post" enctype="multipart/form-data"> <label for="title"><strong>Názov článku:</strong></label> <input type="text" name="title" id="title" value="<?php echo isset($_POST["title"]) ? $_POST["title"] : plain($post["title"]); ?> "> <label for="text"><strong>Text článku:</strong></label> <textarea name="text" id="text"><?php echo isset($_POST["text"]) ? $_POST["text"] : plain($post["text"]);
<?php $post_id = segment(2); $post = get_post($post_id); if (empty($post)) { show_404(); } include_header(array("title" => $post["title"])); ?> <div class="post"> <h1 class="text-center"><?php echo $post["title"]; ?> </h1> <?php if ($post["has_image"]) { ?> <div class="post-image"> <img src="<?php echo image_url($post["id"]); ?> " alt=""> </div> <?php } ?> <div class="post-info">
<?php include_header(); ?> <div class="wrapper"> <?php include_sidebar('home'); ?> <div id="right-content"> <div id="posts"> <?php $x = 0; ?> <?php if (have_posts()) { ?> <?php while (have_posts()) { the_post(); ?> <div class="shallow-post<?php if ($x % 2) { ?> alt<?php } ?> "> <?php if (has_post_thumbnail()) {
<?php include_header('footer'); ?> <div class="wrapper"> <?php include_sidebar('footer'); ?> <div id="right-content"> <h2 class="search center">Sorry, we couldn't find what you were looking for.</h2> <div class="clear"></div> </div> <div class="clear"></div> </div> <?php get_footer();
<?php include_header('post'); ?> <div class="wrapper"> <?php include_sidebar('post'); ?> <div id="right-content"> <div id="post"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <h2><?php the_title(); ?> </h2> <div id="context"> <?php the_content(''); ?> </div> <span class="meta">posted on <?php strtolower(the_time('l, F jS, Y')); ?> by <a href="<?php the_author_url();
function content_56afd771f0ba60_43988601($_smarty_tpl) { ?> <meta charset="UTF-8"> <title><?php echo cbtitle(array(), $_smarty_tpl); ?> </title> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/font-awesome.min.css" /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /css/styles.css" /> <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/font-awesome-ie7.min.css" /> <![endif]--> <!-- page specific plugin styles --> <!-- fonts --> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,300" /> <!-- ace styles --> <?php if (!this_page('admin_login')) { ?> <!-- these css file not includes in admin area login.html --> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/ace.min.css" /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/ace-rtl.min.css" /> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/ace-skins.min.css" /> <?php } ?> <!--[if lte IE 8]> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/css/ace-ie.min.css" /> <![endif]--> <!-- inline styles related to this page --> <script type="text/javascript"> var baseurl = "<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> "; var imageurl = "<?php echo $_smarty_tpl->tpl_vars['imageurl']->value; ?> "; </script> <!-- ace settings handler --> <script src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /assets/js/ace-extra.min.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> /js/clipbucket.js"></script> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="assets/js/html5shiv.js"></script> <script src="assets/js/respond.min.js"></script> <![endif]--> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /../../../../js/functions.js"></script> <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /../../../../js/admin_functions.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <!-- for bootstrap wysiwyg --> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /css/summernote.css" /> <script src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /js/editor.js"></script> <script src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /js/main.js"></script> <!-- for bootstrap wysiwyg --> <!-- for popovers --> <script> $(function (){ $(".popoverButton").popover(); }); </script> <!-- bootstrap x-editable --> <link rel="stylesheet" href="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /bootstrap-editable/css/bootstrap-editable.css" /> <script src="<?php echo $_smarty_tpl->tpl_vars['theme_url']->value; ?> /bootstrap-editable/js/bootstrap-editable.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.xedit').editable({ mode: 'inline', url:baseurl+'/admin_area/index.php?mode=update_pharse', pk: function(){ var id = $(this).attr("id"); id = id.match(/([0-9]+)$/g); return id.pop(); }, }); }); </script> <script> $(document).ready(function() { $('.edit_lang').editable(baseurl+'/actions/update_phrase.php', { alert('yu'); // cancel : 'Cancel', // submit : 'OK', indicator : '<img src="'+baseurl+'/images/icons/progIndicator.gif">', tooltip : 'Click to edit...', }); }); $(document).ready(function(){ $(".drop").on({ click: function(e){ var ele = $(this).parent().nextAll("#content").get(0); $(ele).toggle(); } }); }); </script> <script> $(document).ready(function() { $('#desc').summernote(); }); </script> <script> $(function(){ $(".saveTodo").click(function(e){ var self = this; var newVal = $(this).parent().parent().find("input[name='todo']").val(); if(newVal.length){ var ajaxCall = $.ajax({ url: "<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> " + "/admin_area/index.php", type: "post", data: { val: newVal, mode: "add_todo", }, }); ajaxCall.success(function(data){ data = $.parseJSON(data); var p = document.createElement("p"); p.className = "xedit editable editable-click"; var input = document.createElement("input"); input.type = "hidden"; input.name = "todoid"; input.value = data.id; var b = document.createElement("b"); b.innerHTML = data.todo; p.appendChild(input); p.appendChild(b); console.log(p); $(self).parents("form").after(p); }); }else{ alert("Please enter a valid value"); } }); $("#todolist").on("click", ".editable-clear-x", function(e){ e.preventDefault(); var self = this; var id = $(this).parents(".editable-container").prev().attr("id"); id = id.match(/([0-9]+)$/g); id = id.pop(); var ajaxCall = $.ajax({ url: "<?php echo $_smarty_tpl->tpl_vars['baseurl']->value; ?> " + "/admin_area/index.php", type: "post", data: { id: id, mode: "delete_todo", }, }); ajaxCall.success(function(data){ $(self).parents("p").remove(); $(self).parents(".editable-container").remove(); }); e.stopPropagation(); }); }); </script> <?php if ($_smarty_tpl->tpl_vars['Cbucket']->value->AdminJSArray) { ?> <!-- Including JS Files--> <?php $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['type']->_loop = false; $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->AdminJSArray; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) { $_smarty_tpl->tpl_vars['type']->_loop = true; $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key; ?> <?php if ($_smarty_tpl->tpl_vars['curActive']->value == $_smarty_tpl->tpl_vars['type']->value || $_smarty_tpl->tpl_vars['type']->value == 'global') { ?> <?php echo include_js(array('type' => $_smarty_tpl->tpl_vars['type']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl); ?> <?php } } ?> <!-- Including JS Files--> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['Cbucket']->value->admin_header_files) { ?> <!-- Including Headers --> <?php $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['type']->_loop = false; $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->admin_header_files; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) { $_smarty_tpl->tpl_vars['type']->_loop = true; $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key; ?> <?php echo include_header(array('type' => $_smarty_tpl->tpl_vars['type']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl); ?> <?php } ?> <!-- Ending Headers --> <?php } }
<?php $user_id = segment(2); $user = get_user($user_id); if (empty($user)) { show_404(); } $posts = get_posts_by_user($user_id); include_header(array("title" => "Autor " . $user["name"])); ?> <h1 class="text-center">Články autora <?php echo $user["name"]; ?> </h1> <?php if (count($posts)) { foreach ($posts as $post) { ?> <div class="post"> <h2><a href="<?php echo $post["link"]; ?> "><?php echo $post["title"]; ?> </a></h2> <div class="post-info">
<?php if (!empty($_GET["search"])) { $posts = get_posts_like($_GET["search"]); } else { $posts = array(); } include_header(array("title" => "Vyhľadávanie")); ?> <h1 class="text-center">Vyhľadávanie</h1> <form method="get"> <label for="search"><strong>Čo hľadáte?</strong></label> <input type="text" name="search" id="search" value="<?php echo isset($_GET["search"]) ? $_GET["search"] : plain($post["search"]); ?> " autofocus> <input type="submit" value="Hľadať"> </form> <?php if (!empty($_GET["search"])) { if (count($posts)) { foreach ($posts as $post) { ?> <div class="post extra-padding"> <h2><a href="<?php
<?php if (!is_logged_in()) { redirect("login"); } if (is_post()) { if (delete_task(get_user_id(), segment(2))) { redirect(); } } $task = get_task(get_user_id(), segment(2)); if (!$task) { show_404(); } include_header(array("title" => "delete", "show_logout" => true)); ?> <div class="row"> <div class="col-md-12"> <form id="js-form-delete" method="post"> <div class="form-group"> <textarea disabled class="form-control" id="js-text" rows="4" title=""><?php echo plain($task["task_text"]); ?> </textarea> </div> <div class="form-group"> <input name="id" type="hidden" value="<?php echo plain($task["task_id"]); ?> "> <button class="btn btn-sm btn-danger" type="submit">delete task</button>
<?php if (!is_logged_in()) { redirect("login"); } if (is_post()) { if (add_task(get_user_id())) { redirect(); } } $tasks = get_tasks(get_user_id()); include_header(array("title" => "your todo list", "show_logout" => true)); ?> <div class="row"> <div class="col-md-12"> <form id="js-form-add" method="post"> <div class="form-group"> <textarea class="form-control" name="text" id="js-text" rows="4" placeholder="is there something to do?"><?php echo isset($_POST["text"]) ? plain($_POST["text"]) : ""; ?> </textarea> </div> <div class="form-group js-hide"> <button class="btn btn-sm btn-danger" type="submit">add new task</button> </div> </form> </div> <div class="col-md-12">
<?php if (have_posts()) { while (have_posts()) { the_post(); $post_name = $wpdb->get_var($wpdb->prepare("SELECT post_name FROM wp_posts WHERE id = %s", get_the_ID())); include_header($post_name . '-' . get_the_ID() . "-page"); ?> <div class="wrapper"> <?php include_sidebar($post_name); ?> <div id="right-content"> <div id="post"> <h2><?php the_title(); ?> </h2> <div id="context"> <?php the_content(''); ?> </div> </div> <?php } } else { ?> <p>Sorry, but you're it the wrong place.</p>
<?php include_header(array("title" => "O stránke")); ?> <h1 class="text-center">O stránke</h1> <table> <tr> <td>Meno:</td> <td>Pavel</td> </tr> <tr> <td>Priezvisko:</td> <td>Valuška</td> </tr> <tr> <td>Mesto:</td> <td>Zvolen </td> </tr> <tr> <td>Farba:</td> <td>biela, šedá, červená a čiera</td> </tr> <tr> <td>Jedlo:</td> <td>Čínska kuchyňa a vlastne zjem skoro všetko</td> </tr> <tr> <td>Portál:</td> <td>http://www.bengo.wz.cz/ :o)</td>
<?php if (is_logged_in()) { redirect(); } if (is_post()) { if (do_register()) { redirect("login"); } } include_header(array("title" => "registration")); ?> <div class="row"> <div class="col-md-4 col-md-offset-4"> <form id="login-form" method="post"> <div class="form-group"> <label for="inputName" class="sr-only">name</label> <input type="text" name="name" id="inputName" class="form-control" placeholder="name" value="<?php echo isset($_POST["name"]) ? plain($_POST["name"]) : ""; ?> " required autofocus> </div> <div class="form-group"> <label for="inputEmail" class="sr-only">email address</label> <input type="email" name="email" id="inputEmail" class="form-control" placeholder="email address" value="<?php echo isset($_POST["email"]) ? plain($_POST["email"]) : ""; ?> " required> </div>
<?php include_header(array("title" => "404")); ?> <h1 class="text-center">404</h1> <p class="text-center">Stránka nebola nájdená.</p> <?php include_footer();
<?php include_header(array("title" => "Úvodná stránka")); ?> <h1 class="text-center">Vitajte na Bengovom blogu!</h1> <?php include_footer();
<?php include_header('search'); ?> <div class="wrapper"> <?php include_sidebar(); ?> <div id="right-content"> <?php if (have_posts()) { ?> <h2 class="title-header">Your search for "<?php echo $_GET['s']; ?> "</h2> <div id="posts"> <?php $x = 0; ?> <?php while (have_posts()) { the_post(); ?> <div class="shallow-post<?php if ($x % 2) { ?> alt<?php }