Viewing file: b9d83fc31121e609c4a148c3a79a6d23f7c9ff36.file.videoblock.tpl.php (4.44 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Smarty version Smarty3-RC3, created on 2012-05-12 12:51:12 compiled from "modules/videogallery/templates/videoblock.tpl" */ ?> <?php /*%%SmartyHeaderCode:11205806514fae3290565b44-09527059%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( 'b9d83fc31121e609c4a148c3a79a6d23f7c9ff36' => array ( 0 => 'modules/videogallery/templates/videoblock.tpl', 1 => 1336809188, ), ), 'nocache_hash' => '11205806514fae3290565b44-09527059', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <?php $_smarty_tpl->tpl_vars["video_title"] = new Smarty_variable("video_title_".($_smarty_tpl->getVariable('alang')->value), null, null);?>
<?php $_smarty_tpl->tpl_vars['album_name'] = new Smarty_variable("album_name_".($_smarty_tpl->getVariable('alang')->value), null, null);?>
<div class="photogallery videogallery">
<ul class="sortable">
<?php $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('videos')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){ ?>
<li id="video_id_<?php echo $_smarty_tpl->tpl_vars['row']->value['video_id'];?> " code="<?php echo $_smarty_tpl->tpl_vars['row']->value['video_id'];?> ">
<div class="picture">
<?php if (is_file("/data/videogallery/i".($_smarty_tpl->tpl_vars['row']->value['video_filename']).".jpg")){?>
<img src="/data/videogallery/i<?php echo $_smarty_tpl->tpl_vars['row']->value['video_filename'];?> .jpg" />
<?php }else{ ?>
<img src="http://i.ytimg.com/vi/<?php echo $_smarty_tpl->tpl_vars['row']->value['video_youtube_id'];?> /0.jpg" width="100" />
<?php }?>
</div>
<div class="info">
<div class="title"><a><?php echo $_smarty_tpl->tpl_vars['row']->value[$_smarty_tpl->getVariable('video_title')->value];?> </a></div>
<div class="date"><?php echo $_smarty_tpl->getVariable('ALANG')->value['VideogalleryVideoCreationDate'];?> : <strong><?php echo $_smarty_tpl->tpl_vars['row']->value['video_date_of_creation'];?> </strong></div>
<div class="links">
<a href="admin.php?mod=Videogallery&video_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['video_id'];?> &edit" class="edit"><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreEdit'];?> </a>
<a href="#" class="delete"><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreDelete'];?> </a>
<a href="#" class="first">на першу сторінку</a>
</div>
</div>
</li>
<?php }} ?>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function()
{
$(".photogallery .sortable .cover").click(function()
{
elem = $(this).parents("li");
id = $(this).parents("li").attr("code");
$.post("/admin-asynch.php?mod=Videogallery", { "oper" : "cover", "id" : id }, function(data)
{
if (data.status == "ok")
{
elem.animate( { "background-color" : "#FFC" }, 1000).animate({ "background-color" : "#F9FAFF" }, 1000);
}
}, "json");
return false;
});
$(".photogallery .sortable .first").click(function()
{
elem = $(this).parents("li");
id = $(this).parents("li").attr("code");
$.post("/admin-asynch.php?mod=Videogallery", { "oper" : "first", "id" : id }, function(data)
{
if (data.status == "ok")
{
elem.animate( { "background-color" : "#FFC" }, 1500).animate({ "background-color" : "#F9FAFF" }, 1000);
}
}, "json");
return false;
});
$(".photogallery .sortable .delete").click(function()
{
if ($(this).hasClass('delete'))
if (!confirm("delete_question".l()))
return false;
elem = $(this).parents("li");
id = $(this).parents("li").attr("code");
$.post("/admin-asynch.php?mod=Videogallery", { "oper" : "delete", "id" : id, "table" : "AMCMS_videogallery_videos" }, function(data)
{
elem.hide(1000).remove(1000);
});
return false;
});
$(".photogallery .sortable").sortable({
placeholder: 'placeholder',
stop : function()
{
str = $(this).sortable('serialize');
$.post("/admin-asynch.php?mod=Videogallery", { "ids" : str, "oper" : "sorting", "table" : "AMCMS_videogallery_videos" });
}
});
$(".photogallery .sortable").disableSelection();
});
</script>
|