Jump to content

strange bihavior!?


bulgaria_mitko

Recommended Posts

go to http://195.234.237.173/ and click some links on the very top right of the site and see what happens, for example the url changed to http://195.234.237.173/page.php?p=about but its not displaying the actual site about.htm can u help me and tell me why is this happening? i will post u the php code for page.php:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php 
if((!empty($p))&&($p!="")){ 
$page=$p.".htm"; 
$add_txt = file("pages/$page"); 
for ($cm=0;$cm<count($add_txt);$cm++){ 
  $add1_txt.=$add_txt[$cm]; 
} 

$rb=strpos($add1_txt,"<title>"); 
$re=strpos($add1_txt,"</title>"); 
$rend=$re-$rb; 
$title_page=substr($add1_txt,$rb,$rend); 
$title_page=str_replace("<title>","",$title_page); 
$page_txt=str_replace("<title>$title_page</title>","",$add1_txt); 
} 
?>

<?php
if ($Submit){
$mbody="Продукт: $product\nДопълнителна информация: $information\nИме: 
$name\nE-mail: $email\nТел. факс: $phone\n";
$mbody.="Заявка\nIP address: ". getenv('REMOTE_ADDR');
$msub="Запитване от сайта на Тесс Партнерс";
$maddheader="From: web@tesspartners\r\nReply-to:[email protected]";
mail("[email protected]", $msub,$mbody,$maddheader);

$ref=getenv("HTTP_REFERER"); 
$ref1="tesspartners.com"; 
//if (strstr($ref, $ref1)) { 
$product = addslashes ($product);
$information = addslashes ($information);
$name = addslashes ($name);
$email = addslashes ($email);
$phone = addslashes ($phone);
$data = date('r');
//проверка дали полето за телефон е само от цифри
if(eregi("^\+*[0-9]+$", $phone) or empty($phone)) {
$db = mysql_pconnect('localhost', 'tessp_slavi', '213240227122');
$ska = mysql_select_db('tessp_webzap');
$query = "insert into web_zap values
     ('NULL', '".$product."', '".$information."', '".$name."', '".$email."', '".$phone."', '".$REMOTE_ADDR."', '".$data."')";
$result = mysql_query($query);
$query1 = "insert into web_zap2 values
     ('NULL', '".$product."', '".$information."', '".$name."', '".$email."', '".$phone."', '".$REMOTE_ADDR."', '".$data."')";
$result = mysql_query($query1);
  }
}
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>TESS Partners - <?php echo $title_page; ?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
  <meta name="keywords" content="software, solutions, internet" />
  <meta name="description" content="Software solutions & maintanence; Софтуерни решения и поддръжка" />
  <meta name="ROBOTS" content="INDEX,FOLLOW" />
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <link rel="stylesheet" type="text/css" href="css/example1.css" />
  <script type="text/javascript" src="js/ie5.js"></script>
  <script type="text/javascript" src="js/DropDownMenuX.js"></script>
  <script type="text/javascript" src="js/validateform.js"></script>
</head>
<body>

<table width="760" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2">
      <table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td rowspan="2" width="269"><img src="images/logo.jpg" width="269" height="79" alt="" /></td>
          <td style="background-image:url('images/bg_topmenu.gif')" align="right">
          <!--Top Menu 1 -->		 
          <?php include ("includes/topmenu2.inc"); ?>
      <!--End Top Menu 1 -->
          </td>
        </tr>
        <tr>
          <td width="491"><img src="images/splash1.jpg" width="491" height="59" alt="" /></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td colspan="2"><img src="images/splash2.jpg" width="760" height="89" alt="" /></td>
  </tr>
  <tr>
    <td colspan="2" style="background-image:url('images/bg_topmenu2.gif')" height="28">
      <!-- start table top menu 2 -->
      <table width="760" cellspacing="0" cellpadding="0">
        <tr>
          <td>
          <!--Top Menu 2 -->
          <?php include ("includes/topmenu1.inc"); ?>
          <!--End Top Menu 2 -->
          </td>
          <td width="1" bgcolor="#6F6F6F"><img src="images/spacer.gif" width="1" height="26" alt="" /></td>
        </tr>
      </table>
      <!-- end table top menu 2 -->
    </td>
  </tr>
<!-- kraj na glavata -->
  <tr>
    <td colspan="2"> </td>
  </tr>
  <tr>
    <td width="494" valign="top" align="center">
      <table width="486" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="text">
            <!-- Content -->
            <?php echo $page_txt; ?>
            <!-- End Content -->
          </td>
        </tr>
<!--
        <tr>
          <td><img src="images/spacer.gif" width="1" height="8" alt="" /></td>
        </tr>
-->
      </table>
    </td>
    <td valign="top" width="266" style="background-image:url('images/bg_news.gif')">
      <!-- start table form -->
      <table width="266" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="12"><img src="images/tb_news_left.gif" width="12" height="26" alt="" /></td>
          <td style="background-image:url('images/tb_news_bg.gif')" class="titleTb">Задайте вашите въпроси</td>
          <td width="12"><img src="images/tb_news_right.gif" width="12" height="26" alt="" /></td>
        </tr>
        <tr>
          <td> </td>
          <td>
            <!-- start form -->
            <?php include ("includes/form.inc"); ?>
            <!-- end form -->
          </td>
          <td> </td>
        </tr>
      </table>
      <!-- end table form -->
    </td>
  </tr>
  <tr>
    <td style="background-image:url('images/bg_bottom.gif')" class="textCR">
      <!-- Bottom -->
      <?php include ("includes/copyright.inc"); ?>
      <!-- End Bottom -->
      </td>
    <td width="266" style="background-image:url('images/bg_news.gif')"> </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#6F6F6F"><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
</table>

   <script type="text/javascript">
    var ddmx = new DropDownMenuX('menu1');
    ddmx.delay.show = 0;
    ddmx.delay.hide = 400;
    ddmx.position.levelX.left = 2;
    ddmx.init();
    </script>
</body>
</html>

 

and pls don't hack the site, i have a backup :) thank you!

Link to comment
https://forums.phpfreaks.com/topic/40861-strange-bihavior/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.