PHP Classes
elePHPant
Icontem

File: results

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of J  >  Offline SEO Tools  >  results  >  Download  
File: results
Role: Application script
Content type: text/plain
Description: this will format output
Class: Offline SEO Tools
Generate reports about Web pages
Author: By
Last change: change role type
Date: 8 years ago
Size: 8,130 bytes
 

Contents

Class file image Download
<form action="export.php" method="POST">
<?


    $test
= array();
   
$i=1;
    foreach (
$res as $k=>$v)
    {
       
$keywords_2=NULL;
        if(
count($v['keywords_2']) > 0)
        {
            foreach(
$v['keywords_2'] as $key=>$val)
            {
               
$val = str_replace('"','',$val);
               
$keywords_2.=$val.',';
            }
        }
       
       
$urls=NULL;
        if(
count($v['meta_tags']['urls']) > 0)
        {
            foreach(
$v['meta_tags']['urls'] as $key=>$val)
            {
               
$val = str_replace('"','',$val);
               
$val = trim($val);
               
$urls.=$val.',';
            }
        }
       
       
$anchors=NULL;
        if(
count($v['meta_tags']['anchors']))
        {
            foreach(
$v['meta_tags']['anchors'] as $key=>$val)
            {
               
$val = str_replace('"','',$val);
               
$anchors.=$val.',';
            }
        }
       
       
$statucode=NULL;
        if(
count($v['meta_tags']['statucode']))
        {
            foreach(
$v['meta_tags']['statucode'] as $key=>$val)
            {
               
$val = str_replace('"','',$val);
               
$statucode.=$val.',';
            }
        }
   
        echo
'<input type="hidden" name="url['.$i.'][url]" value="'.$k.'">';
        echo
'<input type="hidden" name="url['.$i.'][title]" value="'.$v['meta_tags']['title'].'">';
        echo
'<input type="hidden" name="url['.$i.'][h1]" value="'.$v['meta_tags']['h1'].'">';
        echo
'<input type="hidden" name="url['.$i.'][description]" value="'.$v['meta_tags']['description'].'">';
        echo
'<input type="hidden" name="url['.$i.'][keywords]" value="'.$v['meta_tags']['keywords'].'">';
        echo
'<input type="hidden" name="url['.$i.'][urls]" value="'.trim(rtrim($urls,',')).'">';
        echo
'<input type="hidden" name="url['.$i.'][anchors]" value="'.trim(rtrim($anchors)).'">';
        echo
'<input type="hidden" name="url['.$i.'][statucode]" value="'.trim(rtrim($statucode,',')).'">';
        echo
'<input type="hidden" name="url['.$i.'][text]" value="'.$v['text'].'">';
        echo
'<input type="hidden" name="url['.$i.'][text_length]" value="'.strlen($v['text']).'">';
        echo
'<input type="hidden" name="url['.$i.'][keywords_2]" value="'.$keywords_2.'">';
       
       
$i++;
    }
   


?>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<input type="submit" value="CSV Export" name="export" align="middle">
<br>
<table align="center" width="80%" class="Table_Border" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Title</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
   
    if(
$v['meta_tags']['title'] != '')
    {
       
?>
<tr>
            <td colspan="2" align="center"><strong><?=$k?></strong></td>
        </tr>
        <tr>
            <td colspan="2" align="center"><?=$v['meta_tags']['title']?></td>
        </tr>
        <?
   
}
    else
    {
   
?>
<tr>
            <td colspan="2" align="center"><strong><?=$k?></strong></td>
        </tr>
        <tr>
            <td colspan="2" align="center">No Title Available</td>
        </tr>
    <?
   
}
}
?>
</table>
<br>
<table align="center" width="80%" border="1" class="Table_Border">
<tr>
    <td colspan="2" class="approve" align="center"><strong>H1</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
    if(
$v['meta_tags']['h1'] != '')
    {
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><?=$v['meta_tags']['h1']?></td>
    </tr>
    <?
   
}
    else
    {
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center">No H1 Available</td>
    </tr>
    <?
   
}
}
?>
</table>
<br>
<table align="center" width="80%" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Meta Description</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{

    if(
$v['meta_tags']['description'] != '')
    {
       
$v['meta_tags']['description'] = rtrim($v['meta_tags']['description'],'"');
       
$v['meta_tags']['description'] = ltrim($v['meta_tags']['description'],'"');
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><?=$v['meta_tags']['description']?></td>
    </tr>
    <?
   
}
    else
    {
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center">No Meta Description Available</td>
    </tr>
    <?
   
}
 
}
?>
</table>
<br>
<table align="center" width="80%" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Meta Keywords</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
    if(
$v['meta_tags']['keywords'] != '')
    {
       
$v['meta_tags']['keywords'] = rtrim($v['meta_tags']['keywords'],'"');
       
$v['meta_tags']['keywords'] = ltrim($v['meta_tags']['keywords'],'"');
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><?=$v['meta_tags']['keywords']?></td>
    </tr>
    <?
   
}
    else
    {
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center">No Meta Keywords Available</td>
    </tr>
    <?
   
}
}
?>
</table>
<br>
<table align="center" width="80%" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Page Contetnt</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
    if(
$v['text'] != '')
    {
       
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?><br><?=number_format(strlen($v['text']))?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><?=$v['text']?></td>
    </tr>
    <?
   
}
    else
    {
   
?>
<tr>
        <td colspan="2" align="center"><strong><?=$k?></strong></td>
    </tr>
    <tr>
        <td colspan="2" align="center">No Meta Keywords Available</td>
    </tr>
    <?
   
}

}
?>
</table>
<br>
<table align="center" width="80%" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Possible 2 Words Keywords</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
   
$keywords=NULL;
   
$vals = NULL;
    if(
count($v['keywords_2']) > 0)
    {
        foreach(
$v['keywords_2'] as $key=>$val)
        {
           
$vals.=$val.',';
        }
       
$vals = rtrim($vals,',');
       
$keywords = explode(',',$vals);
       
?>
<tr>
            <td colspan="2" align="center"><strong><?=$k?></strong></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <table border="1">
                <?
                $td_counter
= 0;
                for(
$i = 0;$i < count($keywords);$i++)
                {
                    if(
$td_counter == 0)
                    {
                   
?>
<tr>
                    <?
                   
}
                   
?>
                    <Td width="3%" valign="top" style="padding-top:2px"><?=$keywords[$i]?></Td>
                    <?
                                                                                                       
                        $td_counter
++;
                        if (
$td_counter == 5)
                        {
                           
$td_counter = 0;
                       
?>
</tr>
                       
                        <?
                       
}
                       
?>
<?
               
} // End of For loop
               
?>
<?
               
if($td_counter != 0)
                {
                    echo
"</tr>";
                    echo
"<tr>";
                    echo
"<td height='4'></td>";
                    echo
"</tr>";
                }
               
?>

                </table>
            </td>
        </tr>
        <?
   
}
}
?>
</table>

<br>

<table align="center" width="80%" border="1">
<tr>
    <td colspan="3" class="approve" align="center"><strong>URLs</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
   
?>
<tr>
        <td colspan="3" align="center">
        <strong><?=$k?></strong>
        </td>
    </tr>
    <?
   
for ($i = 0;$i < count($res[$k]['meta_tags']['urls']); $i++)
    {
       
        if(
$v['meta_tags']['urls'][$i] != '')
        {
       
?>
<TR>
            <TD align="left" width="20%"><strong><?=$v['meta_tags']['anchors'][$i]?></strong></TD>
            <td align="left" width="30%"><?=$v['meta_tags']['urls'][$i]?></td>
            <td align="left" width="20%"><?=$v['meta_tags']['statucode'][$i]?></td>
        </TR>
        <?
       
}
           
    }
}

?>
</table>
<br>
<table align="center" width="80%" border="1">
<tr>
    <td colspan="2" class="approve" align="center"><strong>Iframes</strong></td>
</tr>
<?
foreach($res as $k=>$v)
{
   
$j = 1;
    for (
$i = 0;$i < count($v['meta_tags']['iframes']); $i++)
    {
   
?>
<TR>
            <TD align="left" width="20%" colspan="2"><?=$j?></TD>
            <td align="left" width="80%"><?=$v['meta_tags']['iframes'][$i]?></td>
        </TR>
    <?
    $j
++;
    }
}
?>
</table>


</table>
<br>
<input type="submit" value="CSV Export" name="export" align="middle">

</form>

</body>
</html>