Example #1
0
					<td class='first' style="text-align: center; width: 15%;" valign="top">
					<img style="border: 1px solid #7B8080; padding: 0;" height="150"
						width="120" id='thumbPhoto'
						src="<?php 
echo url_for('catalog/getCover?id=' . $catalog->getId() . '&rnd=' . rand(999, 9999999));
?>
">
					</td>
					<td class='first' style="text-align:justify; width: 85%;" valign="top">
					<?php 
if ($catalog->getTitle()) {
    $x = $opac->getCatalog()->getTitle();
} else {
    $cb = new Criteria();
    $cb->add(CatalogEmployeePeer::CATALOG_ID, $catalog->getId());
    $cat_emp = CatalogEmployeePeer::doSelectOne($cb);
    $x = $cat_emp->getEmployee()->getName();
}
?>
                    			<label style="font-size: 26px; font-weight: bold; font-family:'Segoe UI';"><?php 
echo $x;
?>
</label><br />
                    			<i style="padding-left:5px; font-size:11px;"><?php 
echo $catalog->getSubtitle();
?>
 </i>
                    			<br><br><br><br><br><br>
                    			<span style="font-size:10px; color: red; padding-left: 95%;">&nbsp;	</span>
                    			</td>
                		</tr>
Example #2
0
 public function executeDelete()
 {
     $catalog = CatalogPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($catalog);
     $c = new Criteria();
     $c->add(CatalogEmployeePeer::CATALOG_ID, $catalog->getId());
     $ce = CatalogEmployeePeer::doSelectOne($c);
     $cw = new Criteria();
     $cw->add(ColItemPeer::CATALOG_ID, $catalog->getId());
     $ci = ColItemPeer::doSelectOne($cw);
     $ce->delete();
     $ci->delete();
     $catalog->delete();
     return $this->redirect('employee_bank/list');
 }
Example #3
0
                   		 	<th width="15%" style="text-align: center;"><?php 
echo __('Edit');
?>
</th>
                    		<th width="15%" style="text-align: center;"><?php 
echo __('Hapus');
?>
</th>
						</tr>
                    </thead>
                    <tbody>
                    <?php 
$c = new Criteria();
$c->add(CatalogEmployeePeer::EMPLOYEE_ID, $employee->getId());
$cats = CatalogEmployeePeer::doSelect($c);
$count = CatalogEmployeePeer::doCount($c);
?>
					<?php 
if ($count < 1) {
    ?>
						<tr class="list"><td colspan="100"><div class="no_record"><?php 
    echo __('No record found');
    ?>
</div></td></tr>
					<?php 
} else {
    ?>
                    	<?php 
    foreach ($cats as $cat) {
        ?>
                        	<tr class="list<?php 
 public static function retrieveByPK($id, $catalog_id, $employee_id, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria();
     $criteria->add(CatalogEmployeePeer::ID, $id);
     $criteria->add(CatalogEmployeePeer::CATALOG_ID, $catalog_id);
     $criteria->add(CatalogEmployeePeer::EMPLOYEE_ID, $employee_id);
     $v = CatalogEmployeePeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }
Example #5
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = CatalogEmployeePeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCatalogId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setEmployeeId($arr[$keys[2]]);
     }
 }