السبت، 26 سبتمبر 2015

احتاج دعمكم، بخصوص مشكلة في بعض الملفات بعد ترقية الـ PHP

اخواني اهل سوالف ..

قمت بترقية السيرفر الـى PHP 5.4 وموقعي متلائم فقط بالاصدار الاقدم ،،

اواجه فقط مشكله في 4 ملفات تقريباً .. فعلا انا بحاجة مساعدتكم للتعديل عليها كي تتلائم مع اخر اصدار واخباري بالتعديل كي استطيع حلها مستقبلاً الله يجزاكم الف خير

اول ملف هو:

كود PHP:


<?php session_start();
include 
"connect.php";
include 
"config.php";

$a "select * from jokes where id = \"$byt\"";
$b mysql_query($a) or die(mysql_error());
$c mysql_fetch_array($b);

$nextjoke $byt 1;
$prevjoke $byt 1;
if(
$c[valid] == '0') {

echo 
"عفواً, لم يتم الموافقة بعد على هذه المشاركة من قبل إدارة الموقع ,, الرجاء معاودة المحاولة لاحقاً"; }



else {
?>


</head>



<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="321" height="67">
    <a title="تج" href="http://www.BOO.com"><img src="<?=$fullurl?>img/logo.gif" width="330" height="70" border="0"></a></td>
    <td width="459">
<center>
<? include_once ('banner.php');  ?>
 </center></td>
  </tr>
  <tr> 
<td height="24" colspan="2" background="img/menubg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="1" class="navbar">
        <tr> 
          <td width="17%" class="navbar"><center>
              <a href=/ class="menu"><strong>الرئيسية</strong></a></center></td>

          <td width="17%" class="navbar"><center>
              <a href="topview.php" class="menu"><strong><font color="#926130">
                الأكثر قراءة</font></strong></a><font color="#009900">
                </font> 

          <td width="17%" class="navbar"><center>
              <strong><a href="randomb.php" class="menu"><font color="#CC3300">
 مختارة</font></a></strong><font color="#CC3300">
                </font> 

          <td width="17%" class="navbar"><center>
              <strong><a href="top10byt.php" class="menu"><font color="#CC3300">
                الأفضل تقييماً</font></a></strong><font color="#CC3300">
                </font> 

            </center></td>
          <td width="17%" class="navbar"><center>
              <a href="newbyt.php" class="menu"><strong><font color="#009900">
                أبيات جديدة</font></strong></a><font color="#009900">
                </font> 
            </center></td>
          <td width="17%" class="navbar"><center>
              <strong><a href="add_byt.php" class="menu"><font color="#999966">
                </font><font color="#999966">شاركنا</font></a></strong><font color="#999966">
                </font> 
            </center></td>
          <td width="17%" class="navbar"><center>
              <a href="news.php" class="menu"><strong><font color="#6699FF">
                أخبار</font></strong></a><font color="#6699FF">
                </font>  

            </center></td>


        </tr>
      </table></td>
  </tr>
</table>
<br>
<center>
<body style="color: #808080; font-family: Tahoma; font-size: 9pt">
       <? include 'edate.php';?> 

</center>

<br>
<center>

</center>

<br>

<center>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="small"></g:plusone>

<!-- Place this tag after the last plusone tag -->
<script type="text/javascript">
  window.___gcfg = {lang: 'ar'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'http://ift.tt/xnjN8S';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
</center>


<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr> 
    <td width="165" valign="top"> <table width="170" border="0" cellpadding="0" cellspacing="0" bgcolor="F3FFE8">
        <tr> 
          <td><img src="img/greenbar.gif" width="170" height="9"></td>
        </tr>
        <tr> 
          <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
              <tr> 
                <td height="23">
                  <? include 'forms/category_form.php';?>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td><img src="img/greenbar2.gif" width="170" height="9"></td>
        </tr>
      </table>




      <br> </td>
    <td width="555" align="center" valign="top">&nbsp;</div>

<script>

//Popup Window Script
//By JavaScript Kit (http://ift.tt/1bdcq02)
//JavaScript tutorials and over 400+ free scripts

function openpopup(){
var popurl="print.php?byt=<?=$byt?>"
winpops=window.open(popurl,"","width=500,height=500,scrollbars,")
}

</script>
<table width="448" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="448" height="19" background="img/topbar4.gif"><center>
        <strong></strong> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><center>
                <strong><font color=white><? echo ("$c[joketitle]");?></font></strong><span><strong><a href='view.php?byt=<?=$prevjoke?>'></a></strong></span></center></td>
            <td width="99"><center>
                <span> </center></td>
          </tr>
        </table>
      </center></td>
  </tr>

  <tr> 
    <td bgcolor="#FFFFFF" class=dott2><table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr> 
          <td valign="top"></td>
        </tr>
        <tr> 
          <td valign="top"> <? echo  nl2br("$c[thejoke]");?></td>


        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="18" background="img/bottombar.gif">
        
        <center>
        <span><strong>
        
        
        </strong> 



      </center>
        
    </td>
  </tr>
</table>

<br>
<table width="448" border="0" cellpadding="0" cellspacing="0">
        <tr>
          
    <td width="448" height="19" background="img/topbar.gif"><center>
        <strong><font color="#FFFFFF">تفاصيل المشاركة</font></strong> 
      </center></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF" class=dott2><table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr> 
          <td colspan="2" valign="top"></td>
        </tr>
        <tr> 
          <td width="50%" valign="top"> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#003399">
              <tr> 
                <td bgcolor="#F0F0FF"><strong><font color="#0033CC">مشاركة من</font> </strong>: <a href='more.php?by=<? echo "$c[name]";?>'><? echo "$c[name]";?></a><br> 
                  <strong><font color="#0033CC">أضيفت بتاريخ</font></strong> : 
                  <? echo "$c[addedon]";?><br> <strong><font color="#0033CC">التقيم</font></strong> 
                  : <? echo "$c[rate]";?><br> <strong><font color="#0033CC">عدد الزيارات</font></strong> : 
                  <?
if (!$_SESSION["counted"]){ 
    
mysql_query("UPDATE jokes SET viewed=[viewed + 1] WHERE id=$byt"); 
echo 
"$c[viewed] مرة.";

?>
                </td>
              </tr>
            </table></td>
          <td valign="top"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#003399">
              <tr> 
                <td bgcolor="#F0F0FF"><font color="#0033CC"><strong>قيم البيت :</strong></font> 
                  <?

//form is in php because of the variable $song_id which is recieved through urlencode!
echo ("
<form name='Rate_Form' method='post' action='rate.php'>
<select size='1' name='rating'>
<option selected value='5'>5- ممتاز</option>
<option value='4'>4 - جيد جدا</option>
<option value='3'>3- جيد</option>
<option value='2'>2 - لابأس</option>
<option value='1'>1 - ضعيف</option>
</select>
<input type='hidden' name='id' value='$byt'>
<input style='FONT-WEIGHT: bold; CURSOR: hand; COLOR: #000000; BACKGROUND-COLOR: #ffcc00' type='submit' value='قيم'>
</form>
"
);

if(((
$c[rate] >= 0)or($c[rate] == 0)) && ($c[rate] <= 0.50)){
echo 
"<img src='img/rate0.gif'>";
}
if(((
$c[rate] >= 0.50)or($c[rate] == 0.50)) && ($c[rate] <= .99)){
echo 
"<img src='img/rate1.gif'>";
}
if(((
$c[rate] >= 1.00)or($c[rate] == 1.50)) && ($c[rate] <= 1.49)){
echo 
"<img src='img/rate2.gif'>";
}
if(((
$c[rate] >= 1.50)or($c[rate] == 1.50)) && ($c[rate] <= 1.99)){
echo 
"<img src='img/rate3.gif'>";
}
if(((
$c[rate] >= 2.00)or($c[rate] == 2.00)) && ($c[rate] <= 2.49)){
echo 
"<img src='img/rate4.gif'>";
}

if(((
$c[rate] >= 2.50)or($c[rate] == 2.50)) && ($c[rate] <= 2.99)){
echo 
"<img src='img/rate5.gif'>";
}

if(((
$c[rate] >= 3.00)or($c[rate] == 3.00)) && ($c[rate] <= 3.49)){
echo 
"<img src='img/rate6.gif'>";
}

if(((
$c[rate] >= 3.50)or($c[rate] == 3.50)) && ($c[rate] <= 3.99)){
echo 
"<img src='img/rate7.gif'>";
}
if(((
$c[rate] >= 4.00)or($c[rate] == 4.00)) && ($c[rate] <= 4.49)){
echo 
"<img src='img/rate8.gif'>";
}
if(((
$c[rate] >= 4.50)or($c[rate] == 4.50)) && ($c[rate] <= 4.99)){
echo 
"<img src='img/rate9.gif'>";
}
if(
$c[rate] == 5.0){
echo 
"<img src='img/rate10.gif'>";
}
?>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td><div align="right"><img src="img/print.gif" width="14" height="15" align="absmiddle"> 
              &nbsp;<strong><a href="javascript:openpopup()"><font color="#FF0000">طباعة</font></a></strong> </div></td>
          <td>

<div align="left"><strong><a href="send.php?byt=<?=$byt?>"><font color="#FF0000">أرسل لصديق</font></a></strong> <img src="img/email.gif" width="22" height="15" align="absmiddle"></div>



</rtl>


</td>

<br> 


(adsbygoogle = window.adsbygoogle || []).push({});
</script>



        </tr>
      </table>

          </td>
        </tr>
        <tr>


          <td><img src="img/bottombar.gif" width="448" height="18"></td>
        </tr>
      </table>
<?
}
include 
"footer.php";
?>



احتاج دعمكم، بخصوص مشكلة في بعض الملفات بعد ترقية الـ PHP

ليست هناك تعليقات:

إرسال تعليق