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 }
the_search_query(); echo '”为您找到结果 '; global $wp_query; echo $wp_query->found_posts; echo ' 个'; } elseif (is_tag()) { $description = strip_tags(tag_description()); echo trim($description); } else { $description = strip_tags(term_description()); echo trim($description); } } ?> <meta name="description" content="<?php description(); ?> "> <meta name="keywords" content="<?php keywords(); ?> "> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <?php if (is_404()) { ?> <meta http-equiv='refresh' content=5;URL="<?php bloginfo('url'); ?> "> <?php
<?php defined('KOOWA') or die('Restricted access'); ?> <?php @title('Page Examples'); @description('The following are some examples of html pages that you can create for the com_html.'); ?> <div class="row"> <div class="span8"> <h1>Page Examples</h1> <p>The HTML component in anahita can be used for rendering custom php landing pages of all sorts while you get to use Anahita function calls and methods within this pages.</p> <p> The following are some examples of html pages that you can create for the com_html </p> <ol> <li> <a href="<?php echo @route('option=com_html&view=content&layout=examples/article'); ?> "> Simple Article </a> </li>
function generateGoogle() { date_default_timezone_set("America/Denver"); //include( plugin_dir_path( __FILE__ ) . 'functions.php'); global $woocommerce, $product, $post, $re_wcvt_options, $xml; $args = array('post_type' => 'product', 'posts_per_page' => -1); $loop = new WP_Query($args); $xml = new DOMDocument('1.0', 'UTF-8'); $xml->formatOutput = true; $rss = $xml->createElement("rss"); $rss_node = $xml->appendChild($rss); //add RSS element to XML node $rss_node->setAttribute("version", "2.0"); //set RSS version $rss_node->setAttribute("xmlns:atom", "http://www.w3.org/2005/Atom"); $rss_node->setAttribute("xmlns:g", "http://base.google.com/ns/1.0"); $currentItem = $xml->createElement("channel"); $currentItem = $rss_node->appendChild($currentItem); $currentItem->appendChild($xml->createElement('title', 'Novosbed')); $buildLinks = $xml->createElement('link'); $buildLinks = $currentItem->appendChild($buildLinks); $buildLinks->appendChild($xml->createCDATASection('http://wwww.novosbed.com')); $currentItem->appendChild($xml->createElement('description', '----------------------------------------------')); while ($loop->have_posts()) { $loop->the_post(); global $product; $product = get_product($loop->post); $attributes = $product->get_attributes(); //print_r($product); // Debug option make sure is commented out live //print_r($attributes); //checks if product is in stock and visable to public. if ($product->is_in_stock() && $product->is_visible()) { /* append it to the document created */ // Checks if product has sizes (twin/twin XL.. etc) if ($product->has_child()) { // Loops through products and gets variation attriubtes (sku/weight/etc) $ProdVar = $product->get_available_variations(); foreach ($ProdVar as $Variation) { $buildItem = $xml->createElement("item"); $buildItem = $currentItem->appendChild($buildItem); $buildItem->appendChild($xml->createElement('g:title', ucfirst(get_the_title()) . ' ' . ucfirst($Variation['attributes']['attribute_pa_firmness']))); // This is not working yet $buildLink = $xml->createElement('g:link'); $buildLink = $buildItem->appendChild($buildLink); $buildLink->appendChild($xml->createCDATASection(ucfirst(get_permalink()))); $buildItem->appendChild($xml->createElement('g:type', ucfirst(getGType()))); $buildCat = $xml->createElement('g:google_product_catergory'); $buildCat = $buildItem->appendChild($buildCat); $buildCat->appendChild($xml->createCDATASection(getCat())); $buildItem->appendChild($xml->createElement('g:brand', brand())); $buildItem->appendChild($xml->createElement('g:availablility', 'In Stock')); $buildItem->appendChild($xml->createElement('g:condition', 'New')); //Add shipping branch $buildShipping = $xml->createElement("g:shipping"); $buildShipping = $buildItem->appendChild($buildShipping); $buildShipping->appendChild($xml->createElement('g:country', 'US')); $buildShipping->appendChild($xml->createElement('g:service', 'FedEx Ground')); $buildShipping->appendChild($xml->createElement('g:price', '0.00 USD')); //Back to Item $buildItem->appendChild($xml->createElement('g:ID', $Variation['sku'])); // loop multi dimensional array to get size $buildItem->appendChild($xml->createElement('g:size', ucfirst($Variation['attributes']['attribute_pa_size']))); $buildItem->appendChild($xml->createElement('g:price', '$' . strip_tags($Variation['display_price'] . ' USD'))); // Strips 'lbs' from weight retrived even if empty variable $weight = str_replace(array(' ', 'l', 'b', 's'), '', $Variation['weight']); if (!empty($weight)) { // if number remains print weight + lbs $buildItem->appendChild($xml->createElement('g:weight', $weight . ' lbs')); } if (!empty($Variation['dimensions'])) { // if product has data in dimensions will echo $buildItem->appendChild($xml->createElement('g:dimensions', $Variation['dimensions'])); } $buildDesc = $xml->createElement('g:description'); $buildDesc = $buildItem->appendChild($buildDesc); $buildDesc->appendChild($xml->createCDATASection(strip_tags($Variation['variation_description']))); //print_r($Variation); // Debug option make sure is commented out live // loops through gallry image items and retrives file path. if (metadata_exists('post', $post->ID, '_product_feed_gallery')) { $product_image_gallery = get_post_meta($post->ID, '_product_feed_gallery', true); $attachments = array_filter(explode(',', $product_image_gallery)); if ($attachments) { $i = 0; foreach ($attachments as $attachment_id) { $image_link = wp_get_attachment_url($attachment_id); if ($i < 1) { $buildImage = $xml->createElement('g:image'); $buildImage = $buildItem->appendChild($buildImage); $buildImage->appendChild($xml->createCDATASection($image_link)); $i++; } else { $buildAddImage = $xml->createElement('g:additional_image'); $buildAddImage = $buildItem->appendChild($buildAddImage); $buildAddImage->appendChild($xml->createCDATASection($image_link)); $i++; } } } } // end foreach// end foreach $buildItem->appendChild($xml->createElement('g:mpn', $Variation['sku'])); } } //echo '<br>'; } // Loop trough rest of products available that have no sizes. //checks for products with no child objects and is visable if (!$product->has_child() && $product->is_visible()) { $buildItem = $xml->createElement("item"); $buildItem = $currentItem->appendChild($buildItem); $buildItem->appendChild($xml->createElement('g:title', get_the_title())); // This is not working yet $buildLink = $xml->createElement('g:link'); $buildLink = $buildItem->appendChild($buildLink); $buildLink->appendChild($xml->createCDATASection(ucfirst(get_permalink()))); $buildItem->appendChild($xml->createElement('g:type', getGType())); $buildCat = $xml->createElement('g:google_product_catergory'); $buildCat = $buildItem->appendChild($buildCat); $buildCat->appendChild($xml->createCDATASection(getCat())); $buildItem->appendChild($xml->createElement('g:brand', brand())); $buildItem->appendChild($xml->createElement('g:availablility', 'In Stock')); $buildItem->appendChild($xml->createElement('g:condition', 'New')); //Add shipping branch $buildShipping = $xml->createElement("g:shipping"); $buildShipping = $buildItem->appendChild($buildShipping); $buildShipping->appendChild($xml->createElement('g:country', 'US')); $buildShipping->appendChild($xml->createElement('g:service', 'FedEx Ground')); $buildShipping->appendChild($xml->createElement('g:price', '0.00 USD')); //Back to Item $buildItem->appendChild($xml->createElement('g:ID', $product->sku)); //$buildItem->appendChild($xml->createElement('g:size', ucfirst($Variation['attributes']['attribute_pa_size']))); $buildItem->appendChild($xml->createElement('g:price', '$' . $product->price . ' USD')); // Strips 'lbs' from weight retrived even if empty variable $weight = str_replace(array(' ', 'l', 'b', 's'), '', $product->weight); if (!empty($weight)) { // if number remains print weight + lbs $buildItem->appendChild($xml->createElement('g:weight', $product->weight . ' lbs')); } if (!empty($product->length)) { // if product has data in dimensions will echo $buildItem->appendChild($xml->createElement('g:dimensions', $product->length . '"x' . $product->width . '"x' . $product->height . '"')); } $buildDesc = $xml->createElement('g:description'); $buildDesc = $buildItem->appendChild($buildDesc); $buildDesc->appendChild($xml->createCDATASection(strip_tags(description($post)))); if (metadata_exists('post', $post->ID, '_product_feed_gallery')) { $product_image_gallery = get_post_meta($post->ID, '_product_feed_gallery', true); $attachments = array_filter(explode(',', $product_image_gallery)); if ($attachments) { $i = 0; foreach ($attachments as $attachment_id) { $image_link = wp_get_attachment_url($attachment_id); if ($i < 1) { $buildImage = $xml->createElement('g:additional_image'); $buildImage = $buildItem->appendChild($buildImage); $buildImage->appendChild($xml->createCDATASection($image_link)); $i++; } else { $buildAddImage = $xml->createElement('g:additional_image'); $buildAddImage = $buildItem->appendChild($buildAddImage); $buildAddImage->appendChild($xml->createCDATASection($image_link)); $i++; } } } } // end foreach// end foreach $buildItem->appendChild($xml->createElement('g:mpn', $product->sku)); } } echo writeFile($xml); wp_reset_query(); }
<?php defined('KOOWA') or die('Restricted access'); ?> <?php @title('Simple Article'); @description('An example of a simple article page.'); ?> <div class="row"> <div class="span8"> <h1>Simple Article</h1> <p> Lorem ipsum dolor sit amet, an quidam patrioque his. Iudico eleifend rationibus at quo. Dolorem euripidis sed ut. Commodo ponderum percipitur ne vis, eos sale scripta atomorum ne. Quem petentium an cum, nec et verear mentitum rationibus. Ei quando platonem ullamcorper mel, liber pertinax pro et. </p> <p> Et natum modus pro, omnesque vituperata usu id, laoreet offendit disputationi mel ne. An possim accusam platonem vim, eam an nihil vocibus. Vocibus graecis euripidis in his, modo maiorum vis et. Consul quodsi posidonium vix ad. Erant scripserit cu vel. Autem regione dissentias his in. Vix error oratio in, quem pertinax maluisset pri in. </p> <p> Et natum modus pro, omnesque vituperata usu id, laoreet offendit disputationi mel ne. An possim accusam platonem vim, eam an nihil vocibus. Vocibus graecis euripidis in his, modo maiorum vis et. Consul quodsi posidonium vix ad. Erant scripserit cu vel. Autem regione dissentias his in. Vix error oratio in, quem pertinax maluisset pri in. </p> <h2>Omnesque Vituperata Usu</h2> <p> Et natum modus pro, omnesque vituperata usu id, laoreet offendit disputationi mel ne. An possim accusam platonem vim, eam an nihil vocibus. Vocibus graecis euripidis in his, modo maiorum vis et. Consul quodsi posidonium vix ad. Erant scripserit cu vel. Autem regione dissentias his in. Vix error oratio in, quem pertinax maluisset pri in.
<?php /** * Multiparadigms */ echo "Welcome to the multiparadigms PHP\n"; description(date("G")); function description($hour) { $daytime = intval($hour) > 12 ? "Evening" : "Morning"; echo "Have a good " . $daytime . ", this will present a simple multiparadigm example\n"; } // Some simple object oriented code abstract class Person { public $name; private $father; public function _setFather() { } } class Man extends Person { public function __construct($name) { $this->name = $name; } public function setFather(Person $father) { if ($father == "god") { echo "YISUS CRIST";
<li><a href="<?php echo tlink('user/register'); ?> ">Register</a></li> <li><a href="<?php echo tlink('user/login'); ?> ">Sign In</a></li> </ul> </div> <div class="right"> <div class="site_desc"><?php echo description(); ?> </div> Powered by <a href="//couponscms.com">CouponsCMS.com</a> </div> </div> <div style="text-align: center;">(c) <?php echo site_name(); ?> </div> </footer>
function generateCriteo() { date_default_timezone_set("America/Denver"); //include( plugin_dir_path( __FILE__ ) . 'functions.php'); global $woocommerce, $product, $post, $re_wcvt_options, $xml; $args = array('post_type' => 'product', 'posts_per_page' => -1); $loop = new WP_Query($args); $xml = new DOMDocument('1.0', 'UTF-8'); $xml->formatOutput = true; $currentItem = $xml->createElement("products"); $currentItem = $xml->appendChild($currentItem); while ($loop->have_posts()) { $loop->the_post(); global $product; $product = get_product($loop->post); $attributes = $product->get_attributes(); //print_r($product); // Debug option make sure is commented out live //print_r($attributes); //checks if product is in stock and visable to public. if ($product->is_in_stock() && $product->is_visible()) { /* append it to the document created */ // Checks if product has sizes (twin/twin XL.. etc) if ($product->has_child()) { // Loops through products and gets variation attriubtes (sku/weight/etc) $ProdVar = $product->get_available_variations(); foreach ($ProdVar as $Variation) { $buildItem = $xml->createElement("product"); $buildItem->setAttribute("ID", $Variation['variation_id']); $buildItem = $currentItem->appendChild($buildItem); $buildItem->appendChild($xml->createElement('name', ucfirst(get_the_title()) . ' ' . ucfirst($Variation['attributes']['attribute_pa_firmness']) . ' - ' . ucfirst($Variation['attributes']['attribute_pa_size']))); $buildLink = $xml->createElement('producturl'); $buildLink = $buildItem->appendChild($buildLink); $buildLink->appendChild($xml->createCDATASection(ucfirst(get_permalink()))); if (metadata_exists('post', $post->ID, '_product_feed_gallery')) { $product_image_gallery = get_post_meta($post->ID, '_product_feed_gallery', true); $attachments = array_filter(explode(',', $product_image_gallery)); if ($attachments) { $i = 0; foreach ($attachments as $attachment_id) { $image_link = wp_get_attachment_url($attachment_id); if ($i < 1) { $big = wp_get_attachment_image_src($attachment_id, 'full'); $small = wp_get_attachment_image_src($attachment_id, 'medium'); $buildImageSmall = $xml->createElement('smallimage'); $buildImageSamll = $buildItem->appendChild($buildImageSmall); $buildImageSmall->appendChild($xml->createCDATASection($small[0])); $buildImage = $xml->createElement('bigimage'); $buildImage = $buildItem->appendChild($buildImage); $buildImage->appendChild($xml->createCDATASection($big[0])); $i++; } } } } $buildDesc = $xml->createElement('description'); $buildDesc = $buildItem->appendChild($buildDesc); $buildDesc->appendChild($xml->createCDATASection(strip_tags($Variation['variation_description']))); $buildItem->appendChild($xml->createElement('price', strip_tags($Variation['display_price']))); if ($product->is_in_stock()) { $buildItem->appendChild($xml->createElement('instock', '1')); } else { $buildItem->appendChild($xml->createElement('instock', '0')); } //print_r(CatID()); $buildItem->appendChild($xml->createElement('categoryid1', CatID()[0])); $buildItem->appendChild($xml->createElement('categoryid2', CatID()[1])); $buildItem->appendChild($xml->createElement('categoryid3', CatID()[2])); } } } // Loop trough rest of products available that have no sizes. //checks for products with no child objects and is visable if (!$product->has_child() && $product->is_visible()) { // print_r($product); $buildItem = $xml->createElement("product"); $buildItem->setAttribute("ID", $product->id); $buildItem = $currentItem->appendChild($buildItem); $buildItem->appendChild($xml->createElement('name', get_the_title())); $buildLink = $xml->createElement('producturl'); $buildLink = $buildItem->appendChild($buildLink); $buildLink->appendChild($xml->createCDATASection(ucfirst(get_permalink()))); if (metadata_exists('post', $post->ID, '_product_feed_gallery')) { $product_image_gallery = get_post_meta($post->ID, '_product_feed_gallery', true); $attachments = array_filter(explode(',', $product_image_gallery)); if ($attachments) { $i = 0; foreach ($attachments as $attachment_id) { $image_link = wp_get_attachment_url($attachment_id); if ($i < 1) { $big = wp_get_attachment_image_src($attachment_id, 'full'); $small = wp_get_attachment_image_src($attachment_id, 'medium'); $buildImageSmall = $xml->createElement('smallimage'); $buildImageSamll = $buildItem->appendChild($buildImageSmall); $buildImageSmall->appendChild($xml->createCDATASection($small[0])); $buildImage = $xml->createElement('bigimage'); $buildImage = $buildItem->appendChild($buildImage); $buildImage->appendChild($xml->createCDATASection($big[0])); $i++; } } } } $buildDesc = $xml->createElement('description'); $buildDesc = $buildItem->appendChild($buildDesc); $buildDesc->appendChild($xml->createCDATASection(strip_tags(description($post)))); $buildItem->appendChild($xml->createElement('price', strip_tags($product->price))); $buildItem->appendChild($xml->createElement('categoryid1', CatID()[0])); $buildItem->appendChild($xml->createElement('categoryid2', CatID()[1])); $buildItem->appendChild($xml->createElement('categoryid3', CatID()[2])); } } echo writeFileCrit($xml); wp_reset_query(); }
* @package Elections * @category modules * @author Nazar Mokrynskyi <*****@*****.**> * @copyright Copyright (c) 2014, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs\modules\Precincts; use h, cs\Core, cs\Index, cs\Language, cs\Page, cs\User; $Index = Index::instance(); $Index->title_auto = false; $L = Language::instance(); $Page = Page::instance(); if (isset($Index->route_path[0], $Index->route_ids[1]) && $Index->route_path[0] == 'violation') { $violation = Violations::instance()->get($Index->route_ids[1]); if ($violation['images']) { $Page->replace('/<meta content="[^"]*share.png" property="og:image">/Uims', ''); $Page->replace('/<link href="[^"]*share.png" rel="image_src">/Uims', ''); $Page->link(['rel' => 'image_src', 'href' => $violation['images'][0]]); foreach ($violation['images'] as $image) { $Page->og('image', $image); $Page->og('image:secure_url', $image); } } if ($violation['text']) { $Page->Description = description($violation['text']); } } $Page->Header .= h::{'button.cs-elections-add-violation'}(h::{'i.uk-icon-plus'}() . " {$L->add_violation}") . h::{'button.cs-elections-last-violations'}(); $Page->js("window.disqus_shortname = '" . Core::instance()->disqus_shortname . "';", 'code'); $Page->content(h::{'div.cs-elections-last-violations-panel'}(h::h2($L->last_violations) . h::{'section'}()) . h::{'aside.cs-elections-precinct-sidebar'}() . h::{'aside.cs-elections-add-violation-sidebar'}() . h::{'aside.cs-elections-violation-read-more-sidebar'}() . h::{'aside.cs-elections-main-sidebar'}(h::{'div.cs-elections-opirzagin a[href=become_eyes]'}($L->become_eyes) . h::{'div.cs-elections-opirzagin a[href=opirzagin]'}($L->opircrew) . h::{'div.cs-elections-opirzagin a[href=instruktsia]'}($L->instruktsia) . h::{'div.cs-elections-socials'}('<div class="yashare-auto-init" data-yashareL10n="uk" data-yashareQuickServices="facebook" data-yashareLink="https://www.facebook.com/opir.org" data-yashareTheme="counter" data-yashareImage="https://opir.org/components/modules/Common/includes/img/share.png"></div>' . '<div class="yashare-auto-init" data-yashareL10n="uk" data-yashareQuickServices="vkontakte,twitter" data-yashareLink="https://opir.org/" data-yashareTheme="counter" data-yashareImage="https://opir.org/components/modules/Common/includes/img/share.png"></div>') . h::h2($L->precincts_search) . h::{'input.cs-elections-precincts-search[type=search]'}(['placeholder' => $L->number_or_address]) . h::{'section.cs-elections-precincts-search-results[level=0]'}() . h::h2($L->mobile_apps) . h::{'div.cs-elections-mobile-apps'}(h::{'a[target=_blank'}($L->download_in('App Store'), ['href' => 'https://itunes.apple.com/ua/app/opir.org/id896488790']) . h::{'a[target=_blank]'}($L->download_in('Google Play'), ['href' => 'https://play.google.com/store/apps/details?id=example.yariksoffice']) . h::{'a[target=_blank]'}($L->download_in('Market Place'), ['onclick' => "\$.cs.simple_modal('{$L->soon}')"])) . h::h2($L->contacts) . h::{'div.cs-elections-contacts'}(h::a(h::icon('phone') . '+38 093 012 22 11') . h::a(h::icon('phone') . '+38 067 708 42 90') . h::{'a[href=mailto:info@opir.org]'}(h::icon('envelope') . '*****@*****.**')) . h::h2($L->map_legend) . h::{'div.cs-elections-map-legend'}(h::div($L->precincts_with_violations) . h::div($L->precincts_without_violations) . h::div($L->district_precincts))));
* @copyright Copyright (c) 2011-2014, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs\modules\Static_pages; use h, cs\Config, cs\Index, cs\Page; $Config = Config::instance(); $Static_pages = Static_pages::instance(); $page = $Static_pages->get(HOME ? $Static_pages->get_structure()['pages']['index'] : $Config->route[0]); $Page = Page::instance(); if ($page['interface']) { if (!HOME) { Index::instance()->title_auto = false; $Page->title($page['title']); } $Page->Description = description($page['content']); if (HOME) { $Page->canonical_url($Config->base_url()); } else { $category = $page['category']; $canonical_url = []; while ($category) { $category = $Static_pages->get_category($category); $canonical_url[] = $category['path']; $category = $category['parent']; } unset($category); $canonical_url[] = $page['path']; $Page->canonical_url($Config->base_url() . '/' . implode('/', $canonical_url)); } $Page->og('type', 'article');
<script src="<?php echo assets_url('scripts/jquery-min.js'); ?> "></script> <meta property="og:image " content="<?php echo assets_url('images/default-avatar.png'); ?> ?v=5.7"> <meta property="og:locale" content="tr_TR"> <meta property="og:type" content="video"> <meta property="og:title" content="<?php echo isset($title) ? $title : title() . ' | yabancı dizi izle'; ?> "> <meta property="og:description" content="<?php echo isset($description) ? $description : description(); ?> "> <meta property="og:url" content="<?php echo current_url(); ?> "> <link rel="canonical" href="<?php echo current_url(); ?> "> <meta property="og:site_name" content="dizilab"> <meta property="article:publisher" content="https://www.facebook.com/dizilab"> <meta property="article:author" content="http://facebook.com/dizilab"> <!--alexaVerifyID--><!--<style type="text/css">.cf-hidden {display: none;}.cf-invisible {visibility: hidden;}</style>--> <script>
<?php defined('KOOWA') or die('Restricted access'); ?> <?php @title('Landing Page'); @description('An example of a landing page.'); ?> <div class="hero-unit"> <h1>Landing Page</h1> <p>An example of a landing page.</p> </div> <div class="row"> <div class="span8"> <blockquote class="pull-right"> <p>"Lorem ipsum dolor sit amet, an quidam patrioque his. Iudico eleifend rationibus at quo. Dolorem euripidis sed ut."</p> <small>Ei quando platonem ullamcorper mel</small> </blockquote> </div> <div class="span4"> <?php $actors = KService::get('repos:actors.actor')->getQuery()->disableChain()->limit(2)->fetchSet(); ?> <ul class="thumbnails"> <?php foreach ($actors as $actor) { ?>
<?php defined('KOOWA') or die('Restricted access'); ?> <?php @title('Anahita - Open source social networking platform and framework'); @description('a remarkable open source platform for building knowledge sharing apps and services'); ?> <div class="row"> <div class="span8 offset2"> <div class="hero-unit text-center"> <img src="https://s3.amazonaws.com/anahitapolis.com/media/logos/homepage_logo.png" alt="Anahita social networking platform and framework" /> <h1>Anahita</h1> <p class="lead">open source social networking platform</p> <p> <a class="btn btn-primary" href="http://GetAnahita.com" target="_blank"> GetAnahita.com </a> <a title="Twitter" class="btn btn-twitter" href="https://www.twitter.com/anahitapolis" target="_blank"> <i class="icon-twitter"></i> </a> <a title="Facebook" class="btn btn-facebook" href="https://www.facebook.com/anahitasocial" target="_blank"> <i class="icon-facebook"></i> </a>
function content_56afda72c37094_74986900($_smarty_tpl) { if (isset($_smarty_tpl->tpl_vars['video'])) { $_smarty_tpl->tpl_vars['video'] = clone $_smarty_tpl->tpl_vars['video']; $_smarty_tpl->tpl_vars['video']->value = $_smarty_tpl->tpl_vars['vdo']->value; $_smarty_tpl->tpl_vars['video']->nocache = null; $_smarty_tpl->tpl_vars['video']->scope = 0; } else { $_smarty_tpl->tpl_vars['video'] = new Smarty_variable($_smarty_tpl->tpl_vars['vdo']->value, null, 0); } if (isset($_smarty_tpl->tpl_vars['type'])) { $_smarty_tpl->tpl_vars['type'] = clone $_smarty_tpl->tpl_vars['type']; $_smarty_tpl->tpl_vars['type']->value = 'video'; $_smarty_tpl->tpl_vars['type']->nocache = null; $_smarty_tpl->tpl_vars['type']->scope = 0; } else { $_smarty_tpl->tpl_vars['type'] = new Smarty_variable('video', null, 0); } ?> <div class="container"> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 html5_player_enlarge nopadding-right "> <div class="cb-box pad-bottom-sm"> <div id="cb_player" class="no-pad cb_player"> <?php echo flashPlayer(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value, 'width' => '100%', 'height' => '100%'), $_smarty_tpl); ?> </div> <!-- cb_player end --> <div class="watch-vid-title mbm"> <h1><?php echo $_smarty_tpl->tpl_vars['video']->value['title']; ?> </h1> </div> <div class="vid-detail-sec"> <div class="watch-vid-thumb"> <img src="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->avatar($_smarty_tpl->tpl_vars['video']->value); ?> " class="img-circle"/> </div> <div class="watch-vid-user-sec"> <div class="watch-vid-user-name mtm"> <a href="<?php echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['video']->value); ?> "> <?php echo $_smarty_tpl->tpl_vars['video']->value['username']; ?> </a> </div> <?php if ($_smarty_tpl->tpl_vars['video']->value['userid'] != userid()) { ?> <a id="subscribeUser" class="btn btn-xs btn-primary" href="javascript:void(0)"> <?php echo lang('Subscribe'); ?> </a><?php } ?> </div> <div class="watch-vid-rating-sec"> <div class="watch-vid-rating-view"> <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['views']); ?> <span class="small font18"><?php echo lang('View'); if ($_smarty_tpl->tpl_vars['vdo']->value['views'] > 1) { echo lang('s'); } ?> </span> </div> <div class="watch-vid-thumbsupdown-sec" id="rating_container"> <?php echo show_video_rating(array('rating' => $_smarty_tpl->tpl_vars['vdo']->value['rating'], 'ratings' => $_smarty_tpl->tpl_vars['vdo']->value['rated_by'], 'total' => '10', 'id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> </div> </div> <!-- vid-detail-sec end --> <div class="cb-item-desc-container clearfix grey-tabs"> <ul class="nav nav-tabs"> <li class="active"> <a href="#cb-item-info" data-toggle="tab"><i class="fa fa-info"></i> <?php echo lang('Info'); ?> </a> </li> <li> <a href="#cb-item-share" data-toggle="tab"><i class="fa fa-share-square-o"></i> <?php echo lang('Share'); ?> </a> </li> <li> <a href="#cb-item-addto" data-toggle="tab"><i class="fa fa-plus"></i> <?php echo lang('Add to'); ?> </a> </li> <li> <a id="reportVideo" href="#cb-item-report" data-toggle="tab"><i class="fa fa-flag"></i> <?php echo lang('Report'); ?> </a> </li> </ul> <div class="tab-content"> <div class="tab-pane active" id="cb-item-info"> <div class="col-lg-9 col-md-9 col-sm-9 col-xs-7 no-padding"> <p><?php echo description(description($_smarty_tpl->tpl_vars['video']->value['description'])); ?> </p> <div class="watch-vid-tag"> <strong ><?php echo lang('Category:'); ?> </strong> <span ><?php echo categories($_smarty_tpl->tpl_vars['vdo']->value['category'], 'video'); ?> </span> </div> <div class="watch-vid-tag"> <strong ><?php echo lang('Tags:'); ?> </strong> <span ><?php echo tags($_smarty_tpl->tpl_vars['vdo']->value['tags'], 'videos'); ?> </span> </div> <div class="watch-vid-tag"> <strong >Published: </strong> <span ><?php echo niceTime($_smarty_tpl->tpl_vars['video']->value['date_added']); ?> </span> </div> <!-- view sec hide on told arslan bhai --> <!-- <div class="mtm"> <strong><?php echo smarty_lang(array('code' => 'views'), $_smarty_tpl); ?> </strong> : <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['views']); ?> – <strong><?php echo smarty_lang(array('code' => 'duration'), $_smarty_tpl); ?> </strong> : <?php echo SetTime($_smarty_tpl->tpl_vars['vdo']->value['duration']); ?> – <strong><?php echo smarty_lang(array('code' => 'comments'), $_smarty_tpl); ?> </strong> : <?php echo number_format($_smarty_tpl->tpl_vars['vdo']->value['comments_count']); ?> </div> --> </div> <div class="col-lg-3 col-md-3 col-sm-3 col-xs-5 no-padding" style="margin-top:25px;"> <div class="watch-vid-social-sec col-lg-12 pull-right no-padding"> <a class="cb-item-social-icon twitter" href="https://twitter.com/share" target="_blank"> <i class="fa fa-twitter"></i> </a> <a class="cb-item-social-icon googlep" href="https://plus.google.com/share?url=<?php echo urlencode(videolink($_smarty_tpl->tpl_vars['video']->value)); ?> " target="_blank"> <i class="fa fa-google-plus"></i> </a> <a class="cb-item-social-icon facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php echo urlencode(videoLink($_smarty_tpl->tpl_vars['video']->value)); ?> &p[images][0]=<?php echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl); ?> &p[title]=<?php echo urlencode(title($_smarty_tpl->tpl_vars['video']->value['title'])); ?> &p[summary]=<?php echo urlencode(description($_smarty_tpl->tpl_vars['video']->value['description'])); ?> " target="_blank"> <i class="fa fa-facebook"></i> </a> </div> <?php if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['video_download'] == 1 && $_smarty_tpl->tpl_vars['cbvid']->value->downloadable($_smarty_tpl->tpl_vars['vdo']->value)) { ?> <div class="dropdown col-lg-12 pull-right no-padding text-right"> <button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true" style="margin-top: 10px;"> Download <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1"> <?php if (isset($_smarty_tpl->tpl_vars['files'])) { $_smarty_tpl->tpl_vars['files'] = clone $_smarty_tpl->tpl_vars['files']; $_smarty_tpl->tpl_vars['files']->value = get_video_files($_smarty_tpl->tpl_vars['vdo']->value, true, true); $_smarty_tpl->tpl_vars['files']->nocache = null; $_smarty_tpl->tpl_vars['files']->scope = 0; } else { $_smarty_tpl->tpl_vars['files'] = new Smarty_variable(get_video_files($_smarty_tpl->tpl_vars['vdo']->value, true, true), null, 0); } ?> <?php $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['file']->_loop = false; $_from = $_smarty_tpl->tpl_vars['files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['file']->key => $_smarty_tpl->tpl_vars['file']->value) { $_smarty_tpl->tpl_vars['file']->_loop = true; ?> <?php if (isset($_smarty_tpl->tpl_vars['quality'])) { $_smarty_tpl->tpl_vars['quality'] = clone $_smarty_tpl->tpl_vars['quality']; $_smarty_tpl->tpl_vars['quality']->value = explode('-', $_smarty_tpl->tpl_vars['file']->value); $_smarty_tpl->tpl_vars['quality']->nocache = null; $_smarty_tpl->tpl_vars['quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['quality'] = new Smarty_variable(explode('-', $_smarty_tpl->tpl_vars['file']->value), null, 0); } ?> <?php if (isset($_smarty_tpl->tpl_vars['quality'])) { $_smarty_tpl->tpl_vars['quality'] = clone $_smarty_tpl->tpl_vars['quality']; $_smarty_tpl->tpl_vars['quality']->value = explode('.', $_smarty_tpl->tpl_vars['quality']->value[1]); $_smarty_tpl->tpl_vars['quality']->nocache = null; $_smarty_tpl->tpl_vars['quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['quality'] = new Smarty_variable(explode('.', $_smarty_tpl->tpl_vars['quality']->value[1]), null, 0); } ?> <?php if (isset($_smarty_tpl->tpl_vars['file_quality'])) { $_smarty_tpl->tpl_vars['file_quality'] = clone $_smarty_tpl->tpl_vars['file_quality']; $_smarty_tpl->tpl_vars['file_quality']->value = $_smarty_tpl->tpl_vars['quality']->value[0]; $_smarty_tpl->tpl_vars['file_quality']->nocache = null; $_smarty_tpl->tpl_vars['file_quality']->scope = 0; } else { $_smarty_tpl->tpl_vars['file_quality'] = new Smarty_variable($_smarty_tpl->tpl_vars['quality']->value[0], null, 0); } ?> <li role="presentation"> <a role="menuitem" tabindex="-1" href="<?php echo $_smarty_tpl->tpl_vars['file']->value; ?> " download> <span class="glyphicon glyphicon-download-alt"></span><?php echo $_smarty_tpl->tpl_vars['file_quality']->value; ?> </a> </li> <?php } ?> </ul> </div> <?php } ?> </div> <br> </div> <div class="tab-pane" id="cb-item-share"> <?php echo show_share_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> <div class="tab-pane" id="cb-item-addto"> <div class="clearfix visible-xs-block" style="margin-bottom:25px;"> <div id="video_action_result_cont" style="display:none;"></div> <a class="btn mtm btn-block btn-primary" href="javascript:void(0)" onclick="add_to_fav('video','<?php echo $_smarty_tpl->tpl_vars['vdo']->value['videoid']; ?> ');" style="color:white;">Add to My Favorites</a> </div> <div class="alert "> <?php echo show_playlist_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> <?php if (userid()) { ?> <div class="alert "> <div class="clearfix"></div> <div align="right"><a href="javascript:void(0)" onclick="$('#addCollectionCont').toggle()" style="text-decoration:none"><strong>+ <?php echo smarty_lang(array('code' => 'add_to_my_collection'), $_smarty_tpl); ?> </strong></a> </div> <div id="addCollectionCont" style="display:none"><?php echo show_collection_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'Video'), $_smarty_tpl); ?> </div> </div> <?php } ?> </div> <div class="tab-pane" id="cb-item-report"> <?php echo show_flag_form(array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'video'), $_smarty_tpl); ?> </div> </div> </div> <div id="messageFav" class="alert alert-info marginTop" style="display:none"></div> <div id="test1"></div> <div id="reply" class="clearfix"> <div class="pad-bottom"> <div class="addComment clearfix"> <div class="com_count" id="com_count"><span><?php echo smarty_lang(array('code' => 'comments'), $_smarty_tpl); ?> </span> <?php echo $_smarty_tpl->tpl_vars['vdo']->value['comments_count']; ?> </div> <?php if ($_smarty_tpl->tpl_vars['myquery']->value->is_commentable($_smarty_tpl->tpl_vars['vdo']->value, 'v')) { ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/comments/add_comment.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['vdo']->value['videoid'], 'type' => 'v'), 0); ?> <?php } else { ?> <div class="alert alert-warning"><?php echo smarty_lang(array('code' => 'comm_disabled_for_vid'), $_smarty_tpl); ?> </div> <?php } ?> </div> <div id="userCommentsList"> </div> </div> </div> </div> </div> <!--Side bar start--> <div class="col-lg-4 col-md-4 visible-lg visible-md side-video pull-right"> <div class="cb-box"> <div class="ad"><?php echo getAd(array('place' => 'ad_320x250'), $_smarty_tpl); ?> </div> <!-- <a href="http://www.arvixe.com/clipbucket_hosting?utm_campaign=300x250_Demo&utm_medium=banner&utm_source=clipbucket.com"><img class="banner" src="<?php echo $_smarty_tpl->tpl_vars['theme']->value; ?> /assets/images/add320x250.png" style="margin-bottom: 10px; width: 100%;" > </a>--> <!-- <h3><?php echo smarty_lang(array('code' => "Most Popular"), $_smarty_tpl); ?> </h3> --> <?php if ($_GET['play_list'] == '') { ?> <?php $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['video']->_loop = false; $_from = $_smarty_tpl->tpl_vars['videos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) { $_smarty_tpl->tpl_vars['video']->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/videos/video_popular.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php } else { ?> <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['plist'])) { unset($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']); } $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['name'] = 'plist'; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['items']->value) ? count($_loop) : max(0, (int) $_loop); unset($_loop); $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show'] = true; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop'] - 1; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show']) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['loop']; if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] == 0) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show'] = false; } } else { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total'] = 0; } if ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['show']) { for ($_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration']++) { $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['step']; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] == 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['plist']['total']; ?> <?php echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/manage/account_video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['items']->value[$_smarty_tpl->getVariable('smarty')->value['section']['plist']['index']], 'control' => "onWatch", 'pid' => $_smarty_tpl->tpl_vars['playlist']->value['playlist_id']), 0); ?> <?php } } ?> <?php } ?> </div> </div> <!-- /Side bar--> </div> </div> <div style="height:20px"> </div> <script> //var aspect_ratio = 1.77778 var aspect_ratio = 2.2 var $cb_player = $("#cb_player"); $(document).ready(function(){ $cb_player.height( $cb_player.width() / aspect_ratio ); var videoInfo = $("#videoDescription").text(); var newInfo = videoInfo.replace(/(((https?:\/\/)|([\s\t]))(www.)?([a-z0-9]+)\.[a-z]+)/g, '<a href="$1">$1</a>'); $("#videoDescription").html(newInfo); comments_voting = '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['comment_voting']; ?> '; _cb.getAllComments( '<?php echo $_smarty_tpl->tpl_vars['type']->value; ?> ', '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['videoid']; ?> ', '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['last_commented']; ?> ',1, '<?php echo $_smarty_tpl->tpl_vars['vdo']->value['comments_count']; ?> ', '<?php echo $_smarty_tpl->tpl_vars['object_type']->value; ?> ' ); // $('.cb-item-description').readmore({ // speed: 75, // maxHeight: 120, // moreLink : '<a href="#" class="btn btn-min btn-block btn-primary"><i class="glyphicon glyphicon-arrow-down"></i> <?php echo lang("Read more"); ?> </a>', // lessLink : '<a href="#" class="btn btn-min btn-block btn-default"><?php echo lang("Close"); ?> </a>' // }); $("#reportVideo").on({ click : function(e){ e.preventDefault(); $("#flag_item").show(); } }); $("#subscribeUser").on({ click: function(e){ e.preventDefault(); _cb.subscribeToChannel('<?php echo $_smarty_tpl->tpl_vars['video']->value['userid']; ?> ','subscribe_user','video_detail_result_cont'); } }); }); var resizePlayer = _cb.debounce(function() { $cb_player.height( $cb_player.width() / aspect_ratio ); }, 500, false); $(window).resize(resizePlayer); </script> <style type="text/css"> footer{ position: relative; top: 65px; } </style><?php }
<?php defined('KOOWA') or die; ?> <?php @title(sprintf(@text('COM-NOTES-META-TITLE-NOTE'), $actor->name) . ' - ' . @date($note->creationTime)); @description(@helper('text.truncate', strip_tags($note->body), array('length' => 156))); ?> <div class="row"> <div class="span8"> <?php echo @helper('ui.header', array()); ?> <?php echo @template('note'); ?> <?php echo @helper('ui.comments', $note); ?> </div> <div class="span4"> <?php if (count($note->locations) || $note->authorize('edit')) { ?> <h4 class="block-title"> <?php echo @text('LIB-AN-ENTITY-LOCATIONS'); ?>
function convert($test, $template) { $TESTPLAN = array(); $OUTPUT = ""; $test["phases"] = isset($test["phases"]) ? $test["phases"] : array(); foreach ($test["phases"] as $phase) { $TESTPLAN[] = phase($phase, $output); if ($output) { ob_start(); var_dump($output); $OUTPUT .= ob_get_contents(); ob_end_clean(); $OUTPUT = str_replace('2) "%s"', '%d) "%s"', $OUTPUT); } } foreach ($test["tests"] as $phase) { $TESTPLAN[] = phase($phase, $output); if ($output) { ob_start(); var_dump($output); $OUTPUT .= ob_get_contents(); ob_end_clean(); $OUTPUT = str_replace('2) "%s"', '%d) "%s"', $OUTPUT); } } $replacements = array("%DSN%" => clientSetup($test), "%DESCRIPTION%" => description($test), "%INITCONFIG%" => initConfig($test), "%URLTYPE%" => $test["type"], "%TESTPLAN%" => join("\n\n", $TESTPLAN), "%OUTPUT%" => rtrim($OUTPUT)); return makeTest($replacements, $template); }
<?php require_once LIBPATH . "redfun.php"; require_once LIBPATH . "auth.php"; if (isset($_SESSION['userid'])) { if ($_REQUEST['action'] == "name") { name($_REQUEST['name'], $_SESSION['userid']); } elseif ($_REQUEST['action'] == "busy") { busy($_REQUEST['busy'], $_SESSION['userid']); } elseif ($_REQUEST['action'] == "contacts") { contacts($_REQUEST['phone'], $_REQUEST['email'], $_REQUEST['region'], $_SESSION['userid']); } elseif ($_REQUEST['action'] == "description") { description($_REQUEST['description'], $_SESSION['userid']); } elseif ($_REQUEST['action'] == "password") { pass($_REQUEST['pass'], $_REQUEST['oldpass'], $_SESSION['userid']); } elseif ($_REQUEST['action'] == "namemail") { namemail($_REQUEST['name'], $_REQUEST['email'], $_SESSION['userid']); } } else { ?> <script>alert("Вы не имеете доступа к этой странице, авторизуйтесь!");</script><?php echo "<script>document.location.replace('/main');</script>"; }
<?php defined('KOOWA') or die('Restricted access'); ?> <?php @title('No navigation bar'); @description('An example of a page without a navigation bar.'); ?> <?php @(service('application.dispatcher')->getRequest()->tmpl = 'component'); ?> <h1>No Navbar</h1> <p>This page doesn't have a navigation bar!</p>