%PDF- %PDF-
| Direktori : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/ |
| Current File : /home/cargonizer/domains/cargonizer.com.tr/private_html/admin/user.php |
<?php
if(!defined('BASE')) die();
$id = intval("0".$_GET['id']);
$action = clean($_POST['action']);
switch($action) {
case 'save':
$f = clean($_POST['f']);
if(!$f['status']) $f['status']='0';
$id = clean($_POST['id']);
if($id) :
mquery("UPDATE users SET ".arr2mysql($f,'users')." WHERE id='{$id}'");
echo message('Bilgiler başarı ile güncellenmiştir.','success');
else :
$f['create_time'] = time();
mquery("INSERT INTO users SET ".arr2mysql($f,'users'));
$id = mysql_insert_id();
echo message('Bilgiler başarı ile eklenmiştir.','success');
endif;
break;
}
if($id) :
$content = getTable('users',"WHERE id='$id'");
endif;
?>
<div class="row">
<div class="col-md-12">
<h3 class="page-title">
Üye-Bayi Ekle / Düzenle
</h3>
<ul class="page-breadcrumb breadcrumb">
<li>
<i class="fa fa-home"></i>
<a href="index.php">
Anasayfa
</a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="?s=user">
Yeni Ekle
</a>
<i class="fa fa-angle-right"></i>
</li>
</ul>
</div>
</div>
<div class="portlet box blue">
<div class="portlet-title">Yeni Ekle</div>
<div class="portlet-body form">
<form class="form-horizontal" role="form" method="post" id="validate">
<?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-3 control-label">Kullanıcı Adı</label>
<div class="col-md-9">
<input type="text" placeholder="mail@domain.com" class="form-control" name="f[username]" id="username" value="<?php echo $content['username']; ?>" required>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Şifre</label>
<div class="col-md-9">
<input type="text" class="form-control" name="f[password]" id="password" value="<?php echo $content['password']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">İsim Soyisim</label>
<div class="col-md-9">
<input type="text" class="form-control" name="f[name]" id="name" value="<?php echo $content['name']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Telefon</label>
<div class="col-md-9">
<input type="text" class="form-control" name="f[phone]" id="phone" value="<?php echo $content['phone']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Şehir</label>
<div class="col-md-9">
<select class="form-control" name="f[city]" id="city">
<?php
foreach($City as $key => $ct) {
echo '<option value="'.$key.'"';
echo ($key == $content['city']) ? ' selected="selected"':'';
echo '>'.$ct.'</option>';
}
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Durumu</label>
<div class="col-md-9">
<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>
<div class="form-actions fluid">
<div class="col-md-offset-3 col-md-9">
<button class="btn green" type="submit">Kaydet</button>
<button class="btn default" type="button">İptal</button>
<input type="hidden" name="action" value="save" />
</div>
</div>
</form>
</div>
</div>
<div aria-hidden="true" role="basic" id="ajaxs" class="modal fade">
<div class="modal-dialog modal-full">
<div class="modal-content">
</div>
</div>
</div>