コード例 #1
0
$index = 1;
foreach ($liste as $row) {
    echo '<tr>';
    echo '<td align="center">' . $index . '</td>';
    foreach ($row as $field) {
        if ($field == $row['YETERLILIK_ID']) {
            $yeterlilik_id = $field;
        }
        if ($field == $row['YETERLILIK_ADI']) {
            $fieldValue = FormFactory::toUpperCase($field);
        } else {
            $fieldValue = $field;
        }
        echo '<td style="padding-left:5px; padding-right:3px;">' . $field . '</td>';
    }
    $taslakUrl = generatePDFPathForYeterlilik($yeterlilik_id, $row['SON_TASLAK_PDF']);
    echo '<td><a href="' . $taslakUrl . '" rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
    echo '</tr>';
    $index++;
}
echo '</tbody></table>';
function generatePDFPathForYeterlilik($yeterlilik_id, $taslak_pdf)
{
    $_db =& JFactory::getOracleDBO();
    $componentName = 'com_yeterlilik_taslak_yeni';
    if ($taslak_pdf == "") {
        $sql = "SELECT * FROM m_taslak_yeterlilik WHERE yeterlilik_id = ?";
        $params = array($yeterlilik_id);
        $data = $_db->prep_exec($sql, $params);
        if (count($data) > 0 && $data[0]['SON_TASLAK_PDF'] != '') {
            $taslakUrl = 'index.php?dl=' . $data[0]['SON_TASLAK_PDF'];
コード例 #2
0
function listele($sonuclar, $itemIdStrOrj, $isProtokol, $protokolStr, $isGorus, $gorusStr)
{
    if (empty($sonuclar)) {
        echo '<div class="sonucBulunamadi">Uygun sonuç bulunamadı.</div>';
    } else {
        ?>
		<div class="tableWrapper">
		<table cellspacing="0" class="paginate-10 sortable">
			<tr class="tablo_header">
				<th>#</th>
				<!--<th class="sortable-numeric">Yeterlilik Id</th>-->
				<th class="sortable-text">Seviye</th>
				<th class="sortable-text">Yeterlilik Adı</th>
				<th class="sortable-text">Kuruluş Adı</th>
				<?php 
        if ($isGorus) {
            ?>
				<th class="sortable-text">Görüş Bildir</th>
				
				<th>PDF</th>
				<?php 
        }
        ?>
			</tr>
			
			<?php 
        $user_browser = browser_detection('browser');
        $rowCount = 1;
        $rowClass = "";
        $currentYeterlilikID = '';
        foreach ($sonuclar as $satir) {
            if ($satir['YETERLILIK_ID'] == $currentYeterlilikID) {
                //AYNI YETERLILIK,
                $kurulusAdiText .= FormFactory::toUpperCase($satir['KURULUS_ADI']) . '<br>';
            } else {
                $currentYeterlilikID = $satir['YETERLILIK_ID'];
                $kurulusAdiText .= FormFactory::toUpperCase($satir['KURULUS_ADI']) . '<br>';
                if ($rowCount % 2 == 0) {
                    $rowClass = "even_row";
                } else {
                    $rowClass = "odd_row";
                }
                /*if (strripos($user_browser, 'msie') !== FALSE) {
                			$clickHTML = 'target="_blank" href="index.php?option=com_yeterlilik_taslak&amp;task=indir&amp;id=1&amp;yeterlilik_id='.$satir['YETERLILIK_ID'].'"';
                		} else {
                			$clickHTML = 'onclick="window.open(\'index.php?option=com_yeterlilik_taslak&amp;task=indir&amp;id=1&amp;yeterlilik_id='.$satir['YETERLILIK_ID'].'\',\'\',\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,directories=no,location=no\');"';
                		}*/
                $taslakUrl = generatePDFPathForYeterlilik($satir['YETERLILIK_ID']);
                $clickHTML = ' href="' . $taslakUrl . '"';
                echo '<tr class="' . $rowClass . '">';
                echo '<td>' . $rowCount . '</td>';
                //	echo '<td>'.$satir['YETERLILIK_ID'].'</td>';
                echo '<td>' . $satir['SEVIYE_ADI'] . '</td>';
                echo '<td>' . FormFactory::toUpperCase($satir['YETERLILIK_ADI']) . '</td>';
                echo '<td>' . $kurulusAdiText . '</td>';
                if ($isGorus) {
                    echo '<td><a href="index.php?option=com_yeterlilik_taslak&amp;view=gorus_bildir&amp;yeterlilikId=' . $satir['YETERLILIK_ID'] . '">Görüs Bildir</a></td>';
                }
                if ($isGorus) {
                    echo '<td><a ' . $clickHTML . ' rel="nofollow" ><img alt="PDF" src="' . SITE_URL . '/templates/elegance/images/pdf_button.png" /></a></td>';
                }
                echo '</tr>';
                $kurulusAdiText = '';
                $rowCount++;
            }
        }
        ?>
			
		</table>
		</div>
		<?php 
    }
    ?>
	<br />
	<a href="index.php?option=com_yeterlilik_taslak_ara<?php 
    echo $protokolStr;
    echo $gorusStr;
    echo $itemIdStrOrj;
    ?>
">Geri</a>
	<?php 
}