/** * (non-PHPdoc) * 修改方法 * @see CommonAction::update() */ public function update() { unset($_POST['__hash__']); if (tags($_POST) > 0) { $this->success(L('_SUCCESS_')); } else { $this->error(L('_ERROR_')); } }
$file['size'] = round($size / 1048576) . ' MB'; } else { $file['size'] = round($size / 1024) . ' KB'; } } } else { $file['size'] = 'File not found'; $file['url'] = '#'; } #Mark if (isset($cfg['frate']) && $file['opt'] & 4) { $view->css(SKIN_DIR . 'rate.css'); $rate = 'vote.php?type=2&id=' . $id; } else { $rate = 0; } #Date, author $file['date'] = genDate($file['date'], true); $file['author'] = autor($file['author']); #Template $view->add('file', array('file' => &$file, 'path' => catPath($file['cat']), 'rates' => $rate, 'edit' => admit($file['cat'], 'CAT') ? url('edit/2/' . $id, 'ref') : false, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['files'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/files'))); #Tags if (isset($cfg['tags'])) { include './lib/tags.php'; tags($id, 2); } #Comments if (isset($cfg['fcomm']) && $file['opt'] & 2) { require './lib/comm.php'; comments($id, 2); }
" class="post"> <?php echo $this->template->render('blog/_author', array('post' => $post)); ?> <h1><?php echo $post['title']; ?> <?php echo post_control($post); ?> </h1> <?php echo $post['full']; ?> <div class="tags"><span class="icon icon-tags"></span>Тэги: <?php echo tags($post); ?> </div> </div> <hr/> <div class="share"> <noindex> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_facebook"></a> <a class="addthis_button_vk"></a> <a class="addthis_button_twitter"></a> <a class="addthis_button_livejournal"></a> <a class="addthis_button_google_plusone_share"></a> <a class="addthis_button_blogger"></a> <a class="addthis_button_evernote"></a>
" height="<?php echo $height; ?> "/> </a> <?if($mater[$n]['PROPERTY'][0]['metka']['~VALUE']!=''):?> <div class="tag row"> <? $link_tag = tags_link($mater[$n]['PROPERTY'][0]['metka']['~VALUE']); ?> <a href="<?php echo $link_tag; ?> " class="link_tag"> <div class="name-tag"><?php echo tags($mater[$n]['PROPERTY'][0]['metka']['~VALUE']); ?> </div> <div class="trigon"></div> </a> </div> <?endif;?> <div class="pad_10_15 name-item"> <h3> <a href="/<?php echo $mater[$n]['PROPERTY'][0]['type']['VALUE_XML_ID']; ?> /<?php echo $mater[$n]['CODE']; ?> /"><?php
echo $firstrating; } else { echo $vrating . '.0'; } ?> </video:rating> <video:view_count><?php echo $video['views']; ?> </video:view_count> <video:publication_date><?php echo cbdate("Y-m-d H:i:s", strtotime($video['date_added'])); ?> </video:publication_date> <?php $vtags = strip_tags(tags($video['tags'], 'video')); $vtableau = explode(",", $vtags); for ($i = 0; $i < sizeof($vtableau); $i++) { echo '<video:tag><![CDATA[' . trim($vtableau[$i]) . ']]></video:tag>'; } ?> <video:category><?php echo strip_tags(categories($video['category'], 'video')); ?> </video:category> <video:family_friendly>yes</video:family_friendly> <video:duration><?php $defaultime = $video['duration']; $dotfixed = explode(".", $defaultime); echo $dotfixed[0] . $dotfixed[1]; ?>
<?php function tags($a, $b) { return "<i>{$a}</i><i>{$b}</i>"; } print tags('i', 'Yay'); print tags('i', 'Hello'); print tags('cite', 'Yay'); ?>
function fbrogmt() { if (is_plugin_active('shopp/Shopp.php')) { if (shopp('catalog', 'is-product')) { $meta[] = __(trim(shopp('product', 'name', 'return=1'))) . ' - ' . shopp('product', 'price', 'return=1'); $meta[] = shopp('product', 'link', 'return=1'); $meta[] = get_option('blogname'); //Site name //get summary, or use description if no summary is set. $description = trim(strip_tags(shopp('product', 'summary', 'return=1'))); $long_description = trim(strip_tags(shopp('product', 'description', 'return=1'))); if ('' == $description) { $description = $long_description; } //truncate description to 300 if (strlen($description) > 300) { $description = substr($description, 0, 297) . '...'; } $meta[] = $description; $meta[] = 'product'; foreach (all_images_shopp() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } else { if (is_single()) { // Post if (have_posts()) { while (have_posts()) { the_post(); $meta[] = get_the_title($post->post_title); // Gets the title $meta[] = get_permalink(); // gets the url of the post $meta[] = get_option('blogname'); //Site name $meta[] = the_excerpt_max_charlength(300) . '...'; //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...] $meta[] = 'article'; // $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } } } elseif (is_page()) { // Page if (have_posts()) { while (have_posts()) { the_post(); $meta[] = get_the_title($post->post_title); // Gets the title $meta[] = get_permalink(); // gets the url of the post $meta[] = get_option('blogname'); //Site name $meta[] = the_excerpt_max_charlength(300) . '...'; //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...] $meta[] = 'article'; // $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } } } elseif (is_category()) { global $post, $wp_query; $category_id = get_cat_ID(single_cat_title('', false)); // Get the URL of this category $category_link = get_category_link($category_id); $term = $wp_query->get_queried_object(); if (is_plugin_active('wordpress-seo/wp-seo.php')) { //checks for yoast seo plugin for description of category $metadesc = wpseo_get_term_meta($term, $term->taxonomy, 'desc'); } else { $metadesc = category_description($category_id); } $meta[] = wp_title('', false); //Title $meta[] = $category_link; //URL $meta[] = get_option('blogname'); //Site name $meta[] = $metadesc; //Description $meta[] = 'website'; foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } elseif (is_home() || is_front_page()) { $meta[] = get_option('blogname'); //Title $meta[] = get_option('siteurl'); //URL $meta[] = get_option('blogname'); //Site name $meta[] = get_option('blogdescription'); //Description $meta[] = 'website'; } else { $meta[] = get_option('blogname'); //Title $meta[] = get_option('siteurl'); //URL $meta[] = get_option('blogname'); //Site name $meta[] = get_option('blogdescription'); //Description $meta[] = 'article'; } } } else { if (is_single()) { // Post if (have_posts()) { while (have_posts()) { the_post(); $meta[] = get_the_title($post->post_title); // Gets the title $meta[] = get_permalink(); // gets the url of the post $meta[] = get_option('blogname'); //Site name $meta[] = the_excerpt_max_charlength(300) . '...'; //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...] $meta[] = 'article'; // $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } } } elseif (is_page()) { // Page if (have_posts()) { while (have_posts()) { the_post(); $meta[] = get_the_title($post->post_title); // Gets the title $meta[] = get_permalink(); // gets the url of the post $meta[] = get_option('blogname'); //Site name $meta[] = the_excerpt_max_charlength(300) . '...'; //Description comes from the excerpt, because by using the_content, it will dish out the [caption id...] $meta[] = 'article'; // $meta[]=get_the_image();//Gets the first image of a post/page if there is one -- Remove this for now foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } } } elseif (is_category()) { global $post, $wp_query; $category_id = get_cat_ID(single_cat_title('', false)); // Get the URL of this category $category_link = get_category_link($category_id); $term = $wp_query->get_queried_object(); if (is_plugin_active('wordpress-seo/wp-seo.php')) { //checks for yoast seo plugin for description of category $metadesc = wpseo_get_term_meta($term, $term->taxonomy, 'desc'); } else { $metadesc = category_description($category_id); } $meta[] = wp_title('', false); //Title $meta[] = $category_link; //URL $meta[] = get_option('blogname'); //Site name $meta[] = $metadesc; //Description $meta[] = 'website'; foreach (all_images() as $img_meta) { // The loop to dish out all the images meta tags explained lower echo $img_meta; } } elseif (is_home() || is_front_page()) { $meta[] = get_option('blogname'); //Title $meta[] = get_option('siteurl'); //URL $meta[] = get_option('blogname'); //Site name $meta[] = get_option('blogdescription'); //Description $meta[] = 'website'; } else { $meta[] = get_option('blogname'); //Title $meta[] = get_option('siteurl'); //URL $meta[] = get_option('blogname'); //Site name $meta[] = get_option('blogdescription'); //Description $meta[] = 'article'; } } echo tags($meta); }
{ $arFields = $ob->GetFields(); $active = $arFields['ACTIVE']; } if($active=='Y'): ?> <div class="tag row left"> <? $link_tag = tags_link($id_metka); ?> <a href="<?php echo $link_tag; ?> " class="link_tag"> <div class="name-tag"><?php echo tags($id_metka); ?> </div> <div class="trigon"></div> </a> </div> <?endif?> <?endforeach;?> </div> <?endif;?> <div class="social"> <?$APPLICATION->IncludeComponent("bitrix:asd.favorite.button", "crado", Array( "FAV_TYPE" => "content", // Тип избранного "BUTTON_TYPE" => "fav", // Тип кнопки
function res_NubeTextoPeriodo($idPregunta, $idPeriodo) { $base = new PDOConfig(); $idPregunta = $base->filtrar($idPregunta); $palabras = array(); $lista = array(); $texto = ""; $sqlResp = "SELECT RespuestaTexto from respuestaspreguntas R INNER JOIN respuestas E ON R.idRespuesta = E.idRespuesta\r\n WHERE E.idPeriodo = {$idPeriodo} AND R.idPregunta = {$idPregunta}"; $resOps = $base->query($sqlResp); if ($resOps) { $resultado = $resOps->fetchAll(PDO::FETCH_ASSOC); foreach ($resultado as $row) { $texto .= " " . $row["RespuestaTexto"]; } //echo $texto;exit(); $palabras = tags(quitarAcentos($texto)); $lista = repeatedElements($palabras, true); //print_r($lista);exit(); return json_encode($lista); } else { return "0"; } }
</div> <div class="post post-info"> <span class="date"> <?php echo tr_date('d F Y', $created_at->sec); ?> </span> <span class="category"> <?php echo categories($categories); ?> </span> <span class="tags"> <?php echo tags($tags); ?> </span> <span class="read"> <?php echo $counter; ?> kez okundu. </span> </div> <div class="row post-share"> <div class="span5"> <?php echo anchor('http://feeds.feedburner.com/' . get_option('feedburner_username'), 'Yazılarımızı RSS ile takip edebilirsiniz.'); ?>
if (isset($cfg['arate']) && $art['catOpt'] & 4) { $view->css(SKIN_DIR . 'rate.css'); $rates = 'vote.php?type=1&id=' . $id; } else { $rates = 0; } #Count popularity if (isset($cfg['adisp'])) { register_shutdown_function(array($db, 'exec'), 'UPDATE ' . PRE . 'arts SET views=views+1 WHERE ID=' . $id); ++$art['views']; } else { $art['ent'] = 0; } #Pages if ($art['pages'] > 1) { $pages = pages($page, $art['pages'], 1, url('art/' . $id), 0, '/'); } else { $pages = false; } #Template $view->add('art', array('art' => &$art, 'pages' => &$pages, 'path' => catPath($art['cat']), 'edit' => admit($art['cat'], 'CAT') ? url('edit/1/' . $id, 'ref=' . $page) : false, 'color' => $art['opt'] & 4, 'rates' => $rates, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['arts'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/articles'), 'lightbox' => isset($cfg['lightbox']))); #Tags if (isset($cfg['tags'])) { include './lib/tags.php'; tags($id, 1); } #Comments if (isset($cfg['acomm']) && $art['catOpt'] & 2) { require './lib/comm.php'; comments($id, 1); }
if (count($files) == 0) { echo '<div class="alert alert-info"><strong>Oups!</strong> Aucune actualitée pour le moment...</div>'; } else { foreach ($files as $file) { $user = User::getUserById($file->id_user); $list_avatars = Avatar::getAvatarsByUserId($file->id_user); echo '<hr/>'; echo '<div class="post"> <a href="' . url('profil/view/' . $file->id_user) . '"><img src="' . $list_avatars[0]->getMiniatureLink() . '" class="img-polaroid avatar-little" alt="Voir le profil de ' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . '" title="Voir le profil de ' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . '" /></a> <h4>' . ucfirst($user->vorname) . ' ' . ucfirst($user->name) . ' a partagé : <small>(le ' . $file->date . ')</small> <span class="label label-important">' . $file->type . '</span></h4> <div class="well"> <blockquote> <p>' . $file->desc . '</p> </blockquote> ' . $file->getHTML() . ' <p class="tags"><i class="icon-tags"></i> Tags: ' . tags($file->keywords) . '</p> </div> </div>'; } } ?> </div> <div class="span4"> <h3>Actions:</h3> <div class="dropdown"> <button class="dropdown-toggle btn" data-toggle="dropdown" >Dérouler <span class="caret"></span></button> <a href="" class="btn btn-info"><i class="icon-refresh icon-white"></i></a> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> <li><a tabindex="-1" href="<?php echo url('flux/share'); ?>
{ $string = trim(strip_tags(html_entity_decode(urldecode($string)))); if (empty($string)) { return false; } $extras = array('p' => array('ante', 'bajo', 'con', 'contra', 'desde', 'durante', 'entre', 'hacia', 'hasta', 'mediante', 'para', 'por', 'pro', 'segun', 'sin', 'sobre', 'tras', 'via'), 'a' => array('los', 'las', 'una', 'unos', 'unas', 'este', 'estos', 'ese', 'esos', 'aquel', 'aquellos', 'esta', 'estas', 'esa', 'esas', 'aquella', 'aquellas', 'usted', 'nosotros', 'vosotros', 'ustedes', 'nos', 'les', 'nuestro', 'nuestra', 'vuestro', 'vuestra', 'mis', 'tus', 'sus', 'nuestros', 'nuestras', 'vuestros', 'vuestras', 'tengo'), 'o' => array('esto', 'que')); $string = strtr(mb_strtolower((string) $string, $encoding), 'âàåáäèéêëïîìíôöòóúûüùñ', 'aaaaaeeeeiiiioooouuuun'); if (preg_match_all('/\\pL{3,}/s', $string, $m)) { $m = array_diff(array_unique($m[0]), $extras['p'], $extras['a'], $extras['o']); } return $m; } //print_r(tags($busqueda)); include_once 'conexion.php'; $contador2 = 0; foreach (tags($busqueda) as $valor) { $contador = 0; $consulta = "SELECT * FROM deseos WHERE cumplido = 'n' AND deseo like '%{$valor}%' "; $result = mysql_query($consulta) or die('Ha fallado la conexión: ' . mysql_error()); $array = mysql_fetch_array($result); $total_registros = mysql_num_rows($result); do { $id = $array['id']; $id_usuario = $array['id_usuario']; $consulta3 = "SELECT * FROM usuarios WHERE id = '{$id_usuario}' "; $result3 = mysql_query($consulta3) or die('Ha fallado la conexión: ' . mysql_error()); $array3 = mysql_fetch_array($result3); $total_registros3 = mysql_num_rows($result3); do { $nombre = $array3['nombre']; } while ($array3 = mysql_fetch_array($result3));
/** * This function get photo details, setups an array for content. * This also serves as an example on how to use custom callback * for subscription type * * @author Fawaz Tahir <*****@*****.**> * @param type $id * @return array|boolean */ function get_subscription_photo($id) { global $cbphoto, $userquery; $photo = $cbphoto->get_photo($id, true); if ($photo) { $fields = array('photo_description', 'photo_tags', 'collection_id', 'collection_name', 'views', 'file_directory', 'server_url', 'broadcast', 'date_added'); $fields = get_photo_fields($fields); foreach ($fields as $field) { if ($field == 'photo_details') { continue; } $details[$field] = $photo[$field]; } $details['title'] = $photo['photo_title']; $details['description'] = $photo['photo_descritpion']; $details['tags'] = tags($photo['photo_tags'], "photos"); $details['heading'] = sprintf(lang('<a href="%s">%s</a> added a new photo in <a href="%s">%s</a>'), $userquery->profile_link($photo), name($photo), collection_links($photo), $photo['collection_name']); $details['link'] = view_photo_link($photo); $details['thumb'] = get_image_url($photo, 'm'); return $details; } return false; }
} elseif (!UID) { return; } } #Evaluate PHP first if ($page['opt'] & 16) { ob_start(); eval('?>' . $page['text']); $page['text'] = ob_get_clean(); } #Emoticons if ($page['opt'] & 2) { $page['text'] = emots($page['text']); } #Line breaks if ($page['opt'] & 1) { $page['text'] = nl2br($page['text']); } #Page title, template $view->title = $page['name']; $view->add('page', array('page' => &$page, 'box' => $page['opt'] & 4, 'all' => $edit ? url('pages', '', 'admin') : false, 'edit' => $edit ? url('editPage/' . $id, 'ref', 'admin') : false)); #Keywords if (isset($cfg['tags'])) { include './lib/tags.php'; tags($id, 59); } #Comments if ($page['opt'] & 8) { require './lib/comm.php'; comments($id, 59); }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="hu" xml:lang="hu"> <head> <?php require 'adatbazis.php'; include 'functions.php'; ?> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="style.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <title>Régi Magyar Exemplumadatbázis</title> <meta name="author" content="Bartók Zsófia Ágnes"> <meta name="description" content="Régi Magyar Exemplumadatbázis: Kereső"> <meta itemscope itemtype="CreativeWork" itemprop="keywords" name="keywords" content="exemplum, adatbazis, regi, magyar, irodalom, egyhazi, elte, btk, középkor<?php tags(); ?> "> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-56011780-1', 'auto'); ga('send', 'pageview'); </script> </head> <body id="index">
die('Failed Query'); } while ($row = $result->fetch_assoc()) { print "http://dropbox.easytospell.net/thumb/{$row['id']}/{$row['id']}.jpg\n"; } } print "GET\n"; print var_dump($_GET); print "POST\n"; print var_dump($_POST); $args = explode('/', $_GET['args']); switch ($_GET['cmd']) { case 'get': switch ($args[0]) { case 'tags': tags($db); break; case 'images': images($db); break; case 'thumbs': thumbs($db); break; } break; } ?> api methods: get: tags:
if ($prevAct != $action) { $mySess->set('prevAct', $action); JRequest::setVar('pg', 20); } else { // doesnt need to set } } } if ($task == 'edit' || $task == 'add') { // JRequest::setVar( 'hidemainmenu', 1 ); JRequest::setVar('hidemainmenu', 0); } //action cases switch ($action) { case 'tags': tags($action, $task, $template_id); break; case 'templates': require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'templates.jnews.php'; require_once JNEWSPATH_ADMIN . 'views' . DS . 'templates.jnews.html.php'; templates($action, $task, $template_id); break; case 'list': $listType = 1; require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'lists.jnews.php'; require_once JNEWSPATH_ADMIN . 'views' . DS . 'lists.jnews.html.php'; lists($action, $task, $listId, $listType); break; case 'arlist': $listType = 2; require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'lists.jnews.php';
" height="<?php echo $height; ?> "/> </a> <?if($arProps['metka']['~VALUE']!=''):?> <div class="tag row"> <? $link_tag = tags_link($arProps['metka']['~VALUE']); ?> <a href="<?php echo $link_tag; ?> " class="link_tag"> <div class="name-tag"><?php echo tags($arProps['metka']['~VALUE']); ?> </div> <div class="trigon"></div> </a> </div> <?endif;?> <div class="pad_10_15 name-item"> <h3> <a href="/<?php echo $arProps['type']['VALUE_XML_ID']; ?> /<?php echo $arFields['CODE']; ?> /"><?php
function comment($freeze_status) { echo '<h3>Comments</h3>'; global $categorySEF, $subcatSEF, $articleSEF, $_ID, $commentsPage; if (isset($commentsPage)) { $commentsPage = str_replace(l('comment_pages'), '', $commentsPage); } if (strpos($articleSEF, l('paginator')) === 0) { $articleSEF = str_replace(l('paginator'), '', $articleSEF); } if (!isset($commentsPage) || !is_numeric($commentsPage) || $commentsPage < 1) { $commentsPage = 1; } $comments_order = s('comments_order'); if (isset($_POST['comment'])) { $comment = cleanWords(trim($_POST['text'])); $comment = strlen($comment) > 4 ? clean(cleanXSS($comment)) : null; $name = trim($_POST['name']); $name = strlen($name) > 1 ? clean(cleanXSS($name)) : null; $url = trim($_POST['url']); $url = strlen($url) > 8 && strpos($url, '?') === false ? clean(cleanXSS($url)) : null; $post_article_id = is_numeric($_POST['id']) && $_POST['id'] > 0 ? $_POST['id'] : null; $ip = strlen($_POST['ip']) < 16 ? clean(cleanXSS($_POST['ip'])) : null; if (_ADMIN) { $doublecheck = 1; $ident = 1; } else { $contentCheck = retrieve('id', 'comments', 'comment', $comment); $ident = !$contentCheck || time() - $_SESSION[_SITE . 'poster']['time'] > s('comment_repost_timer') || $_SESSION[_SITE . 'poster']['ip'] !== $ip ? 1 : 0; $doublecheck = $_SESSION[_SITE . 'poster']['article'] === "{$comment}:|:{$post_article_id}" && time() - $_SESSION[_SITE . 'poster']['time'] < s('comment_repost_timer') ? 0 : 1; } if ($ip == $_SERVER['REMOTE_ADDR'] && $comment && $name && $post_article_id && checkMathCaptcha() && $doublecheck == 1 && $ident == 1) { $url = preg_match('/((http)+(s)?:(\\/\\/)|(www\\.))([a-z0-9_\\-]+)/', $url) ? $url : ''; $url = substr($url, 0, 3) == 'www' ? 'http://' . $url : $url; $time = date('Y-m-d H:i:s'); unset($_SESSION[_SITE . 'poster']); $approved = s('approve_comments') != 'on' || _ADMIN ? 'True' : ''; $query = 'INSERT INTO ' . _PRE . 'comments' . '(articleid, name, url, comment, time, approved) VALUES' . "('{$post_article_id}', '{$name}', '{$url}', '{$comment}', '{$time}', '{$approved}')"; mysql_query($query); $_SESSION[_SITE . 'poster']['article'] = "{$comment}:|:{$post_article_id}"; $_SESSION[_SITE . 'poster']['time'] = time(); // this is to set session for checking multiple postings. $_SESSION[_SITE . 'poster']['ip'] = $ip; $commentStatus = s('approve_comments') == 'on' && !_ADMIN ? l('comment_sent_approve') : l('comment_sent'); // eMAIL COMMENTS if (s('mail_on_comments') == 'on' && !_ADMIN) { if (s('approve_comments') == 'on') { $status = l('approved_text'); $subject = l('subject_a'); } else { $status = l('not_waiting_approved'); $subject = l('subject_b'); } $to = s('website_email'); $send_array = array('to' => $to, 'name' => $name, 'comment' => $comment, 'ip' => $ip, 'url' => $url, 'subject' => $subject, 'status' => $status); send_email($send_array); } // End of Mail } else { $commentStatus = l('comment_error'); $commentReason = l('ce_reasons'); $fail = true; $_SESSION[_SITE . 'comment']['name'] = $name; $_SESSION[_SITE . 'comment']['comment'] = br2nl($comment); $_SESSION[_SITE . 'comment']['url'] = $url; $_SESSION[_SITE . 'comment']['fail'] = $fail; } echo '<h2>' . $commentStatus . '</h2>'; if (!empty($commentReason)) { echo '<p>' . $commentReason . '</p>'; } $postArt = clean(cleanXSS($_POST['article'])); $postArtID = retrieve('category', 'articles', 'id', $post_article_id); if ($postArtID == 0) { $postCat = ''; } else { $postCat = cat_rel($postArtID, 'seftitle') . '/'; } if ($fail) { $back_link = _SITE . $postCat . $postArt; echo '<a href="' . $back_link . '/">' . l('back') . '</a>'; } else { echo '<meta http-equiv="refresh" content="1; url=' . _SITE . $postCat . $postArt . '/">'; } } else { $commentCount = s('comment_limit'); $comment_limit = empty($commentCount) || $commentCount < 1 ? 100 : $commentCount; if (isset($commentsPage)) { $pageNum = $commentsPage; } $offset = ($pageNum - 1) * $comment_limit; $totalrows = 'SELECT count(id) AS num FROM ' . _PRE . 'comments' . ' WHERE articleid = ' . $_ID . ' AND approved = \'True\';'; $rowsresult = mysql_query($totalrows); $numrows = mysql_fetch_array($rowsresult); $numrows = $numrows['num']; /**** redundant/excessive /* if ($numrows == 0) { if ($freeze_status != 'freezed' && s('freeze_comments') != 'YES') { echo '<p>'.l('no_comment').'</p>'; } else { echo '<p>'.l('frozen_comments').'</p>'; } } else { /**** end redundant/excessive*****/ if ($numrows > 0) { $query = 'SELECT id,articleid,name,url,comment,time,approved FROM ' . _PRE . 'comments' . ' WHERE articleid = ' . $_ID . ' AND approved = \'True\' ORDER BY id ' . $comments_order . ' LIMIT ' . "{$offset}, {$comment_limit}"; $result = mysql_query($query) or die(l('dberror')); $ordinal = 1; $date_format = s('date_format'); $edit_link = ' <a href="' . _SITE . '?action='; while ($r = mysql_fetch_array($result)) { $date = date($date_format, strtotime($r['time'])); $commentNum = $offset + $ordinal; $tag = explode(',', tags('comments')); foreach ($tag as $tag) { switch (true) { case $tag == 'date': echo '<a id="' . l('comment') . $commentNum . '" name="' . l('comment') . $commentNum . '"></a>' . $date; break; case $tag == 'name': $name = $r['name']; echo !empty($r['url']) ? '<a href="' . $r['url'] . '" title="' . $r['url'] . '" rel="nofollow"> ' . $name . '</a> ' : $name; break; case $tag == 'comment': echo $r['comment']; break; case $tag == 'edit' && _ADMIN: echo $edit_link . 'editcomment&commentid=' . $r['id'] . '" title="' . l('edit') . ' ' . l('comment') . '">' . l('edit') . '</a> '; echo $edit_link . 'process&task=deletecomment&commentid=' . $r['id'] . '" title="' . l('delete') . ' ' . l('comment') . '" onclick="return pop()">' . l('delete') . '</a>'; break; case $tag == 'edit': break; default: echo $tag; } } $ordinal++; } $maxPage = ceil($numrows / $comment_limit); $back_to_page = ceil(($numrows + 1) / $comment_limit); if ($maxPage > 1) { paginator($pageNum, $maxPage, l('comment_pages')); } } if ($freeze_status != 'freezed' && s('freeze_comments') != 'YES') { /*added 24 jan 2009*/ if ($numrows == 0) { echo '<p>' . l('no_comment') . '</p>'; } // recall and set vars for reuse when botched post if ($_SESSION[_SITE . 'comment']['fail'] == true) { $name = $_SESSION[_SITE . 'comment']['name']; $comment = $_SESSION[_SITE . 'comment']['comment']; $url = $_SESSION[_SITE . 'comment']['url']; unset($_SESSION[_SITE . 'comment']); } else { $url = $name = $comment = ''; } // end var retrieval $art_value = empty($articleSEF) ? $subcatSEF : $articleSEF; echo '<div class="commentsbox"><h2>' . l('addcomment') . '</h2>' . "\r\n"; echo '<p>' . l('required') . '</p>' . "\r\n"; echo html_input('form', '', 'post', '', '', '', '', '', '', '', '', '', 'post', _SITE, '') . "\r\n"; echo html_input('text', 'name', 'name', $name, '* ' . l('name'), 'text', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('text', 'url', 'url', $url, l('url'), 'text', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('textarea', 'text', 'text', $comment, '* ' . l('comment'), '', '', '', '', '', '5', '5', '', '', '') . "\r\n"; echo mathCaptcha() . "\r\n"; echo '<p>'; echo html_input('hidden', 'category', 'category', $categorySEF, '', '', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('hidden', 'id', 'id', $_ID, '', '', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('hidden', 'article', 'article', $art_value, '', '', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('hidden', 'commentspage', 'commentspage', $back_to_page, '', '', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('hidden', 'ip', 'ip', $_SERVER['REMOTE_ADDR'], '', '', '', '', '', '', '', '', '', '', '') . "\r\n"; echo html_input('hidden', 'time', 'time', time(), '', '', '', '', '', '', '', '', '', '', ''); echo html_input('submit', 'comment', 'comment', l('submit'), '', 'button', '', '', '', '', '', '', '', '', '') . "\r\n"; echo '</p></form></div>'; } else { echo '<p>' . l('frozen_comments') . '</p>'; } } }
#Page title $view->title = $news['name']; #Emoticons if ($news['opt'] & 2) { $news['txt'] = emots($news['txt']); if ($full) { $full = emots($full); } } #Line breaks if ($news['opt'] & 1) { $news['txt'] = nl2br($news['txt']); if ($full) { $full = nl2br($full); } } #Date, author $news['date'] = genDate($news['date'], true); $news['wrote'] = autor($news['author']); #Assign to template $view->add('news', array('news' => &$news, 'full' => &$full, 'path' => catPath($news['cat']), 'edit' => admit($news['cat'], 'CAT') ? url('edit/5/' . $id, 'ref') : false, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['news'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/news'))); #Tags if (isset($cfg['tags'])) { include './lib/tags.php'; tags($id, 5); } #Comments if (isset($cfg['ncomm']) && $news['catOpt'] & 2) { require './lib/comm.php'; comments($id, 5); }
$view->info(sprintf($lang['NVAL'], $img['name']), null, 'warning'); } #Dimensions $size = strpos($img['size'], '|') ? explode('|', $img['size']) : null; #Data, autor $img['date'] = genDate($img['date'], true); $img['author'] = autor($img['author']); #Ocena if (isset($cfg['irate']) and $img['opt'] & 4) { $view->css(SKIN_DIR . 'rate.css'); $rates = 'vote.php?type=3&id=' . $id; } else { $rates = 0; } #Tag title and meta description - clean temporary $view->title = $img['name']; $view->desc = $img['dsc'] ? clean(substr($img['dsc'], 0, 150)) : $cfg['metaDesc']; #Description $img['dsc'] = nl2br($img['dsc']); #Template $view->add('img', array('img' => &$img, 'size' => &$size, 'rates' => $rates, 'image' => $img['type'] === '1' ? true : false, 'flash' => $img['type'] === '2' ? true : false, 'audio' => $img['type'] === '3' ? true : false, 'video' => $img['type'] === '4' ? true : false, 'path' => catPath($img['cat']), 'edit' => admit($img['cat'], 'CAT') ? url('edit/3/' . $id, 'ref') : false, 'root' => isset($cfg['allCat']) ? $lang['cats'] : $lang['imgs'], 'cats' => url(isset($cfg['allCat']) ? 'cats' : 'cats/images'), 'lightbox' => isset($cfg['lightbox']))); #Tags if (isset($cfg['tags'])) { include './lib/tags.php'; tags($id, 3); } #Comments if (isset($cfg['icomm']) && $img['opt'] & 2) { require 'lib/comm.php'; comments($id, 3); }
function get_product($url) { global $products_cache; if ($products_cache[$url]) { return $products_cache[$url]; } $result = parse_hProduct(get_url($url)); $result = $result[0]; # Assume just one product in the document. $result['tags'] = tags($url . '/tags'); return $products_cache[$url] = $result; }
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 }
" height="<?php echo $height; ?> "/> </a> <?if($arItem['PROPERTIES']['metka']['~VALUE']!=''):?> <div class="tag row"> <? $link_tag = tags_link($arItem['PROPERTIES']['metka']['~VALUE']); ?> <a href="<?php echo $link_tag; ?> " class="link_tag"> <div class="name-tag"><?php echo tags($arItem['PROPERTIES']['metka']['~VALUE']); ?> </div> <div class="trigon"></div> </a> </div> <?endif;?> <div class="pad_10_15 name-item"> <h3> <a href="/<?php echo $arItem['PROPERTIES']['type']['VALUE_XML_ID']; ?> /<?php echo $arItem['CODE']; ?> /"><?php
function tags($url) { return tags($url); }
?> </pubDate> <media:player url="<?php echo video_link($video); ?> " /> <media:thumbnail url="<?php echo get_thumb($video); ?> " width="120" height="90" /> <media:title><?php echo substr($video['title'], 0, 50); ?> </media:title> <media:category label="Tags"><?php echo strip_tags(tags($video['tags'], 'video')); ?> </media:category> <media:credit><?php echo $video['username']; ?> </media:credit> <enclosure url="<?php echo video_link($video); ?> " type="application/x-shockwave-flash" /> </item> <?php } ?>
/** * main function. checks for authorization and renders the * required admin section. */ function admin_main($authorised) { echo "\n<div id=\"channel_admin\" class=\"frame\">"; if ($authorised) { admin_menu(); if (array_key_exists(CST_ADMIN_DOMAIN, $_REQUEST)) { switch ($_REQUEST[CST_ADMIN_DOMAIN]) { case CST_ADMIN_DOMAIN_FOLDER: $show = folder_admin(); break; case CST_ADMIN_DOMAIN_CHANNEL: $show = channel_admin(); break; case CST_ADMIN_DOMAIN_CONFIG: $show = config_admin(); break; case CST_ADMIN_DOMAIN_ITEM: $show = item_admin(); break; case CST_ADMIN_DOMAIN_PLUGINS: $show = plugins_admin(); break; case CST_ADMIN_DOMAIN_THEMES: $show = themes_admin(); break; case CST_ADMIN_DOMAIN_TAGS: $show = tags_admin(); break; case CST_ADMIN_DOMAIN_PLUGIN_OPTIONS: $show = plugin_options_admin(); break; case CST_ADMIN_DOMAIN_THEME_OPTIONS: $show = theme_options_admin(); break; default: break; } } if (array_key_exists(CST_ADMIN_VIEW, $_REQUEST) || isset($show)) { if (!isset($show)) { $show = $_REQUEST[CST_ADMIN_VIEW]; } switch ($show) { case CST_ADMIN_DOMAIN_CONFIG: config(); break; case CST_ADMIN_DOMAIN_CHANNEL: channels(); break; case CST_ADMIN_DOMAIN_FOLDER: folders(); break; case CST_ADMIN_DOMAIN_OPML: opml(); break; case CST_ADMIN_DOMAIN_NONE: break; case CST_ADMIN_DOMAIN_ITEM: items(); break; case CST_ADMIN_DOMAIN_SYSINFO: sysinfo(); break; case CST_ADMIN_DOMAIN_DASHBOARD: dashboard(); break; case CST_ADMIN_DOMAIN_PLUGINS: plugins(); break; case CST_ADMIN_DOMAIN_THEMES: themes(); break; case CST_ADMIN_DOMAIN_TAGS: tags(); break; case CST_ADMIN_DOMAIN_PLUGIN_OPTIONS: plugin_options(); break; case CST_ADMIN_DOMAIN_THEME_OPTIONS: theme_options(); break; default: } } else { if (true == getConfig('rss.config.defaultdashboard')) { dashboard(); } else { channels(); } } echo "\n<div class=\"clearer\"></div>\n"; } else { rss_error(sprintf(__('<h1>Not Authorized!</h1>You are not authorized to access the administration interface. Please follow <a href="%s">this link</a> back to the main page. Have a nice day!'), getPath()), RSS_ERROR_ERROR, true); } echo "</div>\n"; }
" height="<?php echo $height; ?> "/> </a> <?if($mater[$item_num]['PROPERTY'][0]['metka']['~VALUE']!=''):?> <div class="tag row"> <? $link_tag = tags_link($mater[$item_num]['PROPERTY'][0]['metka']['~VALUE']); ?> <a href="<?php echo $link_tag; ?> " class="link_tag"> <div class="name-tag"><?php echo tags($mater[$item_num]['PROPERTY'][0]['metka']['~VALUE']); ?> </div> <div class="trigon"></div> </a> </div> <?endif;?> <div class="pad_10_15 name-item"> <h3> <a href="/<?php echo $mater[$item_num]['PROPERTY'][0]['type']['VALUE_XML_ID']; ?> /<?php echo $mater[$item_num]['CODE']; ?> /"><?php
function post_end($post) { $content = ob_get_contents(); ob_end_clean(); ?> <div class="post" id="post-<?php echo $post['id']; ?> "> <div class="rating" id="rating-<?php echo $post['id']; ?> "> <span><?php echo $post['rating']; ?> </span> <a href="#">голосовать</a> </div> <div class="text"> <?php echo avatar($post); ?> <h2><?php echo $post['title']; ?> </h2> <div class="author">Написал: <a href="<?php echo site_url('user/profile/' . $post['login']); ?> "><?php echo $post['login']; ?> </a></div> <?php echo post_control($post); ?> <?php echo $content; ?> <div class="tags"> <?php echo tags($post); ?> </div> </div> </div> <?php }