$index = 1;
foreach ($liste as $row) {
    echo '<tr>';
    echo '<td align="center">' . $index . '</td>';
    foreach ($row as $field) {
        if ($field == $row['STANDART_ID']) {
            $standart_id = $field;
        }
        if ($field == $row['STANDART_ADI']) {
            $fieldValue = FormFactory::toUpperCase($field);
        } else {
            $fieldValue = $field;
        }
        echo '<td style="padding-left:5px; padding-right:3px;">' . $fieldValue . '</td>';
    }
    $taslakUrl = generatePDFPathForStandart($standart_id);
    if (strripos($user_browser, 'msie') !== FALSE) {
        $clickHTML = 'target="_blank" href="' . $taslakUrl . '"';
    } else {
        $clickHTML = 'onclick="window.open(\'' . $taslakUrl . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
    }
    echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
    echo '</tr>';
    $index++;
}
echo '</tbody></table>';
function generatePDFPathForStandart($standart_id)
{
    $_db =& JFactory::getOracleDBO();
    $sql = "SELECT *\n\tFROM m_standart_revizyon\n\tWHERE standart_id = ? AND REVIZYON_DURUMU=14 ORDER BY REVIZYON_NO DESC";
    $params = array($standart_id);
Beispiel #2
0
function listele($sonuclar, $itemIdStrOrj)
{
    $db =& JFactory::getOracleDBO();
    if (empty($sonuclar)) {
        echo '<div class="sonucBulunamadi">Uygun sonuç bulunamadı.</div>';
        echo '<br /><a href="index.php?option=com_meslek_std_ara' . $itemIdStrOrj . '">Geri</a>';
    } else {
        ?>
		<div class="tableWrapper">
		<table cellspacing="0" class="paginate-10 sortable">
			<tr class="tablo_header">
				<th>#</th>
				<!-- <th class="sortable-numeric">Standart Id</th>  standart id ye gerek yok -->
				<th class="sortable-text">Standart Adı</th>
				<th class="sortable-text">Referans Kodu</th>
				<th class="sortable-text">Standardın Sektörü</th>
				<th class="sortable-text">Standardın Seviyesi</th>
				<th class="sortable-text">Hazırlayan Kuruluş(lar)</th>
				<th class="sortable-numeric">Resmi Gazete Yayım Tarihi</th>
				<?php 
        if (isset($sonuclar[0]['PROFIL_GOREV_ADI'])) {
            echo '<th class="sortable-text">İçerdigi Görev</th>';
        }
        ?>
				<th >PDF</th>
			</tr>
			
			<?php 
        $user_browser = browser_detection('browser');
        $rowCount = 1;
        $rowClass = "";
        foreach ($sonuclar as $satir) {
            if ($rowCount % 2 == 0) {
                $rowClass = "even_row";
            } else {
                $rowClass = "odd_row";
            }
            // SON_TASLAK_PDF VARSA ONU İNDİR
            /*		if ( sonTaslakVarMi($satir['STANDART_ID']) ){
            					$taslakUrl = "index.php?option=com_meslek_std_taslak&amp;view=taslak_revizyon&amp;task=indir&amp;id=4&amp;standart_id=".$satir['STANDART_ID'];
            				} else { // YOKSA PDF ÜRET
            					$taslakUrl = "index.php?option=com_meslek_std_taslak&amp;layout=tum_basvuru&amp;format=pdf&amp;form=5&amp;id=".getTaslakStandartEvrakId($db, $satir['STANDART_ID'])."&amp;standart_id=".$satir['STANDART_ID'];
            				}		*/
            $taslakUrl = generatePDFPathForStandart($satir['STANDART_ID']);
            if (strripos($user_browser, 'msie') !== FALSE) {
                $clickHTML = 'target="_blank" href="' . $taslakUrl . '"';
            } else {
                $clickHTML = 'onclick="window.open(\'' . $taslakUrl . '\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
            }
            echo '<tr class="' . $rowClass . '">';
            echo '<td>' . $rowCount . '</td>';
            //echo '<td>'.$satir['STANDART_ID'].'</td>'; standart id ye gerek yok
            echo '<td>' . FormFactory::toUpperCase($satir['STANDART_ADI']) . '</td>';
            echo '<td>' . $satir['STANDART_KODU'] . '</td>';
            echo '<td>' . $satir['SEKTOR_ADI'] . '</td>';
            echo '<td>' . $satir['SEVIYE_ADI'] . '</td>';
            echo '<td align=left>' . FormFactory::toUpperCase($satir['KURULUS_ADI']) . '</td>';
            echo '<td>' . ($satir['RESMI_GAZETE_TARIH'] ? $satir['RESMI_GAZETE_TARIH'] : "&nbsp;") . '</td>';
            if (isset($satir['PROFIL_GOREV_ADI'])) {
                echo '<td>' . $satir['PROFIL_GOREV_ADI'] . '</td>';
            }
            echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
            echo '</tr>';
            $rowCount++;
        }
        ?>
			
		</table>
		</div>
		<a href="index.php?option=com_meslek_std_ara<?php 
        echo $itemIdStrOrj;
        ?>
">Geri</a>
		<?php 
    }
}