<META NAME="robots" CONTENT="noindex,nofollow">


<?php
    include_once("simple_html_dom.php");    
    $url = 'https://ticker.finology.in/'.$_GET['url'];
    $html = file_get_html($url);
	if(isset($_GET['c']))
		$color = '#'.$_GET['c'];
	else
		$color = "#F16334";
?>
<html>
    <head>
        <title> <?php echo $html->find('h1',1)->plaintext; ?> Protfolio </title>
        <link rel="stylesheet" href="style.css">
		<style>
			body{
				background: <?php echo $color; ?>;
			  }
		</style>
        <script>
            $(window).on("load resize ", function() {
            var scrollWidth = $('.tbl-content').width() - $('.tbl-content table').width();
            $('.tbl-header').css({'padding-right':scrollWidth});
            }).resize();
        </script>
    </head>
    <body>
        <section>
            <h3>
                <?php
                    echo $html->find('h1',0)->plaintext;
                ?>
            </h3>
            <div class="tbl-header">
              <table cellpadding="0" cellspacing="0" border="0">
                <thead>
                  <tr>
					  <th width="25%">STOCK</th>
					  <!--th>DEC 2020</th>
					  <th>SEP 2020</th>
					  <th>DEC 2020</th>
					  <th>MAR 2021</th>
					  <th>JUN 2021</th-->
                      <?php
                        $thead = $html->find('thead',0);
                        $no = 0;
                        foreach($thead->find('th') as $th)
                        {
                            if($no < 2 || $no > 6)
                            {
                                $no = $no + 1;
                                continue;
                            }
							 $no = $no + 1;
							
                    ?>
                        <th><?php echo trim(substr($th->plaintext,0,strlen($th->plaintext)-2));?></th>
                    <?php
                        }
                    ?>
                  </tr>
                </thead>
              </table>
            </div>
            <div class="tbl-content">
              <table cellpadding="0" cellspacing="0" border="0">
                <tbody>
                    <?php
                        $tbody = $html->find('tbody',0);
                        foreach($tbody->find('tr') as $tr)
                        {
                    ?>
                        <tr>
                            <td width="30%">
                                <?php echo $tr->find('td', 1)->plaintext; ?>
                            </td>
                            <td>
                                <?php echo $tr->find('td', 2)->plaintext; ?>
                            </td>
                            <td>
                                <?php echo $tr->find('td', 3)->plaintext; ?>
                            </td>
                            <td>
                                <?php echo $tr->find('td', 4)->plaintext; ?>
                            </td>
                            <td>
                                <?php echo $tr->find('td', 5)->plaintext; ?>
                            </td>
                            <td>
                                <?php echo $tr->find('td', 6)->plaintext; ?>
                            </td>
                        </tr>
                  <?php
                        }
                  ?>
                </tbody>
              </table>
            </div>
          </section>
          
          
          <!-- follow me template -->
          <div class="made-with-love">
            Made with
            <i>♥</i> by
            <a target="_blank">SHAREM