%PDF- %PDF-
| Direktori : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/ |
| Current File : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/templates.php |
<?php
function getTemplateStyle(){
?>
<style>
.sablon ul {
padding-left:0;
}
.sablon img {
width:100% !important;
height:auto !important;
}
.ozellikler {
margin-top: 10px;
margin-bottom:10px;
text-align: center;
font-size:16px;
}
.sablon-cnt {
border:1px solid #ccc;
}
h3.sablon-name {
text-align:center;
background:#ccc;
color:#fff;
padding:5px;
margin-top:5px;
}
.sablon-ops {
text-align: center;
margin-bottom:5px;
padding-top:5px;
border-top: 1px solid #ccc;
}
</style>
<?php
}
?>
<?php
// Template List
$templateList = array('Şablon-1','Şablon-2');
// Select Type
function getTemplateSelect($templateList,$selected=null){
$tempState = ($selected == null ? null : 'disabled');
$tempL = '<select class="form-control" name="tType" '.$tempState.'>';
foreach ($templateList as $key => $val){
$sel = ($key == $selected ? 'selected' : null);
$tempL .= '<option value="'.$key.'" '.$sel.'>'.$val.'</option>';
}
$tempL .= '</select>';
return $tempL;
}
// Templates
function getTemplate($temp_id,$type){
$tempIns = getAllTables('template_r','WHERE temp_id='.$temp_id.' ORDER BY row ASC');
switch ($type){
case 0 :
$template =
'<div class="container-fluid sablon sablon-'.$type.'">
<ul class="row gallery_folder" id="sortable-'.$temp_id.'">';
$counter = 1;
foreach($tempIns as $item){
if ($counter%3 == 0) {
$template .= '<div class="row">';
}
$template .=
'<li class="col-md-4" id="img_'.$item['id'].'">
<img src="picture.php?id='.$item['pic_id'].'">
<div class="ozellikler">
<div class="urun">'.nl2br($item['text']).'</div>
</div>
<span class="actions" style="display: none;"><i class="fa fa-times-circle" onclick="relDelTemp(this,'.$item['id'].');" style="color:#d00; font-size:15px;"></i></span>
</li>';
if ($counter%3 == 0) {
$template .= '</div>';
}
$counter++;
}
$template .= '</ul></div>';
return $template;
break;
case 1 :
$template =
'<div class="container-fluid sablon sablon-'.$type.'">
<ul class="row gallery_folder" id="sortable-'.$temp_id.'">';
$counter = 0;
foreach($tempIns as $item){
$col = ($counter > 0 ? '4' : '12' );
if ($counter%3 == 0) {
$template .= '<div class="row">';
}
$template .=
'<li class="col-md-'.$col.'">
<img src="picture.php?id='.$item['pic_id'].'">
<div class="ozellikler">
<div class="text">'.$item['text'].'</div>
</div>
</li>';
if ($counter%3 == 0) {
$template .= '</div>';
}
$counter++;
}
$template .= '</ul></div>';
return $template;
break;
}
}
?>