Commit ff612c86 authored by reynaldi adriantama's avatar reynaldi adriantama

session nopeg

parent 03f0a611
......@@ -44,7 +44,7 @@ class DosenController extends \Application\Master\GlobalActionController
$baseurl = sprintf('//%s', $uri->getHost());
$actionName = $this->params('action');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('usernamed') . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('nopeg') . '"');
$this->headScript->appendScript(' var nim;');
// $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
......@@ -207,7 +207,7 @@ class DosenController extends \Application\Master\GlobalActionController
// print_r($userSession->get('usernamed'));die;
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var iduser = null');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('usernamed') . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('nopeg') . '"');
$this->headScript->appendScript(' var nim = "' . $urlvar . '"');
$this->headScript->appendScript(' var PHRASE = "' . self::PHRASE . '"');
$this->headScript->appendScript(' var CODE_SUCCESS = "' . $result::CODE_SUCCESS . '"');
......@@ -235,7 +235,7 @@ class DosenController extends \Application\Master\GlobalActionController
/* ini hanya contoh return dari factory IndexControllerFactory gan, dani tamvan */
$userSession = $this->getSession();
$owner = $userSession->owner();
// print_r($userSession->get('nopeg'));die;
if($owner){
//print_r($result);die;
$view->setVariable('dataa', $sessionArray);
......@@ -246,7 +246,7 @@ class DosenController extends \Application\Master\GlobalActionController
$actionName = $this->params('action');
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('usernamed') . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('nopeg') . '"');
// $this->headScript->appendScript(' var iduser = null');
// $this->headScript->appendScript(' var nim = "' . $urlvar . '"');
$this->headScript->appendScript(' var PHRASE = "' . self::PHRASE . '"');
......@@ -285,7 +285,7 @@ class DosenController extends \Application\Master\GlobalActionController
$actionName = $this->params('action');
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('usernamed') . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('nopeg') . '"');
// $this->headScript->appendScript(' var iduser = null');
// $this->headScript->appendScript(' var nim = "' . $urlvar . '"');
$this->headScript->appendScript(' var PHRASE = "' . self::PHRASE . '"');
......@@ -322,7 +322,7 @@ class DosenController extends \Application\Master\GlobalActionController
$actionName = $this->params('action');
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('usernamed') . '"');
$this->headScript->appendScript(' var nopeg = "' . $userSession->get('nopeg') . '"');
$this->headScript->appendScript(' var nim = "' . $urlvar . '"');
$this->headScript->appendScript(' var identitas = "' . $urlid . '"');
$this->headScript->appendScript(' var PHRASE = "' . self::PHRASE . '"');
......
......@@ -8801,32 +8801,48 @@ class JsondataController extends \Application\Master\GlobalActionController
array_push($allidkp, $idkp);
$dataArr = array(
'nim_mhs' => self::antiInjection($nim ?? null),
'penguji_1' => self::antiInjection($isData->penguji1 ?? null),
'tanggal' => self::antiInjection($isData->tanggal ?? null),
'jam' => self::antiInjection($jam ?? null),
'ruang' => self::antiInjection($isData->ruang ?? null),
'create_date' => $this->STORAGE_NOW(),
);
if($dataAdditional != null){
$dataArr = array(
'nim_mhs' => self::antiInjection($nim ?? null),
'penguji_1' => self::antiInjection($isData->penguji1 ?? null),
'tanggal' => self::antiInjection($isData->tanggal ?? null),
'jam' => self::antiInjection($jam ?? null),
'ruang' => self::antiInjection($isData->ruang ?? null),
'create_date' => $this->STORAGE_NOW(),
'penguji_3' => $dataAdditional[0]->nopeg_peng_add ?? null,
'penguji_4' => $dataAdditional[1]->nopeg_peng_add ?? null,
);
}else{
$dataArr = array(
'nim_mhs' => self::antiInjection($nim ?? null),
'penguji_1' => self::antiInjection($isData->penguji1 ?? null),
'tanggal' => self::antiInjection($isData->tanggal ?? null),
'jam' => self::antiInjection($jam ?? null),
'ruang' => self::antiInjection($isData->ruang ?? null),
'create_date' => $this->STORAGE_NOW(),
'penguji_3' => null,
'penguji_4' => null,
);
}
// print_r($dataArr);die;
$result = $model->saveGlobal($dataArr, 'sipenkp_jadwal', true);
//save additional penguji
if($result->code == $result::CODE_SUCCESS){
// if($result->code == $result::CODE_SUCCESS){
for($x = 0; $x < count($dataAdditional); $x++){
$dataAttrs = array(
'id_jadwal' => $result->data,
'create_date' => $this->STORAGE_NOW(),
'nopeg' => $dataAdditional[$x]->nopeg_peng_add,
);
$resun = $model->saveGlobal($dataAttrs, "sipenkp_penguji", true);
}
}
// for($x = 0; $x < count($dataAdditional); $x++){
// $dataAttrs = array(
// 'id_jadwal' => $result->data,
// 'create_date' => $this->STORAGE_NOW(),
// 'nopeg' => $dataAdditional[$x]->nopeg_peng_add,
// );
// $resun = $model->saveGlobal($dataAttrs, "sipenkp_penguji", true);
// }
// }
if($result->code == $result::CODE_SUCCESS && $resun->code == $result::CODE_SUCCESS){
if($result->code == $result::CODE_SUCCESS){
$dataAttr = array(
'update_date' => $this->STORAGE_NOW(),
'id_jadwal' => $result->data,
......
......@@ -390,11 +390,17 @@ class GlobalActionController extends \Khansia\Mvc\Controller {
$actionName = $this->params('action');
$controllerName = $this->params('controller');
$uri = $this->getRequest()->getUri();
$baseurl = sprintf('//%s', $uri->getHost());
if(($controllerName != 'Application\Controller\ApiController' && $controllerName != 'Application\Controller\JsondataController')){
$this->headScript->appendScript(' var actionControl = "' . $actionName . '"');
}
$userSess = $this->getSession();
$this->headScript->appendScript(' var PHRASE = "' . self::PHRASE . '"');
$this->headScript->appendScript(' var role = "' . $userSess->get('role') . '"');
$this->headScript->appendScript(' var baseglobal = "' . $baseurl . '"');
$this->headScript->appendScript(' var actionControl = "' . $actionName . '"');
$this->headScript->appendFile('/action-js/global-js/sha256.js');
$this->headScript->appendFile('/action-js/global-js/javaScriptGlobalCustom.js');
......
......@@ -1188,6 +1188,54 @@ class Param extends Mapper {
return $filename;
}
public function generatedatabimbingans($data, $tglawal, $tglakhir, $kodeprodi, $urlbase){
$loadkaprodi = $this->loadataKaprodi($kodeprodi);
$datakaprodi = $loadkaprodi->data[0];
$tglreport = $this->dateformatter($tglawal)."-".$this->dateformatter($tglakhir);
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A2', 'No');
$sheet->setCellValue('B2', 'Nim');
$sheet->setCellValue('C2', 'Nama');
$sheet->setCellValue('D2', 'Prodi');
$sheet->setCellValue('E2', 'nopeg_Pembimbing');
$i = 3;
$no = 1;
foreach($data as $row){
$sheet->setCellValue('A'.$i, $no++);
$sheet->setCellValue('B'.$i, $row['nim_mhs']);
$sheet->setCellValue('C'.$i, $row['nama']);
$sheet->setCellValue('D'.$i, $row['dosen_pembimbing']);
$sheet->setCellValue('E'.$i, $row['dosen_pembimbing']);
$i++;
}
$styleArray = [
'borders' => [
'allBorders' => [
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
],
],
];
$i = $i - 1;
$sheet->getStyle('A2:E'.$i)->applyFromArray($styleArray);
$sheet->getColumnDimension('A')->setAutoSize(true);
$sheet->getColumnDimension('B')->setAutoSize(true);
$sheet->getColumnDimension('C')->setAutoSize(true);
$sheet->getColumnDimension('D')->setAutoSize(true);
$sheet->getColumnDimension('E')->setAutoSize(true);
$filename = "Data mahasiswa.xlsx";
$writer = new Xlsx($spreadsheet);
$writer->save('./public/data/reporting/'.$filename);
return $filename;
}
public function loadjadwalperm($idkp){
$data = $this->_storage->loadjadwalperm($idkp);
return $data;
......
......@@ -2075,7 +2075,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
INNER JOIN (SELECT nopeg AS nidp1, nama AS namapenguji1 FROM t_peg_itb) dp2 on j.penguji_1 = nidp1
INNER JOIN (SELECT nopeg AS nidp2, nama AS dosen_pembimbing FROM t_peg_itb) p2 on p.no_peg = p2.nidp2
INNER JOIN t_mahasiswa m on j.nim_mhs = m.nim
WHERE j.id_jadwal != 0 AND kp.status_kp = '121' OR kp.status_kp = '122' ";
WHERE j.id_jadwal != 0 AND (kp.status_kp = '121' OR kp.status_kp = '122') ";
if($peran == 'pembimbing'){
$sql1 .= " AND p2.nidp2 = '$nopeg'";
......@@ -2107,7 +2107,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
INNER JOIN t_mahasiswa m on j.nim_mhs = m.nim
INNER JOIN t_prodi on LEFT(m.nim, 3) = t_prodi.id_prodi
INNER JOIN sipenkp_nilai_mahasiswa snm on kp.id_nilai = snm.id_nilai
WHERE j.id_jadwal != 0 AND kp.status_kp = '121' OR kp.status_kp = '122'
WHERE j.id_jadwal != 0 AND (kp.status_kp = '121' OR kp.status_kp = '122')
";
if($peran == 'pembimbing'){
......
......@@ -303,7 +303,7 @@
</div>
<span style="float: right; color: blue;cursor: pointer; display: none" onclick="addrowpenguji()" id="addrwp">+Tambah penguji</span>
<span style="float: right; color: blue;cursor: pointer;" onclick="addrowpenguji()" id="addrwp">+Tambah penguji</span>
</div>
</div>
......
......@@ -167,6 +167,26 @@
</div>
</div>
<div class="form-group" >
<label class="col-lg-2 control-label text-semibold">Penguji :</label>
<div class="col-lg-10">
<select id="pengujis2" class="select">
</select>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label text-semibold">Penguji :</label>
<div class="col-lg-10">
<select id="pengujis3" class="select">
</select>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label text-semibold">Tanggal :</label>
......
......@@ -38,6 +38,22 @@
<!-- <div class="heading-elements">
<button type="button" class="btn btn-primary heading-btn btn-modal"><span class="icon-envelope"></span> Buat Surat Pengajuan</button>
</div> -->
<div class="heading-elements">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i> <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right">
<li id="data_mah"><a id="data_mah">Download data mahasiswa</a></li>
<!-- <li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">One more separated line</a></li> -->
</ul>
</li>
</ul>
</div>
</div>
<div class="panel-body">
......
......@@ -282,7 +282,7 @@
<li>
<a href="#"><i class="icon-pencil"></i> <span class="wrapsss">Penilaian Kerja Praktik</span></a>
<ul>
<li><a href="<?php echo $this->basePath(); ?>/penilaian/penilaianpenguji">Penilaian Penguji</a></li>
<!-- <li><a href="<?php echo $this->basePath(); ?>/penilaian/penilaianpenguji">Penilaian Penguji</a></li> -->
<li><a href="<?php echo $this->basePath(); ?>/penilaian/penilaianperusahaan">Penilaian Perusahaan</a></li>
<li><a href="<?php echo $this->basePath(); ?>/penilaian/nilaikp">Nilai Kerja Praktik</a></li>
</ul>
......
......@@ -18,17 +18,17 @@
##RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
##
SetEnv ITB_HOST 167.205.57.98
SetEnv ITB_UNAME postgres
SetEnv ITB_PASS postgres
SetEnv ITB_PORT 5432
SetEnv ITB_SCH sipenkp_itb
#SetEnv ITB_HOST 103.126.28.66
#SetEnv ITB_HOST 167.205.57.98
#SetEnv ITB_UNAME postgres
#SetEnv ITB_PASS khansia215758
#SetEnv ITB_PASS postgres
#SetEnv ITB_PORT 5432
#SetEnv ITB_SCH ftmd_itb
#SetEnv ITB_SCH sipenkp_itb
SetEnv ITB_HOST 103.126.28.66
SetEnv ITB_UNAME postgres
SetEnv ITB_PASS khansia215758
SetEnv ITB_PORT 5432
SetEnv ITB_SCH ftmd_itb
RewriteEngine On
......
......@@ -57,6 +57,7 @@ class User extends \Khansia\Generic\Objects\Mapper {
new Map('status'),
new Map('prodi'),
new Map('koordinator'),
new Map('nopeg')
),
parent::CASE_SENSITIVE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment