Pjade error: Error, while eval template. «[1449] The user specified as a definer ('tour-kz'@'localhost') does not exist ( CALL parent_id("gallery_sections",1677); )» [[1449] The user specified as a definer ('tour-kz'@'localhost') does not exist ( CALL parent_id("gallery_sections",1677); )]
template: content/article
Generated HTML
0 <div id="content_article" class="article_item" data-id="2304">
1 <div class="ca_view_anchor ca_edit_invisible"><div class="ca_view_panel"> <div class="social_auto_like" data-social="{&quot;url&quot;:&quot;http:\/\/kompastour.uz\/tourfest_2017_msd&quot;,&quot;text&quot;:&quot;“TOURFEST 2017” Mega Sales Day&quot;}"></div>
2 <div class="ca_content site_content">
Generated PHP
0 <?php $pjade_fn = array(); ?><?php $pjade_fn["site_search"]=function()use(&$pjade_fn){ ?>
1 <div id="site_search">
2 <input type="text" name="search" placeholder="<?php echo htmlspecialchars(___('msg.search')); ?>"/>
3 <div class="ss_submit" title="<?php echo htmlspecialchars(___('action.search')); ?>"></div>
4 </div>
5 <?php } ?>
6 <?php $pjade_fn["button"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('class'=>'','data'=>'','title'=>'','name'=>'','id'=>'','type'=>'button','action'=>'','disabled'=>htmlspecialchars(false),'file'=>'','hint'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
7 <?php $title = $title ?: ___('action.submit') ?><div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_button')); $__pjade_attr['id'][]=htmlspecialchars($id); ?><?php if( $file ): ?><?php $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_file')); ?><?php endif; ?><?php ?><?php if( $disabled ): ?><?php $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_disabled')); ?><?php endif; ?><?php ?><?php if( $class ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($class); ?><?php endif; ?><?php ?><?php if( $action ): ?><?php $__pjade_attr['data-action']=array(htmlspecialchars($action)); ?><?php endif; ?><?php ?><?php if( $hint ): ?><?php $__pjade_attr['title']=array(htmlspecialchars($hint)); ?><?php endif; ?><?php ?><?php if( $data ): ?><?php $__pjade_attr['data-data']=array(htmlspecialchars($data)); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="tmp_right">
8 <div class="tmp_center">
9 <div class="tmp_label"><?php echo htmlspecialchars($title); ?></div>
10 <button <?php $__pjade_attr = array(); $__pjade_attr['type'][]=htmlspecialchars($type); ?><?php if( $name && ! $file ): ?><?php $__pjade_attr['name']=array(htmlspecialchars($name)); ?><?php endif; ?><?php ?><?php if( $disabled ): ?><?php $__pjade_attr['disabled']=array(htmlspecialchars(trim('disabled'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>></button>
11 </div>
12 </div><?php if( $file ): ?> <input type="file" name="<?php echo htmlspecialchars($name); ?>"/>
13 <?php endif; ?></div>
14 <?php } ?>
15 <?php $pjade_fn["input"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('class'=>'','title'=>'','name'=>'','id'=>'','type'=>'text','autocomplete'=>htmlspecialchars(false),'value'=>'','tabindex'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
16 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_input')); ?><?php if( $class ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($class); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="tmp_wrapper">
17 <input <?php $__pjade_attr = array(); $__pjade_attr['type'][]=htmlspecialchars($type); $__pjade_attr['name'][]=htmlspecialchars($name); $__pjade_attr['placeholder'][]=htmlspecialchars($title); $__pjade_attr['value'][]=htmlspecialchars($value); ?><?php if( $tabindex ): ?><?php $__pjade_attr['tabindex']=array(htmlspecialchars($tabindex)); ?><?php endif; ?><?php ?><?php if( $autocomplete ): ?><?php $__pjade_attr['autocomplete']=array(htmlspecialchars(trim('true'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>/>
18 </div>
19 </div>
20 <?php } ?>
21 <?php $pjade_fn["textarea"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('class'=>'','title'=>'','name'=>'','id'=>'','autocomplete'=>htmlspecialchars(false),'value'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
22 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_textarea')); ?><?php if( $class ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($class); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="tmp_wrapper">
23 <textarea <?php $__pjade_attr = array(); $__pjade_attr['name'][]=htmlspecialchars($name); $__pjade_attr['placeholder'][]=htmlspecialchars($title); $__pjade_attr['value'][]=htmlspecialchars($value); ?><?php if( $autocomplete ): ?><?php $__pjade_attr['autocomplete']=array(htmlspecialchars(trim('true'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>></textarea>
24 </div>
25 </div>
26 <?php } ?>
27 <?php $pjade_fn["check_box"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('checked'=>'','class'=>'','title'=>'','name'=>'','id'=>'','value'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
28 <label <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_checkbox')); $__pjade_attr['id'][]=htmlspecialchars($id); ?><?php if( $class ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($class); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <input <?php $__pjade_attr = array(); $__pjade_attr['type'][]=htmlspecialchars(trim('checkbox')); $__pjade_attr['name'][]=htmlspecialchars($name); $__pjade_attr['value'][]=htmlspecialchars(trim('true')); ?><?php if( $value ): ?><?php $__pjade_attr['checked']=array(htmlspecialchars(trim('checked'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>/>
29 <span class="tmp_title"><?php echo htmlspecialchars($title); ?></span>
30 </label>
31 <?php } ?>
32 <?php $pjade_fn["check_box_v2"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('checked'=>'','class'=>'','name'=>'','title'=>'','id'=>'','value'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
33 <div class="tmp_checkbox tmp_checkbox_v2 <?php echo htmlspecialchars($class); ?>" <?php if($__attr=htmlspecialchars($id))echo 'id="'.$__attr.'"';?>><?php $cb_id = 'tmp_cb_v2_'.uniqid(); ?> <input <?php $__pjade_attr = array(); $__pjade_attr['type'][]=htmlspecialchars(trim('checkbox')); $__pjade_attr['name'][]=htmlspecialchars($name); $__pjade_attr['value'][]=htmlspecialchars(trim('true')); $__pjade_attr['id'][]=htmlspecialchars($cb_id); ?><?php if( $value ): ?><?php $__pjade_attr['checked']=array(htmlspecialchars(trim('checked'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>/>
34 <label for="<?php echo htmlspecialchars($cb_id); ?>"><?php echo htmlspecialchars($title); ?></label>
35 </div>
36 <?php } ?>
37 <?php $pjade_fn["select"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('name'=>'','class'=>'','id'=>'','content'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
38 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_select')); $__pjade_attr['id'][]=htmlspecialchars($id); ?><?php if( $class ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($class); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <select name="<?php echo htmlspecialchars($name); ?>"><?php if( $content ): ?><?php echo $content; ?><?php endif; ?></select>
39 </div>
40 <?php } ?>
41 <?php $pjade_fn["radio_button"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('checked'=>'','class'=>'','title'=>'','name'=>'','id'=>'','value'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
42 <?php $cb_id = 'tmp_rb_'.uniqid() ?><div class="tmp_radio <?php echo htmlspecialchars($class); ?>" <?php if($__attr=htmlspecialchars($id))echo 'id="'.$__attr.'"';?>>
43 <input <?php $__pjade_attr = array(); $__pjade_attr['id'][]=htmlspecialchars($cb_id); $__pjade_attr['type'][]=htmlspecialchars(trim('radio')); $__pjade_attr['name'][]=htmlspecialchars($name); $__pjade_attr['value'][]=htmlspecialchars($value); ?><?php if( $checked ): ?><?php $__pjade_attr['checked']=array(htmlspecialchars(trim('checked'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>/>
44 <label for="<?php echo htmlspecialchars($cb_id); ?>"><?php echo $title; ?></label>
45 </div>
46 <?php } ?>
47 <?php $pjade_fn["info_panel_prop"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('label'=>'','value'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
48 <div class="af_prop">
49 <div class="if_label"><?php echo htmlspecialchars($label.':'); ?></div>
50 <div class="if_value"><?php echo $value; ?></div>
51 </div>
52 <?php } ?>
53 <?php $pjade_fn["layout"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('id'=>'','title'=>'','content'=>'','class'=>''),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
54 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_layout')); $__pjade_attr['style'][]=htmlspecialchars(trim('display: none')); ?><?php if( $id ): ?><?php $__pjade_attr['data-id']=array(htmlspecialchars($id)); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="tl_dark_screen"></div>
55 <div class="tl_form <?php echo htmlspecialchars($class); ?>" id="<?php echo htmlspecialchars($id); ?>">
56 <div class="tl_close" title="<?php echo htmlspecialchars(___('action.close')); ?>"></div><?php if( $title ): ?> <div class="tl_title"><?php echo $title; ?></div>
57 <?php endif; ?> <div class="tl_content"><?php echo $content; ?></div>
58 </div>
59 </div>
60 <?php } ?>
61 <?php $pjade_fn["layout_form"]=function($mixin_data=array())use(&$pjade_fn){$pjade_data=array_merge(array('id'=>'','title'=>'','content'=>'','class'=>'','action'=>'#','method'=>'POST','file'=>htmlspecialchars(false)),$mixin_data);extract($pjade_data);unSet($pjade_data); ?>
62 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tmp_layout')); $__pjade_attr['style'][]=htmlspecialchars(trim('display: none')); ?><?php if( $id ): ?><?php $__pjade_attr['data-id']=array(htmlspecialchars($id)); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="tl_dark_screen"></div>
63 <form <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('tl_form')); $__pjade_attr['class'][]=htmlspecialchars($class); $__pjade_attr['id'][]=htmlspecialchars($id); $__pjade_attr['action'][]=htmlspecialchars($action); $__pjade_attr['method'][]=htmlspecialchars($method); ?><?php if( $file ): ?><?php $__pjade_attr['enctype']=array(htmlspecialchars(trim('multipart/form-data'))); ?><?php $__pjade_attr['target']=array(htmlspecialchars(trim(htmlspecialchars( $id ).'_iframe'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>><?php if( $file ): ?> <iframe style="display: none" name="<?php echo htmlspecialchars($id.'_iframe'); ?>" id="<?php echo htmlspecialchars($id.'_iframe'); ?>"></iframe>
64 <?php endif; ?> <div class="tl_close" title="<?php echo htmlspecialchars(___('action.close')); ?>"></div>
65 <div class="tl_title"><?php echo $title; ?></div>
66 <div class="tl_content"><?php echo $content; ?></div>
67 </form>
68 </div>
69 <?php } ?>
70 <?php $pjade_fn["pagination_simple"]=function($pag, $url, $query = 'page')use(&$pjade_fn){ ?>
71 <?php $btns = Controller_Common::prepare_pagination( $pag, $url, $query ) ?><?php if( !($btns) ): ?><?php return; ?><?php endif; ?><div class="site_pagination"><?php foreach( $btns as $b ): ?><?php if( $b['active'] ): ?> <span class="sp_btn sp_active"><?php echo htmlspecialchars($b['text']); ?></span>
72 <?php else: ?> <a <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('sp_btn')); $__pjade_attr['href'][]=htmlspecialchars($b['href']); $__pjade_attr['data-page'][]=htmlspecialchars($b['page']); ?><?php if( $b['cls'] ): ?><?php $__pjade_attr['class'][]=htmlspecialchars($b['cls']); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>><?php if( $b['text'] ): ?><?php echo htmlspecialchars($b['text']); ?><?php endif; ?></a>
73 <?php endif; ?><?php endforeach; ?></div>
74 <?php } ?>
75 <?php $pjade_fn["article_view"]=function($article, $tags, $comment, $user, $edit, $admin)use(&$pjade_fn){ ?>
76 <div class="ca_view_panel"><?php if( Social::is_enabled() && ! $article->junk ): ?><?php $data = array( 'url' => $article->link('http'), 'text' => Social::twi_text( $article->title ) ); ?> <div class="social_auto_like" data-social="<?php echo htmlspecialchars(Client::json_encode( $data )); ?>"></div>
77 <?php endif; ?> <div class="ca_content site_content"><?php echo $article->content_get(); ?></div><?php if( !(empty( $tags )) ): ?> <div class="ca_tags_panel">
78 <div class="cat_desc"><?php echo htmlspecialchars(___('msg.tags')); ?></div><?php foreach( $tags as $tag ): ?><?php $link = Model_Content_Tape::tag_link( $tag ) ?> <a class="cat_tag site_tag_link" href="<?php echo htmlspecialchars($link); ?>"><?php echo htmlspecialchars($tag); ?></a>
79 <?php endforeach; ?></div>
80 <?php endif; ?><?php if( $edit ): ?> <div class="ca_control"><?php echo $pjade_fn["button"](array('class'=>'ca_button','action'=>'edit','title'=>htmlspecialchars(___('action.edit')))); ?>
81 <?php if( $article->id ): ?><?php echo $pjade_fn["button"](array('class'=>'ca_button','action'=>'delete','title'=>htmlspecialchars(___('action.delete')))); ?>
82 <?php endif; ?></div>
83 <?php endif; ?><?php if( !(empty( $comment )) ): ?> <div class="ca_comment">
84 <div class="ca_comment_title">
85 <div class="ca_comment_label"><?php echo htmlspecialchars(___('content.article.msg.comment')); ?></div>
86 </div>
87 <div class="ca_comment_content"><?php echo $comment; ?></div>
88 </div>
89 <?php endif; ?></div>
90 <?php } ?>
91 <?php $pjade_fn["article_edit_panel"]=function($article, $tape_current, $tapes_list, $tags)use(&$pjade_fn){ ?>
92 <?php $lr = 'content.article.'; ?><div class="ca_edit_panel">
93 <div class="cap_field">
94 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.title').':'); ?></div>
95 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'title','value'=>htmlspecialchars($article->title))); ?>
96 </div>
97 </div>
98 <div class="cap_tour">
99 <div class="cap_field site_hidden">
100 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_price').':'); ?></div>
101 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'tour_price','value'=>htmlspecialchars($article->tour_price))); ?>
102 </div>
103 </div>
104 <div class="cap_field site_hidden">
105 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_time').':'); ?></div>
106 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'tour_time','value'=>htmlspecialchars($article->tour_time))); ?>
107 </div>
108 </div>
109 <div class="cap_field site_hidden">
110 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_label').':'); ?></div>
111 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'tour_label','value'=>htmlspecialchars($article->tour_label))); ?>
112 </div>
113 </div>
114 <div class="cap_field">
115 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_slogan').':'); ?></div>
116 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'tour_slogan','value'=>htmlspecialchars($article->tour_slogan))); ?>
117 </div>
118 </div>
119 <div class="cap_field">
120 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_description').':'); ?></div>
121 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'tour_description','value'=>htmlspecialchars($article->tour_description))); ?>
122 </div>
123 </div>
124 <div class="cap_field">
125 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.hor_image')); ?></div>
126 <imageupload params="value: hor_image, uri: 'content_article/upload_hor_image', name: 'hor_image'"></imageupload>
127 </div>
128 <div class="cap_field">
129 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_gallery_id').':'); ?></div>
130 <div class="cap_value">
131 <fetchselect params="value: tour_gallery_id, uri: 'content_article/fetch/gallery', name: 'tour_gallery_id', placeholder: '<?php echo htmlspecialchars( ___($lr.'field.tour_gallery_id_ask') ); ?>'"></fetchselect>
132 </div>
133 </div>
134 <div class="cap_field">
135 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tour_menu_id').':'); ?></div>
136 <div class="cap_value">
137 <fetchselect params="value: tour_menu_id, uri: 'content_article/fetch/menu', name: 'tour_menu_id', placeholder: '<?php echo htmlspecialchars( ___($lr.'field.tour_menu_id_ask') ); ?>'"></fetchselect>
138 </div>
139 </div>
140 </div>
141 <div class="cap_field">
142 <div class="cap_value_wrapper"><?php echo $pjade_fn["check_box"](array('name'=>'junk','value'=>htmlspecialchars($article->junk),'title'=>htmlspecialchars(___($lr.'field.junk')))); ?>
143 </div>
144 </div>
145 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('cap_field')); ?><?php if( !(class_exists('Comment')) ): ?><?php $__pjade_attr['style']=array(htmlspecialchars(trim('display:none;'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="cap_value_wrapper"><?php echo $pjade_fn["check_box"](array('name'=>'comment_enabled','value'=>htmlspecialchars($article->comment_enabled),'title'=>htmlspecialchars(___($lr.'field.comment_enabled')))); ?>
146 </div>
147 </div>
148 <div class="cap_field">
149 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.alias').':'); ?></div>
150 <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'alias','value'=>htmlspecialchars($article->alias))); ?>
151 </div>
152 </div><?php if( $article->loaded() ): ?> <div class="cap_field">
153 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.created').':'); ?></div><?php $value = date( 'd.m.Y H:s', $article->created ) ?> <div class="cap_value"><?php echo $pjade_fn["input"](array('name'=>'created','value'=>htmlspecialchars($value),'title'=>htmlspecialchars(___($lr.'field.created')))); ?>
154 </div>
155 </div>
156 <?php endif; ?> <div class="cap_field">
157 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.tags').':'); ?></div>
158 <ul data-rel="tags" data-tags="<?php echo htmlspecialchars(Client::json_encode( $tags )); ?>"></ul>
159 </div>
160 <div class="cap_field">
161 <div class="cap_value">
162 <select class="cap_multiselect" name="tapes" multiple="multiple"><?php foreach( $tapes_list as $tape ): ?> <option <?php $__pjade_attr = array(); $__pjade_attr['value'][]=htmlspecialchars($tape->id); ?><?php if( in_array( (int)$tape->id, $tape_current, true ) ): ?><?php $__pjade_attr['selected']=array(htmlspecialchars(trim('selected'))); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>><?php echo htmlspecialchars('['.$tape->lang.'] '.$tape->title); ?></option>
163 <?php endforeach; ?></select>
164 </div>
165 </div>
166 <div class="cap_field">
167 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.summary').':'); ?></div>
168 <div class="cap_value">
169 <textarea class="cap_autogrow cap_editor_hidden" name="summary_source"><?php echo $article->summary_source ?: $article->summary; ?></textarea>
170 </div>
171 </div>
172 <div class="cap_field">
173 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.content').':'); ?></div>
174 <div class="cap_value cap_cke">
175 <div class="site_content" data-ck-field="content_source"><?php echo $article->content_source ?: $article->content; ?></div>
176 </div>
177 </div><?php echo $pjade_fn["article_edit_image"]($article); ?>
178 <div class="ca_control"><?php echo $pjade_fn["button"](array('class'=>'ca_button','action'=>'save','title'=>htmlspecialchars(___('action.save')))); ?>
179 <?php echo $pjade_fn["button"](array('class'=>'ca_button','action'=>'cancel','title'=>htmlspecialchars(___('action.cancel')))); ?>
180 <?php echo $pjade_fn["button"](array('class'=>'ca_button','action'=>'preview','title'=>htmlspecialchars(___('action.preview')))); ?>
181 </div>
182 </div>
183 <?php } ?>
184 <?php $pjade_fn["article_edit_image"]=function($article)use(&$pjade_fn){ ?>
185 <div <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('ca_image_block')); $__pjade_attr['class'][]=htmlspecialchars(trim('cap_field')); ?><?php if( !($article->image) ): ?><?php $__pjade_attr['class'][]=htmlspecialchars(trim('cap_empty')); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>> <div class="cap_title"><?php echo htmlspecialchars(___('content.article.field.image').':'); ?></div>
186 <div class="cap_preview">
187 <div class="info_control_panel">
188 <div class="cap_upload icp_control_link" data-action="upload" title="<?php echo htmlspecialchars(___('action.upload')); ?>">
189 <input type="file" name="image"/>
190 </div>
191 <div class="icp_control_link cap_empty_hidden" data-action="delete" title="<?php echo htmlspecialchars(___('action.delete')); ?>"></div>
192 </div>
193 <div class="cap_empty"><?php echo htmlspecialchars(___('content.article.msg.drag')); ?></div><?php if( $article->image ): ?> <img src="<?php echo htmlspecialchars(URL::site( $article->image )); ?>"/>
194 <?php else: ?> <img style="display: none;"/>
195 <?php endif; ?></div>
196 </div>
197 <?php } ?>
198 <?php $pjade_fn["article_edit_preview"]=function($article)use(&$pjade_fn){ ?>
199 <?php $lr = 'content.article.'; ?><div class="ca_preview_panel">
200 <div class="cap_block_title"><?php echo htmlspecialchars(___('content.page_title.preview')); ?></div>
201 <div class="cap_field">
202 <div class="cap_title"><?php echo htmlspecialchars($article->title); ?></div>
203 </div>
204 <div class="cap_field">
205 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.summary').':'); ?></div>
206 <div class="cap_html site_content"><?php echo $article->summary_source ?: $article->summary; ?></div>
207 </div>
208 <div class="cap_field">
209 <div class="cap_title"><?php echo htmlspecialchars(___($lr.'field.content').':'); ?></div>
210 <div class="cap_html site_content"><?php echo $article->content_source ?: $article->content; ?></div>
211 </div>
212 </div>
213 <?php } ?>
214 <?php if( empty( $ajax_mode ) ): ?><?php $root = Kohana::$access->is_root() ?><div id="content_article" class="article_item" data-id="<?php echo htmlspecialchars($id); ?>">
215 <div class="ca_view_anchor ca_edit_invisible"><?php $comment = isSet( $comment ) ? $comment : null ?><?php echo $pjade_fn["article_view"]($article, $tags, $comment, $user, $edit, $admin); ?>
216 <?php if( !(empty( $gallery )) ): ?> <div class="ca_view_gallery">
217 <div class="cavg_title"><?php echo htmlspecialchars(___('site.photogallery')); ?></div>
218 <div class="cavg_list site_scroll_pane site_auto_preview"><?php foreach( $gallery as $i ): ?> <a <?php $__pjade_attr = array(); $__pjade_attr['class'][]=htmlspecialchars(trim('cavg_im')); $__pjade_attr['href'][]=htmlspecialchars($i['image']); $__pjade_attr['target'][]=htmlspecialchars(trim('_blank')); $__pjade_attr['style'][]=htmlspecialchars(trim('background-image: url('.htmlspecialchars( $i['preview'] ).')')); ?><?php if( !(empty( $i['title'] )) ): ?><?php $__pjade_attr['title']=array(htmlspecialchars($i['title'])); ?><?php endif; ?><?php foreach($__pjade_attr as $__k => &$__v){ $__v = implode(' ',array_filter($__v, 'strlen'));if(!strlen($__v)){ unSet( $__pjade_attr[$__k]); continue; } $__v = htmlspecialchars($__k)."=\"".$__v."\"";} $__pjade_attr = array_filter($__pjade_attr, 'strlen'); echo implode( " ", $__pjade_attr ); ?>></a>
219 <?php endforeach; ?></div>
220 </div>
221 <?php endif; ?></div><?php if( $edit ): ?> <form class="ca_edit_anchor ca_view_hidden" action="#" method="POST"></form>
222 <div class="ca_preview_anchor ca_edit_visible"></div>
223 <div class="js_include">
224 <div class="js_name">modules/article</div>
225 <div class="js_callback">window._ArticleEditor = new classes.ArticleEditor( &quot;<?php echo $id ; ?>&quot;,
226 {
227 editor_cfg:
228 {
229 <?php echo $root ? 'root: 1, ' : '' ; ?>
230 admin: <?php echo (int)$admin ; ?>,
231 mode: 'article'
232 },
233 <?php echo $id === 'new' && $tape ? 'tape_id: '.$tape->id.',' : '' ; ?>
234 msg: {
235 ask_del: <?php echo Text::js_msg('form.ask_delete') ; ?>,
236 multiselect: {
237 article_selected: <?php echo Text::js_msg('content.article.controls.tapes_selected') ; ?>,
238 article_none: <?php echo Text::js_msg('content.article.controls.tapes_none') ; ?>
239 }
240 }
241 } );</div>
242 </div>
243 <?php endif; ?></div>
244 <?php else: ?><?php switch( $ajax_mode ): case 'edit_panel': { ?><?php echo $pjade_fn["article_edit_panel"]($article, $tape_current, $tapes, $tags); ?>
245 <?php break; } ?> <?php case 'edit_preview': { ?><?php echo $pjade_fn["article_edit_preview"]($article); ?>
246 <?php break; } ?><?php endswitch; ?><?php endif; ?>
Trace error
0 #0 /data/tour-kz/www/modules/database/classes/kohana/database/query.php(245): Database_MySQLi->query(1, 'CALL parent_id(...', 'Model_Gallery_S...', Array)
1 #1 /data/tour-kz/www/application/classes/tree.php(386): Kohana_Database_Query->execute()
2 #2 /data/tour-kz/www/modules/gallery/classes/model/gallery/section.php(206): Tree::parent_tree_orm(Object(Model_Gallery_Section))
3 #3 /data/tour-kz/www/modules/gallery/classes/purifier/filter/gallery.php(105): Model_Gallery_Section->get_root()
4 #4 [internal function]: Purifier_Filter_Gallery::view(Array)
5 #5 /data/tour-kz/www/modules/gallery/classes/purifier/filter/gallery.php(49): preg_replace_callback('#<em\s([^>]+sit...', Array, '<p style="text-...')
6 #6 /data/tour-kz/www/modules/gallery/classes/controller/gallery.php(270): Purifier_Filter_Gallery::search_galleries('<p style="text-...', Array)
7 #7 [internal function]: Controller_Gallery::replace_galleries('<p style="text-...')
8 #8 /data/tour-kz/www/modules/content/classes/model/content/article.php(648): call_user_func(Array, '<p style="text-...')
9 #9 /data/tour-kz/www/modules/pjade/classes/pjade/core.php(30) : eval()'d code(78): Model_Content_Article->content_get()
10 #10 /data/tour-kz/www/modules/pjade/classes/pjade/core.php(30) : eval()'d code(216): Pjade_Core->{closure}(Object(Model_Content_Article), Array, NULL, Object(Model_Access_User), false, false)
11 #11 /data/tour-kz/www/modules/pjade/classes/pjade/core.php(30): eval()
12 #12 /data/tour-kz/www/modules/pjade/classes/pjade/core.php(75): Pjade_Core->_eval('<?php $pjade_fn...')
13 #13 /data/tour-kz/www/system/classes/kohana/view.php(228): Pjade_Core->render()
14 #14 /data/tour-kz/www/modules/content/classes/controller/content/article.php(136): Kohana_View->__toString()
15 #15 /data/tour-kz/www/modules/content/classes/controller/content/article.php(56): Controller_Content_Article->_view_templates(Object(Model_Content_Article), Object(Model_Access_User), Object(Model_Content_Tape))
16 #16 [internal function]: Controller_Content_Article->action_view()
17 #17 /data/tour-kz/www/application/classes/request/client/internal.php(158): ReflectionMethod->invoke(Object(Controller_Content_Article))
18 #18 /data/tour-kz/www/application/classes/request/client/internal.php(65): Request_Client_Internal->_execute_request(Object(Request))
19 #19 /data/tour-kz/www/application/classes/request/client/internal.php(60): Request_Client_Internal->_execute(Object(Request))
20 #20 /data/tour-kz/www/application/classes/request/client/internal.php(16): Request_Client_Internal->_execute(Object(Request))
21 #21 /data/tour-kz/www/system/classes/kohana/request/client.php(64): Request_Client_Internal->execute_request(Object(Request))
22 #22 /data/tour-kz/www/system/classes/kohana/request.php(1138): Kohana_Request_Client->execute(Object(Request))
23 #23 /data/tour-kz/www/index.php(50): Kohana_Request->execute()
24 #24 {main}