Exemple #1
0
function getuserbyid($id)
{
    if (is_admin()) {
        $CI =& get_instance();
        $query = $CI->db->get_where('user', array('id' => $id), 1);
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $value) {
                $userdata = array('id' => $value->id, 'username' => $value->username, 'jabatan' => returncab($value->kdcapab));
            }
            return $userdata;
        } else {
            return false;
        }
    }
}
Exemple #2
0
     $expl = explode(',', $dell);
     $arruserr = getuser($expl[0]);
     $uname = $arruserr[1];
     $id = $arruserr[0];
     $taabel = returncab($arruserr[2]);
     $idmennu = $expl[1];
     mysql_query("UPDATE " . $taabel . " SET idact='0' WHERE iduser='******' AND idmenu='" . $idmennu . "'");
     redirect(site_url('gudang/page/4?isi=' . $id));
 }
 if (isset($_GET['isi'])) {
     $idu = htmlspecialchars($_GET['isi']);
     $arrdata = getuser($idu);
     $uname = $arrdata[1];
     $id = $arrdata[0];
     $idsr = $arrdata[2];
     $tabell = returncab($idsr);
 }
 if (isset($_POST['savemng'])) {
     $arract = $_POST['act'];
     $idus = $_POST['iu'];
     $idmnu = $_POST['menu'];
     if (!empty($_POST['act'])) {
         if (returnact($idus, $idmnu, $tabell)) {
             $qq = returnact($idus, $idmnu, $tabell);
             $nq = count($qq);
             for ($a = 0; $a < $nq; $a++) {
                 if (isset($arract[$a])) {
                     $qq[$a] = $arract[$a];
                 } else {
                     $qq[$a] = 0;
                 }
Exemple #3
0
    $datareq = getnamaprod($req);
    if (count($datareq) !== 0) {
        foreach ($datareq as $vreq) {
            $namaprod = $vreq['namaprod'];
            $Model = $vreq['Model'];
            $desc = $vreq['desc'];
            $iduser = $vreq['iduser'];
            $idimg = $vreq['idimg'];
            $time = $vreq['time'];
        }
        $infouser = getdetuser($iduser);
        foreach ($infouser as $valuser) {
            $nama = $valuser['nama'];
            $uname = $valuser['username'];
            $uemail = $valuser['email'];
            $jbtn = returncab($valuser['id']);
        }
        $path = geturl_img($idimg);
        $src = substr($path, 21);
        $urlimg = base_url() . $src;
    }
}
?>
				<div class="col-xs-6">
				<div class="panel panel-default">
  					<div class="panel-heading">Data user</div>
  					<div class="panel-body">
    					<p>
    						<strong>Real name   :</strong><?php 
echo !empty($nama) ? $nama : '';
?>
Exemple #4
0
                        }
                        ?>
                                        <?php 
                    } else {
                        ?>
                                            <li><a href="#">Null</a></li>
                                        <?php 
                    }
                    ?>
                                        </ul>
                                        </div>
                                <?php 
                } else {
                    ?>
<button type="button" class="btn btn-sm btn-default"><?php 
                    echo returncab($valdata['kdcapab']);
                    ?>
</button>
<a href="<?php 
                    echo current_url() . '?r=' . $valdata[$fkolm];
                    ?>
" class="btn btn-sm btn-default">edit</a>
                                <?php 
                }
                ?>
                                        
                                        </div>
                                </th>
                        <?php 
                break;
            case 'quotation':