%PDF- %PDF-
| Direktori : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/ |
| Current File : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/menu.php |
<?php
@session_start();
@ob_start();
define('PATH','../');
define('LANG',$_SESSION['LANG']);
include '../includes/functions.php';
include '../includes/db.php';
include '../includes/config.php';
$parent = (intval("0".$_GET['parent'])) ? $_GET['parent']:0;
$mtype = (intval("0".$_GET['type'])) ? $_GET['type']:0;
$id = intval("0".$_GET['id']);
if($id) :
$content = getTable('menus',"WHERE id='$id' && status!='2'",LANG);
$parent = $content['parent'];
endif;
?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">Menü Ekle / Düzenle</h4>
</div>
<form class="form-horizontal" role="form" method="post" novalidate="novalidate" action="?s=menus&type=<?php echo $mtype; ?>&parent=<?php echo $parent; ?>">
<div class="modal-body">
<?php if($content) : echo '<input type="hidden" name="id" value="'.$content['id'].'" />'; $parent = $content['parent']; endif; ?>
<div class="form-body">
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-md-8">
<?php
if($parent):
$pr = getTable('menus',"WHERE id='{$parent}'");
echo $pr['name'];
else:
echo 'Ana Dizin';
endif;
?>
<input type="hidden" name="f[parent]" id="parent" value="<?php echo $parent; ?>"/>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Başlık</label>
<div class="col-md-8">
<input type="text" placeholder="İsim giriniz" class="form-control" name="f[name]" id="name" value="<?php echo $content['name']; ?>" data-required="1">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Link</label>
<div class="col-md-8">
<input type="text" placeholder="URL giriniz" class="form-control" name="f[links]" id="links" value="<?php echo $content['links']; ?>" data-required="1">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><span class="help-inline">Yada</span> Köprü Oluştur</label>
<div class="col-md-8">
<select class="form-control" name="link" id="link">
<option value="0">Yok</option>
<optgroup label="Sayfalar">
<option value="main">Anasayfa</option>
<?php
$record = getChilds('pages','pages',0,0);
for ($i=0; $i<count($record); $i++)
{
echo '<option value="'.$record[$i][0].'"';
echo (in_array($record[$i][0],$current)) ? ' selected="selected"':'';
echo '>';
for ($j=0;$j<$record[$i][2];$j++) echo ' |-- ';
echo $record[$i][1];
echo '</option>';
}
unset($record);
?>
</optgroup>
<optgroup label="Ürünler">
<option value="products">Ürünlerimiz</option>
<?php
$record = getChilds('pages','products',0,0);
for ($i=0; $i<count($record); $i++)
{
echo '<option value="'.$record[$i][0].'"';
echo (in_array($record[$i][0],$current)) ? ' selected="selected"':'';
echo '> |-- ';
for ($j=0;$j<$record[$i][2];$j++) echo ' |-- ';
echo $record[$i][1];
echo '</option>';
}
unset($record);
?>
</optgroup>
<optgroup label="Haberler">
<option value="news">Haberlerimiz</option>
<?php
$record = getChilds('pages','news',0,0);
for ($i=0; $i<count($record); $i++)
{
echo '<option value="'.$record[$i][0].'"';
echo (in_array($record[$i][0],$current)) ? ' selected="selected"':'';
echo '> |-- ';
for ($j=0;$j<$record[$i][2];$j++) echo ' |-- ';
echo $record[$i][1];
echo '</option>';
}
unset($record);
?>
</optgroup>
</select>
<span class="help-inline"><input type="checkbox" id="alt" name="children" value="1"> <label for="alt">Alt İçerikleride dahil et</label></span>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Açılır Menü Olsun mu?</label>
<div class="col-md-8">
<select name="f[opened]" class="form-control">
<option value="1" <?php if($content['opened']==1) echo ' selected="selected"'; ?>>Evet</option>
<option value="0" <?php if($content['opened']==0) echo ' selected="selected"'; ?>>Hayır</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Durumu</label>
<div class="col-md-8">
<input type="checkbox" data-off-label="Pasif" data-on-label="Aktif" value="1" class="make-switch" name="f[status]" <?php if($content['status']==1) echo 'checked="checked"';?>>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Sıra</label>
<div class="col-md-8">
<input type="text" class="form-control input-small" name="f[row]" value="<?php echo $content['row']; ?>">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="hidden" name="f[type]" value="<?php echo $mtype; ?>" />
<input type="hidden" name="action" value="save" />
<button type="button" class="btn default" data-dismiss="modal">Kapat</button>
<button type="submit" class="btn blue">Kaydet</button>
</div>
</form>