/**
 * Returns the data model based on the primary key given in the GET variable.
 * If the data model is not found, an HTTP exception will be raised.
 * @param integer the ID of the model to be loaded
 */
 public function loadModel($id)
 {
     $model = TPermintaanPerusahaan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
 public function getPermintaan()
 {
     $perusahaan = TPerusahaan::model()->findByAttributes(array('username' => Yii::app()->user->id));
     $model = TPermintaanPerusahaan::model()->findByAttributes(array('id_perusahaan' => $perusahaan->id_perusahaan));
     if ($model !== null) {
         return $model->id_permintaan;
     } else {
         return false;
     }
 }
Example #3
0
<?php

$this->breadcrumbs = array('Tpermintaan Perusahaans' => array('index'), 'Manage');
?>

<h1>Daftar Lowongan Aktif</h1>
<?php 
if (TPerusahaan::isPerusahaan()) {
    $this->widget('booster.widgets.TbButton', array('buttonType' => 'link', 'label' => 'Tambah', 'icon' => 'plus', 'context' => 'primary', 'url' => array('TPermintaanPerusahaan/create')));
    ?>
&nbsp
<?php 
}
if (TPerusahaan::isPerusahaan()) {
    $this->widget('booster.widgets.TbGridView', array('id' => 'tpermintaan-perusahaan-grid', 'type' => 'striped bordered condensed', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id_perusahaan', 'value' => '$data->getNama()', 'type' => 'raw', 'filter' => CHtml::listData(TPermintaanPerusahaan::model()->findAll(), 'id', 'nama')), 'pendidikan', 'usia', 'kompetensi_keahlian', 'gaji', 'informasi')));
    ?>

<?php 
}
?>

<?php 
if (TAnggota::isAnggota()) {
    $this->widget('booster.widgets.TbGridView', array('id' => 'tpermintaan-perusahaan-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id_perusahaan', 'value' => '$data->getNama()', 'type' => 'raw', 'filter' => CHtml::listData(TPermintaanPerusahaan::model()->findAll(), 'id', 'nama')), 'pendidikan', 'usia', 'kompetensi_keahlian', 'gaji', 'informasi', array('type' => 'raw', 'header' => 'Opsi', 'name' => 'informasi', 'value' => 'CHtml::link("Kirim Permintaan",array("tPesan/pesanUser","id_anggota"=>$data->getIdUser(),"id_permintaan" =>$data->id_permintaan ))'))));
    ?>

<?php 
}
Example #4
0
$this->breadcrumbs = array('Tpesans' => array('index'), 'Manage');
?>
<h1>Manage Tpesans</h1>
<?php 
if (TPerusahaan::isPerusahaan()) {
    ?>
<table width="100%" class="table table-condensed table-hover">
<tr>
	<th>No</th>
	<th>Nama</th>
	<th>ID Permintaan</th>
	<th colspan="2" style="text-align: center">konfirmasi</th>
</tr>
<?php 
    $perusahaan = new TPerusahaan();
    foreach (TPermintaanPerusahaan::model()->findAllByAttributes(array('id_perusahaan' => $perusahaan->getIdUser())) as $permintaan) {
        $i = 1;
        foreach (TPesan::model()->findAllByAttributes(array('id_permintaan_perusahaan' => $permintaan->id_permintaan)) as $data) {
            ?>
 <tr>
 	<td><?php 
            echo $i;
            ?>
</td>
 	<td><?php 
            echo CHtml::link($data->getNamaAnggota(), array("tAnggota/view", "id" => $data->id_anggota));
            ?>
</td>
 	<td><?php 
            echo $data->id_permintaan_perusahaan;
            ?>
Example #5
0
<table class="table table-striped table table-none table table-hover">
	<tr>
	
	<th>id perusahaan</th>
	<th>informasi</th>
</tr>

<?php 
$no = 1;
foreach (TPermintaanPerusahaan::model()->findAll() as $data) {
    ?>
<tr>
	
	<td><?php 
    print $data->id_perusahaan;
    ?>
</td>
	<td><?php 
    print $data->informasi;
    ?>
</td>
</tr>
<?php 
    $no++;
}
?>
</table>
Example #6
0
	<table class="table table-bordered table table-striped">
	<tr>
		<th>Perusahaan</th>
		<th>Tanggapan</th>
	</tr>
	<?php 
$pesan = new TPesan();
$i = 1;
foreach (TPesan::model()->findAllByAttributes(array('id_anggota' => $pesan->getIdUser())) as $pesan) {
    foreach (TPermintaanPerusahaan::model()->findAllByAttributes(array('id_permintaan' => $pesan->id_permintaan_perusahaan)) as $permintaan) {
        foreach (TPerusahaan::model()->findAllByAttributes(array('id_perusahaan' => $permintaan->id_perusahaan)) as $perusahaan) {
            if ($i++ == 11) {
                break;
            }
            ?>
	<tr>
		<td> <i class="glyphicon glyphicon-envelope"></i> <?php 
            echo CHtml::link($perusahaan->nm_perusahaan, array('TPesan/view', 'id' => $pesan->id_pesan));
            ?>
 </td>
		<td> <?php 
            echo $pesan->konfirmasi;
            ?>
</td>
	</tr>
	<?php 
        }
    }
}
?>