Zaloguj | Zarejestruj | FAQ
Anonymous

Adding HTML code to php file (excel file converted to html)

+ Odpowiedz

Posty: 1 Strona 1 z 1


Adding HTML code to php file (excel file converted to html)

przez homerhtml » Pn kwi 10, 2017 2:28 pm

Hi everyone! I recently got access to manage a website and i need to add an excel list. I just know very basic stuff and I am very unsure on how to do it... Any tips on how to do it would be very welcome!

I went to Microsoft excel and saved it as html. It saved 5 files and one of the html sheets has this code like this :

Kod: Zaznacz cały
<html xmlns:v="urn:schemas-microsoft-com:vml"

xmlns:o="urn:schemas-microsoft-com:office:office"

xmlns:x="urn:schemas-microsoft-com:office:excel"

xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta http-equiv=Content-Type content="text/html; charset=windows-1252">

<meta name=ProgId content=Excel.Sheet>

<meta name=Generator content="Microsoft Excel 15">

<link id=Main-File rel=Main-File

href="../Alphabetical%20Member%20list%20HAAR%202017.htm">

<link rel=File-List href=filelist.xml>

<link rel=Stylesheet href=stylesheet.css>

<style>

<!--table

   {mso-displayed-decimal-separator:"\.";

   mso-displayed-thousand-separator:"\,";}

@page

   {margin:.75in .7in .75in .7in;

   mso-header-margin:.3in;

   mso-footer-margin:.3in;}

-->

</style>

<![if !supportTabStrip]><script language="JavaScript">

<!--

function fnUpdateTabs()

{

  if (parent.window.g_iIEVer>=4) {

   if (parent.document.readyState=="complete"

    && parent.frames['frTabs'].document.readyState=="complete")

   parent.fnSetActiveSheet(0);

  else

   window.setTimeout("fnUpdateTabs();",150);

}

}

if (window.name!="frSheet")

window.location.replace("../Alphabetical%20Member%20list%20HAAR%202017.htm");

else

fnUpdateTabs();

//-->

</script>

<![endif]>

</head>

<body link=blue vlink=purple>


<table border=0 cellpadding=0 cellspacing=0 width=1264 style='border-collapse:

collapse;table-layout:fixed;width:949pt'>

<col width=154 style='mso-width-source:userset;mso-width-alt:5632;width:116pt'>


---------------------------------------------------------------------



and the file I need to add this 'code' to is exactly like this :



---------------------------------------------------------------------

Kod: Zaznacz cały
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title>HAAR :: Hellenic Association for Aerosol Research</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="icon" href="favicon.ico"/>

    <link rel="stylesheet" type="text/css" href="haar.css" />

    <script type="text/javascript" src="haar.js"></script>

  <?php   

   $doc = new DOMDocument;

   $doc->preserveWhiteSpace = false;

   $doc->Load('bgs.xml');
   
   $theBGs = $doc->documentElement->childNodes->length - 1;

   $randomBGnum = rand(0,$theBGs);

   $randomBG = $doc->documentElement->childNodes->item($randomBGnum)->getAttribute("name");

   echo "<style type='text/css'><!-- body { background-image:url(images/" . $randomBG . ".jpg);

background-attachment:fixed; background-position:top right; background-repeat:repeat; } --></style>";
   
   if ($_GET["howMany"] == "") $howMany = 5; else $howMany = $_GET["howMany"];

   if ($_GET["l"] == "") $lang = "gr"; else $lang = $_GET["l"];

   ?>   

</head>

<body>

<div id="logo"><img src="images/logo1.png" border="0" alt="HAAR logo"/></div>

<div id="lang"><a href="?l=gr" class="menu">ελ</a> | <a href="?l=en" class="menu">en</a></div>

<div id="menu">   

   <a class="menu" href="index.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo "σχετικά";

else echo "about"; ?></a> |

   <a class="menu" href="news.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"νέα/δραστηριότητες"; else echo "news/activities"; ?></a> |    

   <a class="menu" href="links.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"σύνδεσμοι"; else echo "links"; ?></a> |

   <a class="menu" href="contact.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"επικοινωνία"; else echo "contact"; ?></a> |

   <a class="menu" href="eac.php?l=<?php echo $lang; ?>">_eac_</a> |

   <a class="menuActive" href="#"><?php if ($lang == "gr") echo "Μέλη"; else echo "Members"; ?></a>

</div>

<div id="viewer">
   
   <?php   

   $content = new DOMDocument;

   $content->preserveWhiteSpace = false;

   $content->Load('contact.xml');   

   ?>   

   <div class="title"><?php if ($lang == "gr") echo "Κατάλογος Μελών"; else echo "Members list";

?></div><br/>
Avatar użytkownika

homerhtml

  • Posty: 1
  • Dołączył(a): Pn kwi 10, 2017 2:25 pm


+ Odpowiedz

Strona 1 z 1