Merhaba, arkadaşlar memht portal için manşet haber yapmaya çalışıyorum. Portalı bilmeyenler varsa www.memht.gen.tr adresinden bakabilirsiniz. Manşet haberler için araştırdığımda karşıma aşağıdaki link çıktı.
http://forum.iyinet.com/php/93389-manset-haber-sisteminde-bir-hata.html
Linkdeki kodları uyarlamaya çalıştım fakat bir türlü yapamadım. Mysql ve php bilgim yeterli olmuyor. Mysql tablo isimlerini versem kodların içerisine yerleştirebilirmisiniz ? Yardımlarınız için teşekkür ederim.
Tablo isimleri :
Mysql tablo ismi : memht_news
baslik = nome
metin = testo_home
Manşet haber kodu :
http://forum.iyinet.com/php/93389-manset-haber-sisteminde-bir-hata.html
Linkdeki kodları uyarlamaya çalıştım fakat bir türlü yapamadım. Mysql ve php bilgim yeterli olmuyor. Mysql tablo isimlerini versem kodların içerisine yerleştirebilirmisiniz ? Yardımlarınız için teşekkür ederim.
Tablo isimleri :
Mysql tablo ismi : memht_news
baslik = nome
metin = testo_home
Manşet haber kodu :
Kod:
<?php
ini_set('error_reporting', E_ALL^E_NOTICE);
?>
<?
include "ayar.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<title>Yeni Sayfa 1</title>
<script type="text/javascript" src="jquery-1.2.2.pack.js"></script>
<link rel="stylesheet" type="text/css" href="featuredcontentglider.css" />
<script type="text/javascript" src="featuredcontentglider.js">
/***********************************************
* Featured Content Glider script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
</head>
<body>
<table border="1" cellspacing="1" style="border-collapse: collapse" id="table1" width="550">
<tr>
<td style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px">
<img border="0" src="http://forum.iyinet.com/images/imajeler/manset.jpg" width="549" height="25"></td>
</tr>
</table>
<script type="text/javascript">
featuredcontentglider.init({
gliderid: "canadaprovinces", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerid: "p-select", //ID of toggler container
selected: 0, //Default selected content index (0=1st)
persiststate: false, //Remember last content shown within browser session (true/false)?
speed: 500, //Glide animation duration (in milliseconds)
direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
autorotate: true, //Auto rotate contents (true/false)?
autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})
</script>
<div id="canadaprovinces" class="glidecontentwrapper">
<?
$sql_urun = mysql_query("select * from haberler WHERE grup='MANŞET1' ORDER by id DESC LIMIT 0,10");
while($urun = mysql_fetch_array($sql_urun))
$adet = -1;
{
$ozet = substr(nl2br(stripslashes($urun["ozet"])),0,500);
$adet = "<a href=news_detail.php?news_id=" . $urun["id"] . "> ...Devamı </a>";
?>
<div class="glidecontent">
<img src="<? echo $resim = "resimler/haberler/".$urun["id"].".jpg"; ?>" style="float: left; padding: 5px" width="100" />
<? echo "$ozet $adet " ; ?>
</div>
<? }
?>
</div>
<div id="p-select" class="glidecontenttoggler">
<?
$sql_urun = mysql_query("select * from haberler WHERE grup='MANŞET1' ORDER by id DESC LIMIT 0,10");
while($urun = mysql_fetch_array($sql_urun))
{
?>
<a href="#" class="toc"><? echo $urun["id"]; ?></a>
<? } ?>
<a href="#" class="prev">Geri</a>
<a href="#" class="next">İleri</a>
</div>
</body>