<?php
require_once('php/config.php');

if(isset($_GET['q']) && !empty($_GET['q'])){
  $q = trim($_GET['q']);
}
else{
  $q = false;
}

?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>SEO MONSTER 2 - Admin panel</title>
    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Raleway:400,600' rel='stylesheet' type='text/css'>
    <link href='css/skins/<?php print $skin; ?>' rel='stylesheet' type='text/css'>
    <link href='css/custom.css' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/elusive-webfont.css">
    <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
        <style>
      body {
        padding-top: 80px; /* Only include this for the fixed top bar */
      }
    </style>
    <link href="css/bootstrap-responsive.css" rel="stylesheet">
    <script src="js/jQuery.js" type="text/javascript"></script>

    <?php 
    if($q == 'p'){
      if(isset($_GET['e'])){
        print '<script type="text/javascript">var edm = true;</script>';
      }
      else{
        print '<script type="text/javascript">var edm = false;</script>';
      }
    }
    else{
      print '<script type="text/javascript">var edm = false;</script>';
    }
    ?>
    <script src="js/corgi.js" type="text/javascript"></script>
    <script src="js/functions.js" type="text/javascript"></script>
    <script src="js/loader.js" type="text/javascript"></script>
    <!-- elusive icons ie7 support -->
    <!--[if lte IE 7]><script src="js/lte-ie7.js"></script><![endif]-->

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
    <![endif]-->



  </head>
  <body>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="admin.php"><?php print $name ?></a>
          <div class="nav-collapse collapse">
            <ul class="nav pull-left ">
            <?php

              if(isset($_SESSION['admin'])){
                $active = 'class="active"';

                 print '
                 <li  '. ($q == "s" ? $active :  '') .'><a href="?q=s"><i class="icon-wrench-alt icon-white nostyle"></i> Site Settings</a></li>
                 <li '. ($q == "p" ? $active :  '') .'><a href="?q=p"><i class="icon-group-alt icon-white nostyle"></i> SEO Profiles</a></li>
                 <li '. ($q == "a" ? $active :  '') .'><a href="?q=a"><i class="icon-graph-alt icon-white nostyle"></i> Ads & Analytics</a></li>
                 <li '. ($q == "st" ? $active :  '') .'><a href="?q=st"><i class="icon-envelope-alt icon-white nostyle"></i> Statistics</a></li>
                 ';
              }

            ?>
            </ul>
            <ul class="nav pull-right">
              <?php

              if(isset($_SESSION['admin'])){
                print '
                <li class="classicpointer indicator"><a>Logged in as: admin</a></li>
                <li class="classicpointer indicator"><a class="classicpointer"> | </a></li>
                <li class="log-out"><a href="?q=e"><i class="icon-share-alt icon-white nostyle classicpointer"></i> Log Out</a></li>
                ';
              }
              else{
                print ' <li class="classicpointer indicator"><a><i>'.$slogan.'</i></a></li>';
              }
              ?>

            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">
    

    <div class="row">

      <div class="span12">
      

      <?php


      if(isset($_SESSION['admin'])){
       #
       # User logged in
       #

        if($q != false){
          if($q == 's'){

            if(isset($_GET['d']) && !empty($_GET['d']) && ($_GET['d'] == 's' || $_GET['d'] == 'l' || $_GET['d'] == 'f')){
              $defaulttab = $_GET['d'];
            } 
            else{
              $defaulttab = false;
            }


            #
            # Site Settings
            #

            print '<div class="page-header">
              <h2 id="tables">Site Settings:</h2>
            </div>';


            //// <span class="bluerboy"> <a href="#" rel="tabs1"><i class="icon-graph nostyle notsobigicon"></i> SEO Settings</a> | <a href="#" rel="tabs2"><i class="icon-laptop nostyle notsobigicon"></i> Layout Settings</a> | <a href="#" rel="tabs3"><i class="icon-cogs nostyle notsobigicon"></i> Framework Settings</a></span> 

            print '<center>';

            if($defaulttab == false){
              print '<div id="buttons">
              <ul class="tabs">
               <button href="#" class="defaulttab" rel="tabs1">SEO Settings</button>
                <button href="#"  rel="tabs2">Layout Settings</button>
                <button href="#" rel="tabs3">Framework Settings</button>
              </div>';
            }
            else{
              $class = 'class="defaulttab"';
              print '<div id="buttons">
              <ul class="tabs">
               <button href="#" '. ($defaulttab == 's' ? $class :  '') .' rel="tabs1">SEO Settings</button>
                <button href="#" '. ($defaulttab == 'l' ? $class :  '') .'  rel="tabs2">Layout Settings</button>
                <button href="#" '. ($defaulttab == 'f' ? $class :  '') .' rel="tabs3">Framework Settings</button>
              </div>';
            }
           

            print '</center>';

            #
            # SEO Settings
            #

            //Processing area

            print '<div class="tab-content" id="tabs1">';

            $lang    = $objIni->getValue("lang");

            if(isset($_POST['check'])){
              if(!empty($_POST['name']) && !empty($_POST['slogan']) && !empty($_POST['meta_desc']) && !empty($_POST['desc'])){

               

                

                $objIni->setValue('name', trim('"'. $_POST['name']) . '"' );
                $objIni->setValue('slogan', trim('"'.$_POST['slogan']). '"');
                $objIni->setValue('meta_desc', trim('"'.$_POST['meta_desc']). '"');
                $objIni->setValue('main_text', trim('"'.$_POST['desc']). '"');
                $objIni->setValue('ad_code', trim('"'. $ad) . '"' );
                $objIni->setValue('analytics_code', trim("'".$analytics). "'");
                $objIni->setValue('skin', trim($skin));
                $objIni->setValue('lang', trim($lang));
                $objIni->setValue('fb_link', trim('"'.$fb_link. '"'));
                $objIni->setValue('incl_fb', trim($incl_fb));
                $objIni->setValue('is_pb', $is_pb);
                $objIni->setValue('incl_sp', $incl_sp);
                $objIni->setValue('incl_kw', $incl_kw);
                $objIni->setValue('incl_pdf', trim($incl_pdf));
                $objIni->setValue('defpro', '"'. $pfile. '"');
                $objIni->saveFile();
                print '<div class="col-lg-12">
                <div class="alert alert-dismissable alert-success">
                <strong>Success:</strong> Settings has been saved.
                </div>
                </div>';

              }
              else{
                print '<div class="col-lg-12">
                <div class="alert alert-dismissable alert-danger">
                <strong>Error:</strong> Please fill all the required fields.
                </div>
                </div>';
              }
            }

            //End of processing area

            $name      = str_replace('"','',$objIni->getValue("name"));
            $slogan    = str_replace('"','',$objIni->getValue("slogan"));
            $meta_desc = str_replace('"','',$objIni->getValue("meta_desc"));
            $main_text = str_replace('"','',$objIni->getValue("main_text"));


            print '<h3 class="catind">
            <i class="icon-graph nostyle notsobigicon"></i> SEO Settings
            </h3>';

            print '<form action="?q=s&d=s" method="post" >
            <input type="hidden" name="check" />

            <label for="name">Site name</label>
            <input name="name" type="text" class="form-control" id="name" value="'.$name.'">

            <label for="slogan">Site slogan</label>
            <input name="slogan" type="text" class="form-control" id="slogan" value="'.$slogan.'">

            <label for="meta_desc">Site meta description</label>
            <textarea name="meta_desc" id="meta_desc" class="bigarea">'.$meta_desc.'</textarea>

            <label for="desc">Main page text</label>
            <textarea name="desc" id="desc" class="bigarea">'.$main_text.'</textarea>

            <p><input type="submit" class="btn btn-primary" value="Save Settings"></p>


            </form>
            </div>
            ';

            #
            # Layout Settings
            #

            print '<div class="tab-content" id="tabs2">';

            print '<h3 class="catind">
            <i class="icon-laptop nostyle notsobigicon"></i> Layout Settings
            </h3>';

            //processing

            #Favicon uploading
        
              if(isset($_POST['upload_favicon'])){

                if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) {
                $filename = basename($_FILES['uploaded_file']['name']);
                        $ext = substr($filename, strrpos($filename, '.') + 1);
                        if (($ext == "ico") && ($_FILES["uploaded_file"]["type"] == "image/x-icon") && 
                          ($_FILES["uploaded_file"]["size"] < 35000)) {
                            $newname = 'img/favicon.ico';
                            if (!file_exists($newname)) {
                              if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
                                print '
                                  <div class="col-lg-12">
                                    <div class="alert alert-dismissable alert-success">
                                       
                                       <strong>Success:</strong> Favicon has been uploaded and setted.
                                     </div>
                                   </div>
                                ';
                              } else {
                                print '
                                 <div class="col-lg-12">
                                  <div class="alert alert-dismissable alert-danger">
                                    
                                    <strong>Error:</strong> A problem occurred during file upload. Check file permissions.
                                  </div>
                                 </div>
                                 ';

                              }
                            } else {
                              unlink('img/favicon.ico');
                              if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
                                  print '
                                  <div class="col-lg-12">
                                    <div class="alert alert-dismissable alert-success">
                                       
                                       <strong>Success:</strong> Favicon has been uploaded and setted.
                                     </div>
                                   </div>
                                ';
                              } else {
                                 print '
                                 <div class="col-lg-12">
                                  <div class="alert alert-dismissable alert-danger">
                                    
                                    <strong>Error:</strong> A problem occurred during file upload. Check file permissions.
                                  </div>
                                 </div>
                                 ';
                              }
                            }
                        } else {
                           print '
                                 <div class="col-lg-12">
                                  <div class="alert alert-dismissable alert-danger">
                                    
                                    <strong>Error:</strong> Only .ico images under '.(35000 / 1000).'Kb are accepted for upload.
                                  </div>
                                 </div>
                                 ';
                        }
                      } else {
                            print '
                                 <div class="col-lg-12">
                                  <div class="alert alert-dismissable alert-danger">
                                    <strong>Error:</strong> Please select a file before you try to upload.
                                  </div>
                                 </div>
                                 ';
                      }
              }

            #End of Favicon uploading

            if(isset($_POST['check_l'])){
              if(!empty($_POST['skin']) && !empty($_POST['lang']) ){

                $objIni->setValue('name', trim('"'. $name) . '"' );
                $objIni->setValue('slogan', trim('"'.$slogan). '"');
                $objIni->setValue('meta_desc', trim('"'.$meta_desc). '"');
                $objIni->setValue('main_text', trim('"'.$main_text). '"');
                $objIni->setValue('ad_code', trim('"'. $ad) . '"' );
                $objIni->setValue('analytics_code', trim("'".$analytics). "'");
                $objIni->setValue('skin', trim($_POST['skin']));
                $objIni->setValue('lang', trim($_POST['lang']));
                $objIni->setValue('fb_link', trim('"'.$_POST['fb_link']. '"'));
                $objIni->setValue('incl_fb', trim($_POST['incl_fb']));
                $objIni->setValue('is_pb', $is_pb);
                $objIni->setValue('incl_sp', $incl_sp);
                $objIni->setValue('incl_kw', $incl_kw);
                $objIni->setValue('incl_pdf', trim($incl_pdf));
                $objIni->setValue('defpro', '"'. $pfile. '"');
                $objIni->saveFile();
                print '
                  <div class="col-lg-12">
                    <div class="alert alert-dismissable alert-success">
                       <strong>Success:</strong> Settings has been saved.
                     </div>
                   </div>
                ';

              }
              else{
              print '
               <div class="col-lg-12">
                <div class="alert alert-dismissable alert-danger">
                  <strong>Error:</strong> Please fill all the required boxes.
                </div>
               </div>
               ';
              }
            }


            // End of processing

            $skin    = $objIni->getValue("skin");
            $lang    = $objIni->getValue("lang");
            $incl_fb = $objIni->getValue("incl_fb");
            $fb_link = $objIni->getValue("fb_link");

            print '<label>Favicon:</label>
            <form enctype="multipart/form-data" action="?q=s&d=l" method="post" >
            <input type="hidden" name="upload_favicon" />
            <input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
            <input name="uploaded_file" type="file" />
            <input type="submit" value="Upload & Set FavIcon"/>
            </form>
            ';


            $styles = '<select name="skin" id="skin">';
            $skins = scandir('css/skins');
            unset($skins[0]);
            $skins[1] = $skin;
            $skins = array_unique($skins);
            foreach($skins as $skiner){

                    $styles = $styles .  '<option>'.$skiner.'</option>';
                  
            }

            $styles = $styles  . '</select><br />';



            $languages = '<select name="lang" id="lang">';

            $lngfiles = scandir('langs');
            unset($lngfiles[0]);
            $lngfiles[1] = $lang;
            $lngfiles = array_unique($lngfiles);
            foreach($lngfiles as $file){

                    $languages = $languages .  '<option>'.$file.'</option>';
                  
            }

            $languages = $languages  . '</select>';

            $sel = 'selected';

            print '<form action="?q=s&d=l" method="post">
            <input type="hidden" name="check_l" />

             <label for="skin">Bootstrap skin</label>

            '.$styles.' (Upload it first into the <i>"css/skins" folder</i>. Also take a look  over <i>"css/custom.css"</i>)

            <label for="lang">Language File</label>

            '.$languages.' <br />(Upload it first into the <i>"langs" folder</i>)


            <label for="sp">Include Facebook likebox</label>

            <select name="incl_fb" id="incl_fb">
            <option value="1" '. ($incl_fb == "1" ? $sel :  '') .'>Yes</option>
            <option value="0" '. ($incl_fb == "0" ? $sel :  '') .'>No</option>
            </select>

            <label for="fb_link">Facebook Page</label>
            <input name="fb_link" type="text" class="form-control" id="fb_link" value="'.str_replace('"', '', $fb_link).'" style="width=400px;">

            <br />
            <br />

            <input type="submit" class="btn btn-primary" value="Save Settings">

            </form>';


            print '</div>';

            #
            # Framework settings
            #

            print '<div class="tab-content" id="tabs3">';

            print '<h3 class="catind">
            <i class="icon-cogs nostyle notsobigicon"></i> Framework Settings
            </h3>';

            //processing area

            if(isset($_POST['check_f'])){

                $objIni->setValue('name', trim('"'. $name) . '"' );
                $objIni->setValue('slogan', trim('"'.$slogan). '"');
                $objIni->setValue('meta_desc', trim('"'.$meta_desc). '"');
                $objIni->setValue('main_text', trim('"'.$main_text). '"');
                $objIni->setValue('ad_code', trim('"'. $ad) . '"' );
                $objIni->setValue('analytics_code', trim("'".$analytics). "'");
                $objIni->setValue('skin', trim($skin));
                $objIni->setValue('lang', trim($lang));
                $objIni->setValue('fb_link', trim('"'.$fb_link. '"'));
                $objIni->setValue('incl_fb', trim($incl_fb));
                $objIni->setValue('is_pb', $_POST['pb']);
                $objIni->setValue('incl_sp', $_POST['sp']);
                $objIni->setValue('incl_kw', $_POST['kw']);
                $objIni->setValue('incl_pdf', $_POST['pdf']);
                $objIni->setValue('defpro', '"'. $_POST['pfile']. '"');
                $objIni->saveFile();


                print '
                  <div class="col-lg-12">
                    <div class="alert alert-dismissable alert-success">
                       <strong>Success:</strong> Settings has been saved.
                     </div>
                   </div>
                ';

            } 

            //end of processing area

            $is_pb     = trim($objIni->getValue("is_pb"));
            $incl_kw   = trim($objIni->getValue("incl_kw"));
            $incl_sp   = trim($objIni->getValue("incl_sp"));
            $incl_pdf  = trim($objIni->getValue("incl_pdf"));
            $pfile      = $objIni->getValue("defpro");


            $files = scandir('data/profiles');
            unset($files[0],$files[1]);

            $pfiles = '<select name="pfile" id="pfile">';
            foreach($files as $file){
               $seoProfiles = new IniParser('data/profiles/' . $file);
                $iname    = $seoProfiles->getValue("g_name");
                $ifiles[$file] = $iname;
                $pfiles = $pfiles .  '<option value="'.$file.'"  '. ($file == $pfile ? $sel :  '') .'>'.$iname.'</option>';
            }
            $pfiles .= '</select>';


            //var_dump($is_pb,$incl_kw,$incl_sp);

            $sel = 'selected';

            print '<form action="?q=s&d=f" method="post">
            <input type="hidden" name="check_f" />

            <label for="pfile">Default profile</label>

            '.$pfiles;

            //var_dump('data/profiles/'. $pfile);
            if(!file_exists('data/profiles/'. str_replace('"','',$pfile))){
              print '<span style="color:#dd4814">File not present. Please select another!</span>';
            }

            print '<br />

            <label for="public">Public</label>

            <select name="pb" id="public">
            <option value="1" '. ($is_pb == "1" ? $sel :  '') .'>Yes</option>
            <option value="0" '. ($is_pb == "0" ? $sel :  '') .'>No</option>
            </select>


            <label for="kw">Include Keywords</label>

            <select name="kw" id="kw">
            <option value="1" '. ($incl_kw == "1" ? $sel :  '') .'>Yes</option>
            <option value="0" '. ($incl_kw == "0" ? $sel :  '') .'>No</option>
            </select>

            <label for="sp">Include SEO Profiles</label>

            <select name="sp" id="sp">
            <option value="1" '. ($incl_sp == "1" ? $sel :  '') .'>Yes</option>
            <option value="0" '. ($incl_sp == "0" ? $sel :  '') .'>No</option>
            </select>

            <label for="pdf">Allow PDF Exportation</label>

            <select name="pdf" id="pdf">
            <option value="1" '. ($incl_pdf == "1" ? $sel :  '') .'>Yes</option>
            <option value="0" '. ($incl_pdf == "0" ? $sel :  '') .'>No</option>
            </select>

            <br />
            <br />

            <input type="submit" class="btn btn-primary" value="Save Settings">

            </form>';

            print '</div>';

            #
            # End of Site Settings
            #

          }
          elseif($q == 'p'){


            if(isset($_GET['c'])){

              print '
              <div class="page-header">
              <h2 id="tables">SEO Profiles Manager</h2>
              <a class="btn btn-warning" onclick="saveprofile();" id="zabtn">Add the profile</a>
              </div>';


              print '
                     <center>
                      <h3 class="nomargin bluerboy"><img src="img/timer.png">Loading Time: <span id="ldtime">100</span>%</h3>
                    </center>
                    
                     <div class="progress progress-danger progress-striped">
                         <div class="bar" style="width:100%"></div>
                     </div>  ';


              print '
              <div id="main_msgbox">
              </div>

              ';

              //the form

              //the buttons

              print '
              


              <center>
              <div id="buttons">
              <ul class="tabs">
                <button href="#" id="btn_1" rel="tabs1" class="defaulttab">General</button>
                <button href="#" id="btn_2" rel="tabs2">Crawling</button>
                <button href="#" id="btn_3" rel="tabs3">Head elements</button>
                <button href="#" id="btn_4" rel="tabs4">Content</button>
                <button href="#" id="btn_5" rel="tabs5">URL Structure</button>
                <button href="#" id="btn_6" rel="tabs6">Links</button>
                <button href="#" id="btn_7" rel="tabs7">User Experience</button>
              </div>
              </center>';

              print '<form action="?q=p&c=a" method="post" class="form-horizontal">
              <input type="hidden" name="check" />
              
              <!-- GENERAL -->

              <div class="tab-content" id="tabs1">

              <div id="eb_general"></div>

              <h3 class="catind redboy"><i class="icon-info-sign nostyle"></i> General</h3>
              <label for="info_name">Profile name:</label>
              <input type="text" id="info_name" name="info_name">

              <label for="info_descr">Profile Description:</label>
              <textarea id="info_descr" name="info_descr" placeholder="A short description about this SEO profile."></textarea>
             
              <label for="nfo_ip">Is public</label>
              <select name="info_ip" id="info_ip">
              <option value="1" selected>Yes</option>
              <option value="0">No</option>
              </select>

              </div>

              <!-- CRAWLING -->

              <div class="tab-content" id="tabs2">

              <div id="eb_crawling"></div>

              <h3 class="catind redboy"><i class="icon-file nostyle"></i> Crawling Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_http" checked="true" onclick="ub1();"> HTTP Status Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_robots" checked="true" onclick="ub2();"> Robots.txt Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_sitemap" checked="true" onclick="ub3();"> Sitemap Check
              </span> 

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="crawling_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>


              </div>
              
              <!-- HEAD ELEMENTS -->


              <div class="tab-content" id="tabs3">

                <div id="eb_head"></div>

             <h3 class="catind redboy"><i class="icon-website nostyle"></i> Head elements Check</h3>

            <h5 class="blueboy">Title Tag Checks</h5>

             <!-- Title tag -->



              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_show" onclick="ub4();"  checked="true"> Display title tag
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_lenght" onclick="ub5();" checked="true"> Title lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-title-lenght-1_g" onclick="colorpick(\'head-title-lenght-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-lenght-1_o" onclick="colorpick(\'head-title-lenght-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-lenght-1_r" onclick="colorpick(\'head-title-lenght-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-2-b" onkeypress="validate(event)"/>  
                <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-2-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-title-lenght-2_g" onclick="colorpick(\'head-title-lenght-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-lenght-2_o" onclick="colorpick(\'head-title-lenght-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-lenght-2_r" onclick="colorpick(\'head-title-lenght-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-3-b" onkeypress="validate(event)"/> 
                <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-3-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-title-lenght-3_g" onclick="colorpick(\'head-title-lenght-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-lenght-3_o" onclick="colorpick(\'head-title-lenght-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-lenght-3_r" onclick="colorpick(\'head-title-lenght-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-4-b" onkeypress="validate(event)"/>
                 Color:  
                </span>  
               
                <span id="head-title-lenght-4_g" onclick="colorpick(\'head-title-lenght-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-lenght-4_o" onclick="colorpick(\'head-title-lenght-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-lenght-4_r" onclick="colorpick(\'head-title-lenght-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_stop_words" onclick="ub6();" checked="true"> Stop Words Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_kw_in_title" onclick="ub7();" checked="true"> Keywords in title Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_relevance" onclick="ub8();" checked="true"> Relevance with Keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_title_relevance-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-title-relevance-1_g" onclick="colorpick(\'head-title-relevance-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-relevance-1_o" onclick="colorpick(\'head-title-relevance-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-relevance-1_r" onclick="colorpick(\'head-title-relevance-1_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_relevance-2-b" onkeypress="validate(event)"/> 
                <input type="text" class="smallbox" placeholder="<" id="head_title_relevance-2-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-title-relevance-2_g" onclick="colorpick(\'head-title-relevance-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-relevance-2_o" onclick="colorpick(\'head-title-relevance-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-relevance-2_r" onclick="colorpick(\'head-title-relevance-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_relevance-3-b" onkeypress="validate(event)"/>
                Color:  
                </span>  
               
                <span id="head-title-relevance-3_g" onclick="colorpick(\'head-title-relevance-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-title-relevance-3_o" onclick="colorpick(\'head-title-relevance-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-title-relevance-3_r" onclick="colorpick(\'head-title-relevance-3_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_title_label_content" ></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>


              <br /><br /><hr>  



              <!-- Meta keywords -->

              <h5 class="blueboy">Meta Keywords Checks</h5>


              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_show" onclick="ub9();" checked="true"> Display the keywords
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_count" onclick="ub10();" checked="true"> Keywords Count Check <i>(Numeric values. 1 = 1 keyword)</i>
              </span> 

              <div class="separator"></div>

              <span class="selectors myoffset3">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-metakw-count-1_g" onclick="colorpick(\'head-metakw-count-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-count-1_o" onclick="colorpick(\'head-metakw-count-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-count-1_r" onclick="colorpick(\'head-metakw-count-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-2-b" onkeypress="validate(event)"/>  
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-2-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-metakw-count-2_g" onclick="colorpick(\'head-metakw-count-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-count-2_o" onclick="colorpick(\'head-metakw-count-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-count-2_r" onclick="colorpick(\'head-metakw-count-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-metakw-count-3_g" onclick="colorpick(\'head-metakw-count-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-count-3_o" onclick="colorpick(\'head-metakw-count-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-count-3_r" onclick="colorpick(\'head-metakw-count-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="head-metakw-count-4_g" onclick="colorpick(\'head-metakw-count-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-count-4_o" onclick="colorpick(\'head-metakw-count-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-count-4_r" onclick="colorpick(\'head-metakw-count-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_relevance" onclick="ub11();" checked="true"> Relevance with Site Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_relevance-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-metakw-relevance-1_g" onclick="colorpick(\'head-metakw-relevance-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-relevance-1_o" onclick="colorpick(\'head-metakw-relevance-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-relevance-1_r" onclick="colorpick(\'head-metakw-relevance-1_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_relevance-2-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_relevance-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-metakw-relevance-2_g" onclick="colorpick(\'head-metakw-relevance-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-relevance-2_o" onclick="colorpick(\'head-metakw-relevance-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-relevance-2_r" onclick="colorpick(\'head-metakw-relevance-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metakw_relevance-3-b" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="head-metakw-relevance-3_g" onclick="colorpick(\'head-metakw-relevance-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metakw-relevance-3_o" onclick="colorpick(\'head-metakw-relevance-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metakw-relevance-3_r" onclick="colorpick(\'head-metakw-relevance-3_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_metakw_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

               <br /><br /><hr>

              <!-- Meta description -->

              <h5 class="blueboy">Meta Description Checks</h5>


              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_show" onclick="ub12();" checked="true"> Display the meta description
              </span> 

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_lenght" onclick="ub13();" checked="true"> Description lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-metadesc-lenght-1_g" onclick="colorpick(\'head-metadesc-lenght-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-lenght-1_o" onclick="colorpick(\'head-metadesc-lenght-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-lenght-1_r" onclick="colorpick(\'head-metadesc-lenght-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-2-b" onkeypress="validate(event)"  />  
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-2-l"  onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-metadesc-lenght-2_g" onclick="colorpick(\'head-metadesc-lenght-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-lenght-2_o" onclick="colorpick(\'head-metadesc-lenght-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-lenght-2_r" onclick="colorpick(\'head-metadesc-lenght-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-metadesc-lenght-3_g" onclick="colorpick(\'head-metadesc-lenght-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-lenght-3_o" onclick="colorpick(\'head-metadesc-lenght-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-lenght-3_r" onclick="colorpick(\'head-metadesc-lenght-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="head-metadesc-lenght-4_g" onclick="colorpick(\'head-metadesc-lenght-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-lenght-4_o" onclick="colorpick(\'head-metadesc-lenght-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-lenght-4_r" onclick="colorpick(\'head-metadesc-lenght-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_kw_in_metadesc" onclick="ub14();" checked="true"> Keywords in Description Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_relevance" onclick="ub15();" checked="true"> Relevance with Keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_relevance-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-metadesc-relevance-1_g" onclick="colorpick(\'head-metadesc-relevance-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-relevance-1_o" onclick="colorpick(\'head-metadesc-relevance-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-relevance-1_r" onclick="colorpick(\'head-metadesc-relevance-1_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_relevance-2-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_relevance-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-metadesc-relevance-2_g" onclick="colorpick(\'head-metadesc-relevance-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-relevance-2_o" onclick="colorpick(\'head-metadesc-relevance-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-relevance-2_r" onclick="colorpick(\'head-metadesc-relevance-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metadesc_relevance-3-b" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="head-metadesc-relevance-3_g" onclick="colorpick(\'head-metadesc-relevance-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="head-metadesc-relevance-3_o" onclick="colorpick(\'head-metadesc-relevance-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="head-metadesc-relevance-3_r" onclick="colorpick(\'head-metadesc-relevance-3_r\')" class="label label-important classicpointer">Red</span>

              </span>

               <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_metadesc_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


              <!-- CONTENT -->

              <div class="tab-content" id="tabs4">

              <div id="eb_content"></div>

              <h3 class="catind redboy"><i class="icon-list-alt nostyle"></i> Content Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_language" checked="true" onclick="ub16();"> Language Detector
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_charcount" checked="true" onclick="ub17();"> Content Characters Count Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="content_charcount-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="content-charcount-1_g" onclick="colorpick(\'content-charcount-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-charcount-1_o" onclick="colorpick(\'content-charcount-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-charcount-1_r" onclick="colorpick(\'content-charcount-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="content_charcount-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="content_charcount-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="content-charcount-2_g" onclick="colorpick(\'content-charcount-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-charcount-2_o" onclick="colorpick(\'content-charcount-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-charcount-2_r" onclick="colorpick(\'content-charcount-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_charcount-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_charcount-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="content-charcount-3_g" onclick="colorpick(\'content-charcount-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-charcount-3_o" onclick="colorpick(\'content-charcount-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-charcount-3_r" onclick="colorpick(\'content-charcount-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_charcount-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="content-charcount-4_g" onclick="colorpick(\'content-charcount-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-charcount-4_o" onclick="colorpick(\'content-charcount-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-charcount-4_r" onclick="colorpick(\'content-charcount-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


             <span class="clabel myoffset2">
                <input type="checkbox" id="content_wordcount" checked="true" onclick="ub18();"> Content Words Count Check <i>(Numeric values. 1 = 1 word)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="content_wordcount-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="content-wordcount-1_g" onclick="colorpick(\'content-wordcount-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-1_o" onclick="colorpick(\'content-wordcount-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-1_r" onclick="colorpick(\'content-wordcount-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="content_wordcount-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="content_wordcount-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="content-wordcount-2_g" onclick="colorpick(\'content-wordcount-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-2_o" onclick="colorpick(\'content-wordcount-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-2_r" onclick="colorpick(\'content-wordcount-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_wordcount-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_wordcount-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="content-wordcount-3_g" onclick="colorpick(\'content-wordcount-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-3_o" onclick="colorpick(\'content-wordcount-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-3_r" onclick="colorpick(\'content-wordcount-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_wordcount-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="content-wordcount-4_g" onclick="colorpick(\'content-wordcount-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-4_o" onclick="colorpick(\'content-wordcount-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-4_r" onclick="colorpick(\'content-wordcount-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwin" checked="true" onclick="ub19();"> Keywords in content Check
              </span>


              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_content_relevance" checked="true" onclick="ub20();"> Relevance keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="content_content_relevance-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="content-content-relevance-1_g" onclick="colorpick(\'content-content-relevance-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-1_o" onclick="colorpick(\'content-content-relevance-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-1_r" onclick="colorpick(\'content-content-relevance-1_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_content_relevance-2-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_content_relevance-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="content-content-relevance-2_g" onclick="colorpick(\'content-content-relevance-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-2_o" onclick="colorpick(\'content-content-relevance-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-2_r" onclick="colorpick(\'content-content-relevance-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="content_content_relevance-3-b" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="content-content-relevance-3_g" onclick="colorpick(\'content-content-relevance-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-3_o" onclick="colorpick(\'content-content-relevance-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-3_r" onclick="colorpick(\'content-content-relevance-3_r\')" class="label label-important classicpointer">Red</span>

              </span>

               <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwinitalic" checked="true" onclick="ub21();"> Keyword(s) in italic Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwinbold" checked="true" onclick="ub22();"> Keyword(s) in bold Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_headings" checked="true" onclick="ub23();"> Headings Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_iframes" checked="true" onclick="ub24();"> Iframes Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="content_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


              <!-- URL STRUCTURE -->

              <div class="tab-content" id="tabs5">

              <div id="eb_url"></div>

              <h3 class="catind redboy"><i class="icon-bookmark-empty nostyle"></i> URL Structure </h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_display" checked="true" onclick="ub25();"> Display the URL
              </span> 

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_kwin" checked="true" onclick="ub26();"> Keyword(s) in URL check
              </span> 


              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_lenght" checked="true" onclick="ub27();"> Domain lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                 <input type="text" class="smallbox" placeholder="<" id="url_lenght-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="url-lenght-1_g" onclick="colorpick(\'url-lenght-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="url-lenght-1_o" onclick="colorpick(\'url-lenght-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-1_r" onclick="colorpick(\'url-lenght-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="url_lenght-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="url_lenght-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  

                <span id="url-lenght-2_g" onclick="colorpick(\'url-lenght-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="url-lenght-2_o" onclick="colorpick(\'url-lenght-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-2_r" onclick="colorpick(\'url-lenght-2_r\')" class="label label-important classicpointer">Red</span>

              </span>
<!--
              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="url_lenght-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="url_lenght-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="url-lenght-3_g" onclick="colorpick(\'url-lenght-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="url-lenght-3_o" onclick="colorpick(\'url-lenght-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-3_r" onclick="colorpick(\'url-lenght-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 
-->
              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="url_lenght-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="url-lenght-4_g" onclick="colorpick(\'url-lenght-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="url-lenght-4_o" onclick="colorpick(\'url-lenght-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-4_r" onclick="colorpick(\'url-lenght-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_subdomains" checked="true" onclick="ub28();"> Subdomains Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="url_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>

              <!-- LINKS -->

              <div class="tab-content" id="tabs6">

              <div id="eb_links"></div>

              <h3 class="catind redboy"><i class="icon-globe-alt nostyle"></i> Links Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="links_ilinks" checked="true" onclick="ub29();"> Internal links Check <i>(Numeric values. 1 = 1 link)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="links_ilinks-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="links-ilinks-1_g" onclick="colorpick(\'links-ilinks-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-1_o" onclick="colorpick(\'links-ilinks-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-1_r" onclick="colorpick(\'links-ilinks-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="links_ilinks-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="links_ilinks-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="links-ilinks-2_g" onclick="colorpick(\'links-ilinks-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-2_o" onclick="colorpick(\'links-ilinks-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-2_r" onclick="colorpick(\'links-ilinks-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_ilinks-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="links_ilinks-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="links-ilinks-3_g" onclick="colorpick(\'links-ilinks-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-3_o" onclick="colorpick(\'links-ilinks-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-3_r" onclick="colorpick(\'links-ilinks-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_ilinks-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="links-ilinks-4_g" onclick="colorpick(\'links-ilinks-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-4_o" onclick="colorpick(\'links-ilinks-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-4_r" onclick="colorpick(\'links-ilinks-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="links_elinks" checked="true" onclick="ub30();"> External links Check <i>(Numeric values. 1 = 1 link)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="links_elinks-1-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="links-elinks-1_g" onclick="colorpick(\'links-elinks-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-elinks-1_o" onclick="colorpick(\'links-elinks-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-1_r" onclick="colorpick(\'links-elinks-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="links_elinks-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="links_elinks-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="links-elinks-2_g" onclick="colorpick(\'links-elinks-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-elinks-2_o" onclick="colorpick(\'links-elinks-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-2_r" onclick="colorpick(\'links-elinks-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_elinks-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="links_elinks-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="links-elinks-3_g" onclick="colorpick(\'links-elinks-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-elinks-3_o" onclick="colorpick(\'links-elinks-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-3_r" onclick="colorpick(\'links-elinks-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_elinks-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="links-elinks-4_g" onclick="colorpick(\'links-elinks-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="links-elinks-4_o" onclick="colorpick(\'links-elinks-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-4_r" onclick="colorpick(\'links-elinks-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="links_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="links_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


                 <!-- USER EXPERIENCE -->


              <div class="tab-content" id="tabs7">

              <div id="eb_ux"></div>

              <h3 class="catind redboy"><i class="icon-adult nostyle"></i> User Experience Checks</h3>


              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_speed" checked="true" onclick="ub31();"> PageSpeed Check <i>(Numeric values. 1 = 1 point)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad:
                 <input type="text" class="smallbox" placeholder="<" id="ux_speed-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="ux-speed-1_g" onclick="colorpick(\'ux-speed-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-speed-1_o" onclick="colorpick(\'ux-speed-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-1_r" onclick="colorpick(\'ux-speed-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="ux_speed-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="ux_speed-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="ux-speed-2_g" onclick="colorpick(\'ux-speed-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-speed-2_o" onclick="colorpick(\'ux-speed-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-2_r" onclick="colorpick(\'ux-speed-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_speed-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="ux_speed-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="ux-speed-3_g" onclick="colorpick(\'ux-speed-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-speed-3_o" onclick="colorpick(\'ux-speed-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-3_r" onclick="colorpick(\'ux-speed-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>
<!--
            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_speed-4-b" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="ux-speed-4_g" onclick="colorpick(\'ux-speed-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-speed-4_o" onclick="colorpick(\'ux-speed-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-4_r" onclick="colorpick(\'ux-speed-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 
-->

            <span class="clabel myoffset2">
                <input type="checkbox" id="ux_gram" checked="true" onclick="ub32();"> Grammar Mistakes Check <i>(Numeric values. 1 = 1 mistake)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                 <input type="text" class="smallbox" placeholder="<" id="ux_gram-1-l" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="ux-gram-1_g" onclick="colorpick(\'ux-gram-1_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-gram-1_o" onclick="colorpick(\'ux-gram-1_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-1_r" onclick="colorpick(\'ux-gram-1_r\')" class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>
<!--
              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="ux_gram-2-b" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="ux_gram-2-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="ux-gram-2_g" onclick="colorpick(\'ux-gram-2_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-gram-2_o" onclick="colorpick(\'ux-gram-2_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-2_r" onclick="colorpick(\'ux-gram-2_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>
-->
           <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_gram-3-b" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="ux_gram-3-l" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="ux-gram-3_g" onclick="colorpick(\'ux-gram-3_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-gram-3_o" onclick="colorpick(\'ux-gram-3_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-3_r" onclick="colorpick(\'ux-gram-3_r\')" class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_gram-4-b" onkeypress="validate(event)"/>
                 Color:  
                </span>  
               
                <span id="ux-gram-4_g" onclick="colorpick(\'ux-gram-4_g\')" class="label label-success classicpointer">Green</span>
                <span id="ux-gram-4_o" onclick="colorpick(\'ux-gram-4_o\')" class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-4_r" onclick="colorpick(\'ux-gram-4_r\')" class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_responsive" checked="true" onclick="ub33();"> Responsive Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_feedback" checked="true" onclick="ub34();"> FeedBack Page Check
              </span> 

              <div class="separator"></div>
             
              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_label" checked="true"> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="ux_label_content"></textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>
              

              </div>

              </form>';

              //end of the form

            }
            elseif(isset($_GET['e'])){

              $file = $_GET['e'];
              $safe_file = htmlentities($file,ENT_QUOTES);

              if(file_exists('data/profiles/' . $file)){

                 $profileIni = new IniParser('data/profiles/' . $file);

                 /*
                
                  Grabbing the current settings

                 */

                //general

                 $g_barvalue = $profileIni->getValue('g_barvalue');
                 $g_name = $profileIni->getValue('g_name');
                 $g_descr = $profileIni->getValue('g_descr');
                 $g_ispb = $profileIni->getValue('g_ispb');

                 //var_dump($g_ispb);

                 //crawling

                 $c_http = $profileIni->getValue('c_http');
                 $c_robots = $profileIni->getValue('c_robots');
                 $c_sitemap = $profileIni->getValue('c_sitemap');
                 $c_label = $profileIni->getValue('c_label');
                 $c_label_c = $profileIni->getValue('c_label_c');

                 //head:title

                 $h_t_show = $profileIni->getValue('h_t_show');
                 $h_t_length = $profileIni->getValue('h_t_length');
                 $h_t_length_d = explode(',',$profileIni->getValue('h_t_length_d'));
                 $h_t_length_c = explode(',',$profileIni->getValue('h_t_length_c'));
                 $h_t_stopwords = $profileIni->getValue('h_t_stopwords');
                 $h_t_kwin = $profileIni->getValue('h_t_kwin');
                 $h_t_rel = $profileIni->getValue('h_t_rel');
                 $h_t_rel_d = explode(',',$profileIni->getValue('h_t_rel_d'));
                 $h_t_rel_c = explode(',',$profileIni->getValue('h_t_rel_c'));
                 $h_t_label = $profileIni->getValue('h_t_label');
                 $h_t_label_c = $profileIni->getValue('h_t_label_c');

                 //head:kw

                 $h_k_show = $profileIni->getValue('h_k_show');
                 $h_k_count = $profileIni->getValue('h_k_count');
                 $h_k_count_d = explode(',',$profileIni->getValue('h_k_count_d'));
                 $h_k_count_c = explode(',',$profileIni->getValue('h_k_count_c'));
                 $h_k_rel = $profileIni->getValue('h_k_rel');
                 $h__k_rel_d = explode(',',$profileIni->getValue('h__k_rel_d'));
                 $h__k_rel_c = explode(',',$profileIni->getValue('h__k_rel_c'));
                 $h_k_label = $profileIni->getValue('h_k_label');
                 $h_k_label_c = $profileIni->getValue('h_k_label_c');

                 //head:desc

                 $h_d_show = $profileIni->getValue('h_d_show');
                 $h_d_length = $profileIni->getValue('h_d_length');
                 $h_d_length_d = explode(',',$profileIni->getValue('h_d_length_d'));
                 $h_d_length_c = explode(',',$profileIni->getValue('h_d_length_c'));
                 $h_d_kwin = $profileIni->getValue('h_d_kwin');
                 $h_d_rel = $profileIni->getValue('h_d_rel');
                 $h_d_rel_d = explode(',',$profileIni->getValue('h_d_rel_d'));
                 $h_d_rel_c = explode(',',$profileIni->getValue('h_d_rel_c'));
                 $h_d_label = $profileIni->getValue('h_d_label');
                 $h_d_label_c = $profileIni->getValue('h_d_label_c');

                 //content
             
                 $ct_lang = $profileIni->getValue('ct_lang');
                 $ct_chars = $profileIni->getValue('ct_chars');
                 $ct_chars_d = explode(',',$profileIni->getValue('ct_chars_d'));
                 $ct_chars_c = explode(',',$profileIni->getValue('ct_chars_c'));
                 $ct_words = $profileIni->getValue('ct_words');
                 $ct_words_d = explode(',',$profileIni->getValue('ct_words_d'));
                 $ct_words_c = explode(',',$profileIni->getValue('ct_words_c'));
                 $ct_kwin = $profileIni->getValue('ct_kwin');
                 $ct_rel = $profileIni->getValue('ct_rel');
                 $ct_rel_d = explode(',',$profileIni->getValue('ct_rel_d'));
                 $ct_rel_c = explode(',',$profileIni->getValue('ct_rel_c'));
                 $ct_kwini = $profileIni->getValue('ct_kwini');
                 $ct_kwinb = $profileIni->getValue('ct_kwinb');
                 $ct_headings = $profileIni->getValue('ct_headings');
                 $ct_iframes = $profileIni->getValue('ct_iframes');
                 $ct_label = $profileIni->getValue('ct_label');
                 $ct_label_c = $profileIni->getValue('ct_label_c'); 

                 //url structure 

                 $ul_show = $profileIni->getValue('ul_show');
                 $ul_kwin = $profileIni->getValue('ul_kwin');
                 $ul_length = $profileIni->getValue('ul_length');
                 $ul_length_d = explode(',',$profileIni->getValue('ul_length_d'));
                 $ul_length_c = explode(',',$profileIni->getValue('ul_length_c'));
                 $ul_sub = $profileIni->getValue('ul_sub');
                 $ul_label = $profileIni->getValue('ul_label');
                 $ul_label_c = $profileIni->getValue('ul_label_c');

                 //links
             
                 $l_ilinks = $profileIni->getValue('l_ilinks');
                 $l_ilinks_d = explode(',',$profileIni->getValue('l_ilinks_d'));
                 $l_ilinks_c = explode(',',$profileIni->getValue('l_ilinks_c'));
                 $l_elinks = $profileIni->getValue('l_elinks');
                 $l_elinks_d = explode(',',$profileIni->getValue('l_elinks_d'));
                 $l_elinks_c = explode(',',$profileIni->getValue('l_elinks_c'));
                 $l_label = $profileIni->getValue('l_label');
                 $l_label_c = $profileIni->getValue('l_label_c');

                 //user experience
 
                 $u_speed = $profileIni->getValue('u_speed');
                 $u_speed_d = explode(',',$profileIni->getValue('u_speed_d'));
                 $u_speed_c = explode(',',$profileIni->getValue('u_speed_c'));
                 $u_gram = $profileIni->getValue('u_gram');
                 $u_gram_d = explode(',',$profileIni->getValue('u_gram_d'));
                 $u_gram_c = explode(',',$profileIni->getValue('u_gram_c'));
                 $u_res = $profileIni->getValue('u_res');
                 $u_fb = $profileIni->getValue('u_fb');
                 $u_label = $profileIni->getValue('u_label');
                 $u_label_c = $profileIni->getValue('u_label_c');


                /* 

                Debugging pourpouses

                var_dump($c_http);
                print '<br />';
                var_dump($c_robots);
                print '<br />';
                var_dump($c_sitemap);
                print '<br />';
                var_dump($c_label);
                print '<br />';
                var_dump($c_label_c);
                print '<br />';
                
                print '<br />';
                var_dump($h_t_show);
                print '<br />';
                var_dump($h_t_length);
                print '<br />';
                var_dump($h_t_length_d);
                print '<br />';
                var_dump($h_t_length_c);
                print '<br />';
                var_dump($h_t_stopwords);
                print '<br />';
                var_dump($h_t_kwin);
                print '<br />';
                var_dump($h_t_rel);
                print '<br />';
                var_dump($h_t_rel_d);
                print '<br />';
                var_dump($h_t_rel_c);
                print '<br />';
                var_dump($h_t_label);
                print '<br />';
                var_dump($h_t_label_c);
                print '<br />';

                print '<br />';
                var_dump($h_k_show);
                print '<br />';
                var_dump($h_k_count);
                print '<br />';
                var_dump($h_k_count_d);
                print '<br />';
                var_dump($h_k_count_c);
                print '<br />';
                var_dump($h_k_rel);
                print '<br />';
                var_dump($h__k_rel_d);
                print '<br />';
                var_dump($h__k_rel_c);
                print '<br />';
                var_dump($h_k_label);
                print '<br />';
                var_dump($h_k_label_c);
                print '<br />';

                print '<br />';
                var_dump($h_d_show);
                print '<br />';
                var_dump($h_d_length);
                print '<br />';
                var_dump($h_d_length_d);
                print '<br />';
                var_dump($h_d_length_c);
                print '<br />';
                var_dump($h_d_kwin);
                print '<br />';
                var_dump($h_d_rel);
                print '<br />';
                var_dump($h_d_rel_d);
                print '<br />';
                var_dump($h_d_rel_c);
                print '<br />';
                var_dump($h_d_label);
                print '<br />';
                var_dump($h_d_label_c);
                print '<br />';

                print '<br />';
                var_dump($ct_lang);
                print '<br />';
                var_dump($ct_chars);
                print '<br />';
                var_dump($ct_chars_d);
                print '<br />';
                var_dump($ct_chars_c);
                print '<br />';
                var_dump($ct_words);
                print '<br />';
                var_dump($ct_words_d);
                print '<br />';
                var_dump($ct_words_c);
                print '<br />';
                var_dump($ct_kwin);
                print '<br />';
                var_dump($ct_rel);
                print '<br />';
                var_dump($ct_rel_d);
                print '<br />';
                var_dump($ct_rel_c);
                print '<br />';
                var_dump($ct_kwini);
                print '<br />';
                var_dump($ct_kwinb);
                print '<br />';
                var_dump($ct_headings);
                print '<br />';
                var_dump($ct_iframes);
                print '<br />';
                var_dump($ct_label);
                print '<br />';
                var_dump($ct_label_c);
                print '<br />';

                print '<br />';
                var_dump($ul_show);
                print '<br />';
                var_dump($ul_kwin);
                print '<br />';
                var_dump($ul_length);
                print '<br />';
                var_dump($ul_length_d);
                print '<br />';
                var_dump($ul_length_c);
                print '<br />';
                var_dump($ul_sub);
                print '<br />';
                var_dump($ul_label);
                print '<br />';
                var_dump($ul_label_c);
                print '<br />';

                print '<br />';
                var_dump($l_ilinks);
                print '<br />';
                var_dump($l_ilinks_d);
                print '<br />';
                var_dump($l_ilinks_c);
                print '<br />';
                var_dump($l_elinks);
                print '<br />';
                var_dump($l_elinks_d);
                print '<br />';
                var_dump($l_elinks_c);
                print '<br />';
                var_dump($l_label);
                print '<br />';
                var_dump($l_label_c);
                print '<br />';

                print '<br />';
                var_dump($u_speed);
                print '<br />';
                var_dump($u_speed_d);
                print '<br />';
                var_dump($u_speed_c);
                print '<br />';
                var_dump($u_gram);
                print '<br />';
                var_dump($u_gram_d);
                print '<br />';
                var_dump($u_gram_c);
                print '<br />';
                var_dump($u_res);
                print '<br />';
                var_dump($u_fb);
                print '<br />';
                var_dump($u_label);
                print '<br />';
                var_dump($u_label_c);
                print '<br />';
                */

                print '<script type="text/javascript">

                bar_val = '. $g_barvalue .'

                colorpick("head-title-lenght-1_'.$h_t_length_c[0].'");
                colorpick("head-title-lenght-2_'.$h_t_length_c[1].'");
                colorpick("head-title-lenght-3_'.$h_t_length_c[2].'");
                colorpick("head-title-lenght-4_'.$h_t_length_c[3].'");

                colorpick("head-title-relevance-1_'.$h_t_rel_c[0].'");
                colorpick("head-title-relevance-2_'.$h_t_rel_c[1].'");
                colorpick("head-title-relevance-3_'.$h_t_rel_c[2].'");

                // head - meta kw

                colorpick("head-metakw-count-1_'.$h_k_count_c[0].'");
                colorpick("head-metakw-count-2_'.$h_k_count_c[1].'");
                colorpick("head-metakw-count-3_'.$h_k_count_c[2].'");
                colorpick("head-metakw-count-4_'.$h_k_count_c[3].'");

                colorpick("head-metakw-relevance-1_'.$h__k_rel_c[0].'");
                colorpick("head-metakw-relevance-2_'.$h__k_rel_c[1].'");
                colorpick("head-metakw-relevance-3_'.$h__k_rel_c[2].'");

                // head - meta desc


                colorpick("head-metadesc-lenght-1_'.$h_d_length_c[0].'");
                colorpick("head-metadesc-lenght-2_'.$h_d_length_c[1].'");
                colorpick("head-metadesc-lenght-3_'.$h_d_length_c[2].'");
                colorpick("head-metadesc-lenght-4_'.$h_d_length_c[3].'");

                colorpick("head-metadesc-relevance-1_'.$h_d_rel_c[0].'");
                colorpick("head-metadesc-relevance-2_'.$h_d_rel_c[1].'");
                colorpick("head-metadesc-relevance-3_'.$h_d_rel_c[2].'");

                //content checks

                colorpick("content-charcount-1_'.$ct_chars_c[0].'");
                colorpick("content-charcount-2_'.$ct_chars_c[1].'");
                colorpick("content-charcount-3_'.$ct_chars_c[2].'");
                colorpick("content-charcount-4_'.$ct_chars_c[3].'");

                colorpick("content-wordcount-1_'.$ct_words_c[0].'");
                colorpick("content-wordcount-2_'.$ct_words_c[1].'");
                colorpick("content-wordcount-3_'.$ct_words_c[2].'");
                colorpick("content-wordcount-4_'.$ct_words_c[3].'");

                colorpick("content-content-relevance-1_'.$h_d_rel_c[0].'");
                colorpick("content-content-relevance-2_'.$h_d_rel_c[1].'");
                colorpick("content-content-relevance-3_'.$h_d_rel_c[2].'");

                //url structure 

                colorpick("url-lenght-1_'.$ul_length_c[0].'");
                colorpick("url-lenght-2_'.$ul_length_c[1].'");';
                //colorpick("url-lenght-3_'.$ul_length_c[2].'");
                print 'colorpick("url-lenght-4_'.$ul_length_c[2].'");

                //links checks

                colorpick("links-ilinks-1_'.$l_ilinks_c[0].'");
                colorpick("links-ilinks-2_'.$l_ilinks_c[1].'");
                colorpick("links-ilinks-3_'.$l_ilinks_c[2].'");
                colorpick("links-ilinks-4_'.$l_ilinks_c[3].'");

                colorpick("links-elinks-1_'.$l_elinks_c[0].'");
                colorpick("links-elinks-2_'.$l_elinks_c[1].'");
                colorpick("links-elinks-3_'.$l_elinks_c[2].'");
                colorpick("links-elinks-4_'.$l_elinks_c[3].'");

                // ux checks

                colorpick("ux-speed-1_'.$u_speed_c[0].'");
                colorpick("ux-speed-2_'.$u_speed_c[1].'");
                colorpick("ux-speed-3_'.$u_speed_c[2].'");


                colorpick("ux-gram-1_'.$u_gram_c[0].'");
                
                colorpick("ux-gram-3_'.$u_gram_c[1].'");
                colorpick("ux-gram-4_'.$u_gram_c[2].'");
                </script>';

                $selected = 'selected';
                $checked  = 'checked="true"';
                $style = 'style="font-size:18px;"';


                 print '<div class="page-header">
                            <h2 id="tables">Profiles editor</h2>
                           <a class="btn btn-warning" onclick="editprofile(\''.$file.'\');" id="zabtn">Edit the profile</a> You`re now editing the <i class="blueboy">"'.htmlentities($g_name,ENT_QUOTES).'"</i>, stored in the <i class="blueboy">"'.$safe_file.'"</i> file.
                          </div>';

                                       print '
                     <center>
                      <h3 class="nomargin bluerboy"><img src="img/timer.png">Loading Time: <span id="ldtime">'.$g_barvalue.'</span>%</h3>
                    </center>
                    
                     <div class="progress progress-danger progress-striped">
                         <div class="bar" style="width:'.$g_barvalue.'%"></div>
                     </div>  ';


              print '
              <div id="main_msgbox">
              </div>

              ';

              //the form

              //the buttons

              print '
              


              <center>
              <div id="buttons">
              <ul class="tabs">
                <button href="#" id="btn_1" rel="tabs1" class="defaulttab">General</button>
                <button href="#" id="btn_2" rel="tabs2">Crawling</button>
                <button href="#" id="btn_3" rel="tabs3">Head elements</button>
                <button href="#" id="btn_4" rel="tabs4">Content</button>
                <button href="#" id="btn_5" rel="tabs5">URL Structure</button>
                <button href="#" id="btn_6" rel="tabs6">Links</button>
                <button href="#" id="btn_7" rel="tabs7">User Experience</button>
              </div>
              </center>';

              print '<form action="?q=p&c=a" method="post" class="form-horizontal">
              <input type="hidden" name="check" />
              
              <!-- GENERAL -->

              <div class="tab-content" id="tabs1">

              <div id="eb_general"></div>

              <h3 class="catind redboy"><i class="icon-info-sign nostyle"></i> General</h3>
              <label for="info_name">Profile name:</label>
              <input type="text" id="info_name" name="info_name" value="'.htmlentities($g_name,ENT_QUOTES).'">

              <label for="info_descr">Profile Description:</label>
              <textarea id="info_descr" name="info_descr" placeholder="A short description about this SEO profile.">'.htmlentities($g_descr,ENT_QUOTES).'</textarea>
             
              <label for="nfo_ip">Is public</label>
              <select name="info_ip" id="info_ip">
              <option value="1" '. ($g_ispb == "1" ? $selected :  '') .'>Yes</option>
              <option value="0" '. ($g_ispb == "0" ? $selected :  '') .'>No</option>
              </select>

              </div>

              <!-- CRAWLING -->

              <div class="tab-content" id="tabs2">

              <div id="eb_crawling"></div>

              <h3 class="catind redboy"><i class="icon-file nostyle"></i> Crawling Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_http" '. ($c_http == "true" ? $checked :  '') .' onclick="ub1();"> HTTP Status Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_robots" '. ($c_robots == "true" ? $checked :  '') .' onclick="ub2();"> Robots.txt Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_sitemap" '. ($c_sitemap == "true" ? $checked :  '') .' onclick="ub3();"> Sitemap Check
              </span> 

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="crawling_label" '. ($c_label == "true" ? $checked :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="crawling_label_content">'.htmlentities($c_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>


              </div>
              
              <!-- HEAD ELEMENTS -->


              <div class="tab-content" id="tabs3">

                <div id="eb_head"></div>

             <h3 class="catind redboy"><i class="icon-website nostyle"></i> Head elements Check</h3>

            <h5 class="blueboy">Title Tag Checks</h5>

             <!-- Title tag -->



              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_show" onclick="ub4();"  '. ($h_t_show == "true" ? $checked :  '') .'> Display title tag
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_lenght" onclick="ub5();" '. ($h_t_length == "true" ? $checked :  '') .'> Title lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-1-l" onkeypress="validate(event)" value="'. ($h_t_length_d[0] != "false" ? (int)$h_t_length_d[0] :  '') .'" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-title-lenght-1_g" onclick="colorpick(\'head-title-lenght-1_g\')" class="label label-success classicpointer"   '. ($h_t_length_c[0] == "g" ? $style :  '') .' >Green</span>
                <span id="head-title-lenght-1_o" onclick="colorpick(\'head-title-lenght-1_o\')" class="label label-warning classicpointer"   '. ($h_t_length_c[0] == "o" ? $style :  '') .' >Orange</span>
                <span id="head-title-lenght-1_r" onclick="colorpick(\'head-title-lenght-1_r\')" class="label label-important classicpointer" '. ($h_t_length_c[0] == "r" ? $style :  '') .' >Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-2-b" value="'. ($h_t_length_d[1] != "false" ? (int)$h_t_length_d[1] :  '') .'" onkeypress="validate(event)"/>  
                <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-2-l" value="'. ($h_t_length_d[2] != "false" ? (int)$h_t_length_d[2] :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-title-lenght-2_g" onclick="colorpick(\'head-title-lenght-2_g\')" class="label label-success  classicpointer"  '. ($h_t_length_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-lenght-2_o" onclick="colorpick(\'head-title-lenght-2_o\')" class="label label-warning  classicpointer"  '. ($h_t_length_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-lenght-2_r" onclick="colorpick(\'head-title-lenght-2_r\')" class="label label-important classicpointer" '. ($h_t_length_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-3-b"  value="'. ($h_t_length_d[3] != "false" ? (int)$h_t_length_d[3] :  '') .'" onkeypress="validate(event)"/> 
                <input type="text" class="smallbox" placeholder="<" id="head_title_lenght-3-l" value="'. ($h_t_length_d[4] != "false" ? (int)$h_t_length_d[4] :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-title-lenght-3_g" onclick="colorpick(\'head-title-lenght-3_g\')" class="label label-success classicpointer"   '. ($h_t_length_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-lenght-3_o" onclick="colorpick(\'head-title-lenght-3_o\')" class="label label-warning classicpointer"   '. ($h_t_length_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-lenght-3_r" onclick="colorpick(\'head-title-lenght-3_r\')" class="label label-important classicpointer" '. ($h_t_length_c[2] == "r" ? $style :  '') .'>Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_lenght-4-b" value="'. ($h_t_length_d[5] != "false" ? (int)$h_t_length_d[5] :  '') .'" onkeypress="validate(event)"/>
                 Color:  
                </span>  
               
                <span id="head-title-lenght-4_g" onclick="colorpick(\'head-title-lenght-4_g\')" class="label label-success classicpointer"   '. ($h_t_length_c[3] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-lenght-4_o" onclick="colorpick(\'head-title-lenght-4_o\')" class="label label-warning classicpointer"   '. ($h_t_length_c[3] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-lenght-4_r" onclick="colorpick(\'head-title-lenght-4_r\')" class="label label-important classicpointer" '. ($h_t_length_c[3] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_stop_words" onclick="ub6();" '. ($h_t_stopwords == "true" ? $checked :  '') .'> Stop Words Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_kw_in_title" onclick="ub7();" '. ($h_t_kwin == "true" ? $checked :  '') .'> Keywords in title Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_relevance" onclick="ub8();" '. ($h_t_rel == "true" ? $checked :  '') .'> Relevance with Keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_title_relevance-1-l" onkeypress="validate(event)" value="'. ($h_t_rel_d[0] != "false" ? (int)$h_t_rel_d[0]  :  '') .'"/> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-title-relevance-1_g" onclick="colorpick(\'head-title-relevance-1_g\')" class="label label-success classicpointer"   '. ($h_t_rel_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-relevance-1_o" onclick="colorpick(\'head-title-relevance-1_o\')" class="label label-warning classicpointer"   '. ($h_t_rel_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-relevance-1_r" onclick="colorpick(\'head-title-relevance-1_r\')" class="label label-important classicpointer" '. ($h_t_rel_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_relevance-2-b" value="'. ($h_t_rel_d[1] != "false" ? (int)$h_t_rel_d[1]  :  '') .'" onkeypress="validate(event)"/> 
                <input type="text" class="smallbox" placeholder="<" id="head_title_relevance-2-l" value="'. ($h_t_rel_d[2] != "false" ? (int)$h_t_rel_d[2]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-title-relevance-2_g" onclick="colorpick(\'head-title-relevance-2_g\')" class="label label-success classicpointer"   '. ($h_t_rel_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-relevance-2_o" onclick="colorpick(\'head-title-relevance-2_o\')" class="label label-warning classicpointer"   '. ($h_t_rel_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-relevance-2_r" onclick="colorpick(\'head-title-relevance-2_r\')" class="label label-important classicpointer" '. ($h_t_rel_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_title_relevance-3-b" value="'. ($h_t_rel_d[3] != "false" ? (int)$h_t_rel_d[3]  :  '') .'" onkeypress="validate(event)"/>
                Color:  
                </span>  
               
                <span id="head-title-relevance-3_g" onclick="colorpick(\'head-title-relevance-3_g\')" class="label label-success classicpointer"   '. ($h_t_rel_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-title-relevance-3_o" onclick="colorpick(\'head-title-relevance-3_o\')" class="label label-warning classicpointer"   '. ($h_t_rel_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-title-relevance-3_r" onclick="colorpick(\'head-title-relevance-3_r\')" class="label label-important classicpointer" '. ($h_t_rel_c[2] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_label" '. ($h_t_label == "true" ? $checked :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_title_label_content" >'.htmlentities($h_t_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>


              <br /><br /><hr>  



              <!-- Meta keywords -->

              <h5 class="blueboy">Meta Keywords Checks</h5>


              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_show" onclick="ub9();" '. ($h_k_show == "true" ? $checked :  '') .'> Display the keywords
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_count" onclick="ub10();" '. ($h_k_count == "true" ? $checked :  '') .'> Keywords Count Check <i>(Numeric values. 1 = 1 keyword)</i>
              </span> 

              <div class="separator"></div>

              <span class="selectors myoffset3">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-1-l" value="'. ($h_k_count_d[0] != "false" ? (int)$h_k_count_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-metakw-count-1_g" onclick="colorpick(\'head-metakw-count-1_g\')" class="label label-success classicpointer"   '. ($h_k_count_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-count-1_o" onclick="colorpick(\'head-metakw-count-1_o\')" class="label label-warning classicpointer"   '. ($h_k_count_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-count-1_r" onclick="colorpick(\'head-metakw-count-1_r\')" class="label label-important classicpointer" '. ($h_k_count_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-2-b" value="'. ($h_k_count_d[1] != "false" ? (int)$h_k_count_d[1]  :  '') .'" onkeypress="validate(event)"/>  
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-2-l" value="'. ($h_k_count_d[2] != "false" ? (int)$h_k_count_d[2]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-metakw-count-2_g" onclick="colorpick(\'head-metakw-count-2_g\')" class="label label-success classicpointer"   '. ($h_k_count_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-count-2_o" onclick="colorpick(\'head-metakw-count-2_o\')" class="label label-warning classicpointer"   '. ($h_k_count_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-count-2_r" onclick="colorpick(\'head-metakw-count-2_r\')" class="label label-important classicpointer" '. ($h_k_count_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-3-b" value="'. ($h_k_count_d[3] != "false" ? (int)$h_k_count_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_count-3-l" value="'. ($h_k_count_d[4] != "false" ? (int)$h_k_count_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-metakw-count-3_g" onclick="colorpick(\'head-metakw-count-3_g\')" class="label label-success classicpointer"   '. ($h_k_count_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-count-3_o" onclick="colorpick(\'head-metakw-count-3_o\')" class="label label-warning classicpointer"   '. ($h_k_count_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-count-3_r" onclick="colorpick(\'head-metakw-count-3_r\')" class="label label-important classicpointer" '. ($h_k_count_c[2] == "r" ? $style :  '') .'>Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metakw_count-4-b" value="'. ($h_k_count_d[5] != "false" ? (int)$h_k_count_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="head-metakw-count-4_g" onclick="colorpick(\'head-metakw-count-4_g\')" class="label label-success classicpointer"   '. ($h_k_count_c[3] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-count-4_o" onclick="colorpick(\'head-metakw-count-4_o\')" class="label label-warning classicpointer"   '. ($h_k_count_c[3] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-count-4_r" onclick="colorpick(\'head-metakw-count-4_r\')" class="label label-important classicpointer" '. ($h_k_count_c[3] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_relevance" onclick="ub11();" '. ($h_k_rel == "true" ? $checked :  '') .'> Relevance with Site Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_relevance-1-l" value="'. ($h__k_rel_d[0] != "false" ? (int)$h__k_rel_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-metakw-relevance-1_g" onclick="colorpick(\'head-metakw-relevance-1_g\')" class="label label-success classicpointer"   '. ($h__k_rel_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-relevance-1_o" onclick="colorpick(\'head-metakw-relevance-1_o\')" class="label label-warning classicpointer"   '. ($h__k_rel_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-relevance-1_r" onclick="colorpick(\'head-metakw-relevance-1_r\')" class="label label-important classicpointer" '. ($h__k_rel_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metakw_relevance-2-b" value="'. ($h__k_rel_d[1] != "false" ? (int)$h__k_rel_d[1]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metakw_relevance-2-l" value="'. ($h__k_rel_d[2] != "false" ? (int)$h__k_rel_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-metakw-relevance-2_g" onclick="colorpick(\'head-metakw-relevance-2_g\')" class="label label-success classicpointer"   '. ($h__k_rel_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-relevance-2_o" onclick="colorpick(\'head-metakw-relevance-2_o\')" class="label label-warning classicpointer"   '. ($h__k_rel_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-relevance-2_r" onclick="colorpick(\'head-metakw-relevance-2_r\')" class="label label-important classicpointer" '. ($h__k_rel_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metakw_relevance-3-b" value="'. ($h__k_rel_d[3] != "false" ? (int)$h__k_rel_d[3]  :  '') .'" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="head-metakw-relevance-3_g" onclick="colorpick(\'head-metakw-relevance-3_g\')" class="label label-success classicpointer"   '. ($h__k_rel_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metakw-relevance-3_o" onclick="colorpick(\'head-metakw-relevance-3_o\')" class="label label-warning classicpointer"   '. ($h__k_rel_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metakw-relevance-3_r" onclick="colorpick(\'head-metakw-relevance-3_r\')" class="label label-important classicpointer" '. ($h__k_rel_c[2] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div> 
';
print'
               <span class="clabel myoffset2">
                <input type="checkbox" id="head_metakw_label" '. ($h_k_label == "true" ? $checked :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_metakw_label_content">'. htmlentities($h_k_label_c,ENT_QUOTES) .'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

               <br /><br /><hr>

              <!-- Meta description -->

              <h5 class="blueboy">Meta Description Checks</h5>


              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_show" onclick="ub12();" '. ($h_d_show == "true" ? $checked :  '') .'> Display the meta description
              </span> 

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_lenght" onclick="ub13();" '. ($h_d_length == "true" ? $checked :  '') .'> Description lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-1-l" value="'. ($h_d_length_d[0] != "false" ? (int)$h_d_length_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="head-metadesc-lenght-1_g" onclick="colorpick(\'head-metadesc-lenght-1_g\')" class="label label-success classicpointer"   '. ($h_d_length_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-lenght-1_o" onclick="colorpick(\'head-metadesc-lenght-1_o\')" class="label label-warning classicpointer"   '. ($h_d_length_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-lenght-1_r" onclick="colorpick(\'head-metadesc-lenght-1_r\')" class="label label-important classicpointer" '. ($h_d_length_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-2-b" value="'. ($h_d_length_d[1] != "false" ? (int)$h_d_length_d[1]  :  '') .'" onkeypress="validate(event)"  />  
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-2-l"  value="'. ($h_d_length_d[2] != "false" ? (int)$h_d_length_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="head-metadesc-lenght-2_g" onclick="colorpick(\'head-metadesc-lenght-2_g\')" class="label label-success classicpointer"   '. ($h_d_length_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-lenght-2_o" onclick="colorpick(\'head-metadesc-lenght-2_o\')" class="label label-warning classicpointer"   '. ($h_d_length_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-lenght-2_r" onclick="colorpick(\'head-metadesc-lenght-2_r\')" class="label label-important classicpointer" '. ($h_d_length_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-3-b" value="'. ($h_d_length_d[3] != "false" ? (int)$h_d_length_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_lenght-3-l" value="'. ($h_d_length_d[4] != "false" ? (int)$h_d_length_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="head-metadesc-lenght-3_g" onclick="colorpick(\'head-metadesc-lenght-3_g\')" class="label label-success classicpointer"   '. ($h_d_length_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-lenght-3_o" onclick="colorpick(\'head-metadesc-lenght-3_o\')" class="label label-warning classicpointer"   '. ($h_d_length_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-lenght-3_r" onclick="colorpick(\'head-metadesc-lenght-3_r\')" class="label label-important classicpointer" '. ($h_d_length_c[2] == "r" ? $style :  '') .'>Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_lenght-4-b" value="'. ($h_d_length_d[5] != "false" ? (int)$h_d_length_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="head-metadesc-lenght-4_g" onclick="colorpick(\'head-metadesc-lenght-4_g\')" class="label label-success classicpointer"   '. ($h_d_length_c[3] == "g" ? $style :  '') .' >Green</span>
                <span id="head-metadesc-lenght-4_o" onclick="colorpick(\'head-metadesc-lenght-4_o\')" class="label label-warning classicpointer"   '. ($h_d_length_c[3] == "o" ? $style :  '') .' >Orange</span>
                <span id="head-metadesc-lenght-4_r" onclick="colorpick(\'head-metadesc-lenght-4_r\')" class="label label-important classicpointer" '. ($h_d_length_c[3] == "r" ? $style :  '') .' >Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_title_kw_in_metadesc" onclick="ub14();" '. ($h_d_kwin == "true" ? $checked :  '') .'> Keywords in Description Check
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_relevance" onclick="ub15();" '. ($h_d_rel == "true" ? $checked :  '') .'> Relevance with Keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_relevance-1-l" value="'. ($h_d_rel_d[0] != "false" ? (int)$h_d_rel_d[0]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="head-metadesc-relevance-1_g" onclick="colorpick(\'head-metadesc-relevance-1_g\')" class="label label-success classicpointer"   '. ($h_d_rel_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-relevance-1_o" onclick="colorpick(\'head-metadesc-relevance-1_o\')" class="label label-warning classicpointer"   '. ($h_d_rel_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-relevance-1_r" onclick="colorpick(\'head-metadesc-relevance-1_r\')" class="label label-important classicpointer" '. ($h_d_rel_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="head_metadesc_relevance-2-b" value="'. ($h_d_rel_d[1] != "false" ? (int)$h_d_rel_d[1]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="head_metadesc_relevance-2-l" value="'. ($h_d_rel_d[2] != "false" ? (int)$h_d_rel_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="head-metadesc-relevance-2_g" onclick="colorpick(\'head-metadesc-relevance-2_g\')" class="label label-success classicpointer"   '. ($h_d_rel_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-relevance-2_o" onclick="colorpick(\'head-metadesc-relevance-2_o\')" class="label label-warning classicpointer"   '. ($h_d_rel_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-relevance-2_r" onclick="colorpick(\'head-metadesc-relevance-2_r\')" class="label label-important classicpointer" '. ($h_d_rel_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="head_metadesc_relevance-3-b" value="'. ($h_d_rel_d[3] != "false" ? (int)$h_d_rel_d[3]  :  '') .'" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="head-metadesc-relevance-3_g" onclick="colorpick(\'head-metadesc-relevance-3_g\')" class="label label-success classicpointer"   '. ($h_d_rel_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="head-metadesc-relevance-3_o" onclick="colorpick(\'head-metadesc-relevance-3_o\')" class="label label-warning classicpointer"   '. ($h_d_rel_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="head-metadesc-relevance-3_r" onclick="colorpick(\'head-metadesc-relevance-3_r\')" class="label label-important classicpointer" '. ($h_d_rel_c[2] == "r" ? $style :  '') .'>Red</span>

              </span>

               <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="head_metadesc_label" '. ($h_d_label == "true" ? $checked :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="head_metadesc_label_content">'.htmlentities($h_d_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


              <!-- CONTENT -->

              <div class="tab-content" id="tabs4">

              <div id="eb_content"></div>

              <h3 class="catind redboy"><i class="icon-list-alt nostyle"></i> Content Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_language" onclick="ub16();" '. ($ct_lang == "true" ? $checked :  '') .'> Language Detector
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_charcount" onclick="ub17();" '. ($ct_chars == "true" ? $checked :  '') .'> Content Characters Count Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="content_charcount-1-l" value="'. ($ct_chars_d[0] != "false" ? (int)$ct_chars_d[0]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="content-charcount-1_g" onclick="colorpick(\'content-charcount-1_g\')" class="label label-success classicpointer"   '. ($ct_chars_c[0] == "g" ? $style :  '') .'>Green</span>
                <span id="content-charcount-1_o" onclick="colorpick(\'content-charcount-1_o\')" class="label label-warning classicpointer"   '. ($ct_chars_c[0] == "o" ? $style :  '') .'>Orange</span>
                <span id="content-charcount-1_r" onclick="colorpick(\'content-charcount-1_r\')" class="label label-important classicpointer" '. ($ct_chars_c[0] == "r" ? $style :  '') .'>Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="content_charcount-2-b" value="'. ($ct_chars_d[1] != "false" ? (int)$ct_chars_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="content_charcount-2-l"  value="'. ($ct_chars_d[2] != "false" ? (int)$ct_chars_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="content-charcount-2_g" onclick="colorpick(\'content-charcount-2_g\')" class="label label-success classicpointer"   '. ($ct_chars_c[1] == "g" ? $style :  '') .'>Green</span>
                <span id="content-charcount-2_o" onclick="colorpick(\'content-charcount-2_o\')" class="label label-warning classicpointer"   '. ($ct_chars_c[1] == "o" ? $style :  '') .'>Orange</span>
                <span id="content-charcount-2_r" onclick="colorpick(\'content-charcount-2_r\')" class="label label-important classicpointer" '. ($ct_chars_c[1] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_charcount-3-b" value="'. ($ct_chars_d[3] != "false" ? (int)$ct_chars_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_charcount-3-l" value="'. ($ct_chars_d[4] != "false" ? (int)$ct_chars_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="content-charcount-3_g" onclick="colorpick(\'content-charcount-3_g\')" class="label label-success classicpointer"   '. ($ct_chars_c[2] == "g" ? $style :  '') .'>Green</span>
                <span id="content-charcount-3_o" onclick="colorpick(\'content-charcount-3_o\')" class="label label-warning classicpointer"   '. ($ct_chars_c[2] == "o" ? $style :  '') .'>Orange</span>
                <span id="content-charcount-3_r" onclick="colorpick(\'content-charcount-3_r\')" class="label label-important classicpointer" '. ($ct_chars_c[2] == "r" ? $style :  '') .'>Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_charcount-4-b" value="'. ($ct_chars_d[5] != "false" ? (int)$ct_chars_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>

                <span id="content-charcount-4_g" onclick="colorpick(\'content-charcount-4_g\')" class="label label-success classicpointer"  '. ($ct_chars_c[3] == "g" ? $style :  '') .'>Green</span>
                <span id="content-charcount-4_o" onclick="colorpick(\'content-charcount-4_o\')" class="label label-warning classicpointer"  '. ($ct_chars_c[3] == "o" ? $style :  '') .'>Orange</span>
                <span id="content-charcount-4_r" onclick="colorpick(\'content-charcount-4_r\')" class="label label-important classicpointer" '. ($ct_chars_c[3] == "r" ? $style :  '') .'>Red</span>

              </span>

              <div class="separator"></div>


             <span class="clabel myoffset2">
                <input type="checkbox" id="content_wordcount" '. ($ct_words == "true" ? $checked :  '') .' onclick="ub18();"> Content Words Count Check <i>(Numeric values. 1 = 1 word)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="content_wordcount-1-l" value="'. ($ct_words_d[0] != "false" ? (int)$ct_words_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="content-wordcount-1_g" onclick="colorpick(\'content-wordcount-1_g\')" '. ($ct_words_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-1_o" onclick="colorpick(\'content-wordcount-1_o\')" '. ($ct_words_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-1_r" onclick="colorpick(\'content-wordcount-1_r\')" '. ($ct_words_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="content_wordcount-2-b" value="'. ($ct_words_d[1] != "false" ? (int)$ct_words_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="content_wordcount-2-l"  value="'. ($ct_words_d[2] != "false" ? (int)$ct_words_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span> 

                <span id="content-wordcount-2_g" onclick="colorpick(\'content-wordcount-2_g\')" '. ($ct_words_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-2_o" onclick="colorpick(\'content-wordcount-2_o\')" '. ($ct_words_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-2_r" onclick="colorpick(\'content-wordcount-2_r\')" '. ($ct_words_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_wordcount-3-b" value="'. ($ct_words_d[3] != "false" ? (int)$ct_words_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_wordcount-3-l" value="'. ($ct_words_d[4] != "false" ? (int)$ct_words_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="content-wordcount-3_g" onclick="colorpick(\'content-wordcount-3_g\')" '. ($ct_words_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-3_o" onclick="colorpick(\'content-wordcount-3_o\')" '. ($ct_words_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-3_r" onclick="colorpick(\'content-wordcount-3_r\')" '. ($ct_words_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_wordcount-4-b" value="'. ($ct_words_d[5] != "false" ? (int)$ct_words_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="content-wordcount-4_g" onclick="colorpick(\'content-wordcount-4_g\')" '. ($ct_words_c[3] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-wordcount-4_o" onclick="colorpick(\'content-wordcount-4_o\')" '. ($ct_words_c[3] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-wordcount-4_r" onclick="colorpick(\'content-wordcount-4_r\')" '. ($ct_words_c[3] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwin"  '. ($ct_kwin == "true" ? $checked :  '') .' onclick="ub19();"> Keywords in content Check
              </span>


              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_content_relevance"  '. ($ct_rel == "true" ? $checked :  '') .' onclick="ub20();"> Relevance keywords Check <i>(Percentage values. 1 = 1 percent)</i>
              </span>

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <input type="text" class="smallbox" placeholder="<" id="content_content_relevance-1-l" onkeypress="validate(event)" value="'. ($ct_rel_d[0] != "false" ? (int)$ct_rel_d[0]  :  '') .'" /> <strong class="bluerboy">&lt;</strong>
                Color:  
                </span>  
               
                <span id="content-content-relevance-1_g" onclick="colorpick(\'content-content-relevance-1_g\')" '. ($ct_rel_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-1_o" onclick="colorpick(\'content-content-relevance-1_o\')" '. ($ct_rel_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-1_r" onclick="colorpick(\'content-content-relevance-1_r\')" '. ($ct_rel_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>


              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="content_content_relevance-2-b" value="'. ($ct_rel_d[1] != "false" ? (int)$ct_rel_d[1]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="content_content_relevance-2-l" value="'. ($ct_rel_d[2] != "false" ? (int)$ct_rel_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                

                  Color: 
                 </span>  
               
                <span id="content-content-relevance-2_g" onclick="colorpick(\'content-content-relevance-2_g\')" '. ($ct_rel_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-2_o" onclick="colorpick(\'content-content-relevance-2_o\')" '. ($ct_rel_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-2_r" onclick="colorpick(\'content-content-relevance-2_r\')" '. ($ct_rel_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 


              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                <strong class="bluerboy">&gt;</strong> <input type="text" class="smallbox" placeholder=">" id="content_content_relevance-3-b" value="'. ($ct_rel_d[3] != "false" ? (int)$ct_rel_d[3]  :  '') .'" onkeypress="validate(event)" />
                Color:  
                </span>  
               
                <span id="content-content-relevance-3_g" onclick="colorpick(\'content-content-relevance-3_g\')" '. ($ct_rel_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="content-content-relevance-3_o" onclick="colorpick(\'content-content-relevance-3_o\')" '. ($ct_rel_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="content-content-relevance-3_r" onclick="colorpick(\'content-content-relevance-3_r\')" '. ($ct_rel_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

               <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwinitalic" '. ($ct_kwini == "true" ? $checked :  '') .' onclick="ub21();"> Keyword(s) in italic Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_kwinbold" '. ($ct_kwinb == "true" ? $checked :  '') .' onclick="ub22();"> Keyword(s) in bold Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_headings" '. ($ct_headings == "true" ? $checked :  '') .' onclick="ub23();"> Headings Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_iframes" '. ($ct_iframes == "true" ? $checked :  '') .' onclick="ub24();"> Iframes Check
              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="content_label" '. ($ct_label == "true" ? $checked  :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="content_label_content">'.htmlentities($ct_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


              <!-- URL STRUCTURE -->

              <div class="tab-content" id="tabs5">

              <div id="eb_url"></div>

              <h3 class="catind redboy"><i class="icon-bookmark-empty nostyle"></i> URL Structure </h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_display" '. ($ul_show == "true" ? $checked  :  '') .' onclick="ub25();"> Display the URL
              </span> 

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_kwin" '. ($ul_kwin == "true" ? $checked  :  '') .' onclick="ub26();"> Keyword(s) in URL check
              </span> 


              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_lenght" '. ($ul_length == "true" ? $checked  :  '') .' onclick="ub27();"> Domain lenght Check <i>(Numeric values. 1 = 1 character)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                 <input type="text" class="smallbox" placeholder="<" id="url_lenght-1-l" value="'. ($ul_length_d[0] != "false" ? (int)$ul_length_d[0]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="url-lenght-1_g" onclick="colorpick(\'url-lenght-1_g\')" '. ($ul_length_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="url-lenght-1_o" onclick="colorpick(\'url-lenght-1_o\')" '. ($ul_length_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-1_r" onclick="colorpick(\'url-lenght-1_r\')" '. ($ul_length_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="url_lenght-2-b" value="'. ($ul_length_d[1] != "false" ? (int)$ul_length_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="url_lenght-2-l"  value="'. ($ul_length_d[2] != "false" ? (int)$ul_length_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  

                <span id="url-lenght-2_g" onclick="colorpick(\'url-lenght-2_g\')" '. ($ul_length_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="url-lenght-2_o" onclick="colorpick(\'url-lenght-2_o\')" '. ($ul_length_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-2_r" onclick="colorpick(\'url-lenght-2_r\')" '. ($ul_length_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>';
/*print '<!--
           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="url_lenght-3-b" value="'. ($ul_length_d[3] != "false" ? (int)$ul_length_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="url_lenght-3-l" value="'. ($ul_length_d[4] != "false" ? (int)$ul_length_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="url-lenght-3_g" onclick="colorpick(\'url-lenght-3_g\')" '. ($ul_length_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="url-lenght-3_o" onclick="colorpick(\'url-lenght-3_o\')" '. ($ul_length_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-3_r" onclick="colorpick(\'url-lenght-3_r\')" '. ($ul_length_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 
-->;';*/
             print ' <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="url_lenght-4-b" value="'. ($ul_length_d[3] != "false" ? (int)$ul_length_d[3]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="url-lenght-4_g" onclick="colorpick(\'url-lenght-4_g\')" '. ($ul_length_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="url-lenght-4_o" onclick="colorpick(\'url-lenght-4_o\')" '. ($ul_length_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="url-lenght-4_r" onclick="colorpick(\'url-lenght-4_r\')" '. ($ul_length_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_subdomains" '. ($ul_sub == "true" ? $checked  :  '') .' onclick="ub28();"> Subdomains Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="url_label" '. ($ul_label == "true" ? $checked  :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="url_label_content">'.htmlentities($ul_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>

              <!-- LINKS -->

              <div class="tab-content" id="tabs6">

              <div id="eb_links"></div>

              <h3 class="catind redboy"><i class="icon-globe-alt nostyle"></i> Links Checks</h3>

              <span class="clabel myoffset2">
                <input type="checkbox" id="links_ilinks" '. ($l_ilinks == "true" ? $checked  :  '') .' onclick="ub29();"> Internal links Check <i>(Numeric values. 1 = 1 link)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="links_ilinks-1-l" value="'. ($l_ilinks_d[0] != "false" ? (int)$l_ilinks_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="links-ilinks-1_g" onclick="colorpick(\'links-ilinks-1_g\')" '. ($l_ilinks_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-1_o" onclick="colorpick(\'links-ilinks-1_o\')" '. ($l_ilinks_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-1_r" onclick="colorpick(\'links-ilinks-1_r\')" '. ($l_ilinks_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="links_ilinks-2-b" value="'. ($l_ilinks_d[1] != "false" ? (int)$l_ilinks_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="links_ilinks-2-l"  value="'. ($l_ilinks_d[2] != "false" ? (int)$l_ilinks_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="links-ilinks-2_g" onclick="colorpick(\'links-ilinks-2_g\')" '. ($l_ilinks_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-2_o" onclick="colorpick(\'links-ilinks-2_o\')" '. ($l_ilinks_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-2_r" onclick="colorpick(\'links-ilinks-2_r\')" '. ($l_ilinks_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_ilinks-3-b"  value="'. ($l_ilinks_d[3] != "false" ? (int)$l_ilinks_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="links_ilinks-3-l"  value="'. ($l_ilinks_d[4] != "false" ? (int)$l_ilinks_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="links-ilinks-3_g" onclick="colorpick(\'links-ilinks-3_g\')" '. ($l_ilinks_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-3_o" onclick="colorpick(\'links-ilinks-3_o\')" '. ($l_ilinks_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-3_r" onclick="colorpick(\'links-ilinks-3_r\')" '. ($l_ilinks_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_ilinks-4-b" value="'. ($l_ilinks_d[5] != "false" ? (int)$l_ilinks_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="links-ilinks-4_g" onclick="colorpick(\'links-ilinks-4_g\')" '. ($l_ilinks_c[3] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-ilinks-4_o" onclick="colorpick(\'links-ilinks-4_o\')" '. ($l_ilinks_c[3] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-ilinks-4_r" onclick="colorpick(\'links-ilinks-4_r\')" '. ($l_ilinks_c[3] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="links_elinks" '. ($l_elinks == "true" ? $checked  :  '') .' onclick="ub30();"> External links Check <i>(Numeric values. 1 = 1 link)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Not Enough:
                 <input type="text" class="smallbox" placeholder="<" id="links_elinks-1-l" value="'. ($l_elinks_d[0] != "false" ? (int)$l_elinks_d[0]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="links-elinks-1_g" onclick="colorpick(\'links-elinks-1_g\')" '. ($l_elinks_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-elinks-1_o" onclick="colorpick(\'links-elinks-1_o\')" '. ($l_elinks_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-1_r" onclick="colorpick(\'links-elinks-1_r\')" '. ($l_elinks_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="links_elinks-2-b"  value="'. ($l_elinks_d[1] != "false" ? (int)$l_elinks_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="links_elinks-2-l"   value="'. ($l_elinks_d[2] != "false" ? (int)$l_elinks_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="links-elinks-2_g" onclick="colorpick(\'links-elinks-2_g\')" '. ($l_elinks_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-elinks-2_o" onclick="colorpick(\'links-elinks-2_o\')" '. ($l_elinks_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-2_r" onclick="colorpick(\'links-elinks-2_r\')" '. ($l_elinks_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_elinks-3-b" value="'. ($l_elinks_d[3] != "false" ? (int)$l_elinks_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="links_elinks-3-l" value="'. ($l_elinks_d[4] != "false" ? (int)$l_elinks_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="links-elinks-3_g" onclick="colorpick(\'links-elinks-3_g\')" '. ($l_elinks_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-elinks-3_o" onclick="colorpick(\'links-elinks-3_o\')" '. ($l_elinks_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-3_r" onclick="colorpick(\'links-elinks-3_r\')" '. ($l_elinks_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="links_elinks-4-b" value="'. ($l_elinks_d[5] != "false" ? (int)$l_elinks_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="links-elinks-4_g" onclick="colorpick(\'links-elinks-4_g\')" '. ($l_elinks_c[3] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="links-elinks-4_o" onclick="colorpick(\'links-elinks-4_o\')" '. ($l_elinks_c[3] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="links-elinks-4_r" onclick="colorpick(\'links-elinks-4_r\')" '. ($l_elinks_c[3] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

               <span class="clabel myoffset2">
                <input type="checkbox" id="links_label" '. ($l_label == "true" ? $checked  :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="links_label_content">'.htmlentities($l_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>

              </div>


                 <!-- USER EXPERIENCE -->


              <div class="tab-content" id="tabs7">

              <div id="eb_ux"></div>

              <h3 class="catind redboy"><i class="icon-adult nostyle"></i> User Experience Checks</h3>


              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_speed" '. ($u_speed == "true" ? $checked  :  '') .' onclick="ub31();"> PageSpeed Check <i>(Numeric values. 1 = 1 point)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Bad:
                 <input type="text" class="smallbox" placeholder="<" id="ux_speed-1-l" value="'. ($u_speed_d[0] != "false" ? (int)$u_speed_d[0]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="ux-speed-1_g" onclick="colorpick(\'ux-speed-1_g\')" '. ($u_speed_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-speed-1_o" onclick="colorpick(\'ux-speed-1_o\')" '. ($u_speed_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-1_r" onclick="colorpick(\'ux-speed-1_r\')" '. ($u_speed_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="ux_speed-2-b" value="'. ($u_speed_d[1] != "false" ? (int)$u_speed_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="ux_speed-2-l"  value="'. ($u_speed_d[2] != "false" ? (int)$u_speed_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="ux-speed-2_g" onclick="colorpick(\'ux-speed-2_g\')" '. ($u_speed_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-speed-2_o" onclick="colorpick(\'ux-speed-2_o\')" '. ($u_speed_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-2_r" onclick="colorpick(\'ux-speed-2_r\')" '. ($u_speed_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>

           <span class="clabel myoffset3">

                <span class="selectors">
                Perfect: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_speed-3-b" value="'. ($u_speed_d[3] != "false" ? (int)$u_speed_d[3]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="ux_speed-3-l" value="'. ($u_speed_d[4] != "false" ? (int)$u_speed_d[4]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="ux-speed-3_g" onclick="colorpick(\'ux-speed-3_g\')" '. ($u_speed_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-speed-3_o" onclick="colorpick(\'ux-speed-3_o\')" '. ($u_speed_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-3_r" onclick="colorpick(\'ux-speed-3_r\')" '. ($u_speed_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>';
/*
            <span class="clabel myoffset3">

                <span class="selectors">
                Bad - Too much: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_speed-4-b" value="'. ($u_speed_d[5] != "false" ? (int)$u_speed_d[5]  :  '') .'" onkeypress="validate(event)" />
                 Color:  
                </span>  
               
                <span id="ux-speed-4_g" onclick="colorpick(\'ux-speed-4_g\')" '. ($u_speed_c[3] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-speed-4_o" onclick="colorpick(\'ux-speed-4_o\')" '. ($u_speed_c[3] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-speed-4_r" onclick="colorpick(\'ux-speed-4_r\')" '. ($u_speed_c[3] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 
*/

            print '<span class="clabel myoffset2">
                <input type="checkbox" id="ux_gram" '. ($u_gram == "true" ? $checked  :  '') .' onclick="ub32();"> Grammar Mistakes Check <i>(Numeric values. 1 = 1 mistake)</i>
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset3">

                <span class="selectors">
                Perfect:
                 <input type="text" class="smallbox" placeholder="<" id="ux_gram-1-l" value="'. ($u_gram_d[0] != "false" ? (int)$u_gram_d[0]  :  '') .'" onkeypress="validate(event)"/> <strong class="bluerboy">&lt;</strong>
                    Color: 
                 </span>  
               
                <span id="ux-gram-1_g" onclick="colorpick(\'ux-gram-1_g\')" '. ($u_gram_c[0] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-gram-1_o" onclick="colorpick(\'ux-gram-1_o\')" '. ($u_gram_c[0] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-1_r" onclick="colorpick(\'ux-gram-1_r\')" '. ($u_gram_c[0] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>  

               <div class="separator"></div>';
              /*
              <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong>
                 <input type="text" class="smallbox" placeholder=">" id="ux_gram-2-b" value="'. ($u_gram_d[1] != "false" ? (int)$u_gram_d[1]  :  '') .'" onkeypress="validate(event)" />  
                <input type="text" class="smallbox" placeholder="<" id="ux_gram-2-l"  value="'. ($u_gram_d[2] != "false" ? (int)$u_gram_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color:  
                </span>  
               
                <span id="ux-gram-2_g" onclick="colorpick(\'ux-gram-2_g\')" '. ($u_gram_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-gram-2_o" onclick="colorpick(\'ux-gram-2_o\')" '. ($u_gram_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-2_r" onclick="colorpick(\'ux-gram-2_r\')" '. ($u_gram_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div>
              */ 
              print '
           <span class="clabel myoffset3">

                <span class="selectors">
                Good: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_gram-3-b" value="'. ($u_gram_d[1] != "false" ? (int)$u_gram_d[1]  :  '') .'" onkeypress="validate(event)" /> 
                <input type="text" class="smallbox" placeholder="<" id="ux_gram-3-l" value="'. ($u_gram_d[2] != "false" ? (int)$u_gram_d[2]  :  '') .'" onkeypress="validate(event)" /> <strong class="bluerboy">&lt;</strong>
                 Color: 
                </span>  
               
                <span id="ux-gram-3_g" onclick="colorpick(\'ux-gram-3_g\')" '. ($u_gram_c[1] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-gram-3_o" onclick="colorpick(\'ux-gram-3_o\')" '. ($u_gram_c[1] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-3_r" onclick="colorpick(\'ux-gram-3_r\')" '. ($u_gram_c[1] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span> 

              <div class="separator"></div>

            <span class="clabel myoffset3">

                <span class="selectors">
                Bad: 
                <strong class="bluerboy">&gt;</strong> 
                <input type="text" class="smallbox" placeholder=">" id="ux_gram-4-b" value="'. ($u_gram_d[3] != "false" ? (int)$u_gram_d[3]  :  '') .'" onkeypress="validate(event)"/>
                 Color:  
                </span>  
               
                <span id="ux-gram-4_g" onclick="colorpick(\'ux-gram-4_g\')" '. ($u_gram_c[2] == "g" ? $style :  '') .' class="label label-success classicpointer">Green</span>
                <span id="ux-gram-4_o" onclick="colorpick(\'ux-gram-4_o\')" '. ($u_gram_c[2] == "o" ? $style :  '') .' class="label label-warning classicpointer">Orange</span>
                <span id="ux-gram-4_r" onclick="colorpick(\'ux-gram-4_r\')" '. ($u_gram_c[2] == "r" ? $style :  '') .' class="label label-important classicpointer">Red</span>

              </span>

              <div class="separator"></div> 

              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_responsive" '. ($u_res == "true" ? $checked  :  '') .' onclick="ub33();"> Responsive Check
              </span> 

              <div class="separator"></div>

              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_feedback" '. ($u_fb == "true" ? $checked  :  '') .' onclick="ub34();"> FeedBack Page Check
              </span> 

              <div class="separator"></div>
             
              <span class="clabel myoffset2">
                <input type="checkbox" id="ux_label" '. ($u_label== "true" ? $checked  :  '') .'> Info & tips:
              </span>
              <br />
              <textarea class="myoffset2 notsobigarea" id="ux_label_content">'.htmlentities($u_label_c,ENT_QUOTES).'</textarea>
              <br />
              <span class="myoffset2"><i>HTML Allowed, but use only double quotes, like <strong>"</strong>, not single quotes, like <strong>\'</strong></i></span>
              

              </div>

              </form>';

              }
              else{
                print '<center><h2>Error: Invalid SEO Profile selected.</h2></center>';
              }



            }
            else{


            $files = scandir('data/profiles');
            unset($files[0],$files[1]);

            $ifiles = array();
            foreach($files as $file){
                $seoProfiles = new IniParser('data/profiles/' . $file);
                $iname    = $seoProfiles->getValue("g_name");
                $idescr   = $seoProfiles->getValue("g_descr");
                $ispb     = $seoProfiles->getValue("g_ispb");
                if($ispb == '1'){
                  $ispb = 'Public';
                }
                else{
                  $ispb = 'Hidden';
                }
                if(strlen($idescr) >= 100){
                  $idescr = substr($idescr, 0,100);
                  $idescr .= '[...]';
                }
                $ifiles[$file] = array($iname,$idescr,$ispb);
            }

            //var_dump($ifiles);

            $count = count($files);


              print '
              <div class="page-header">
              <h2 id="tables">SEO Profiles Manager</h2>
               Currently, there are <span class="bluerboy">'.$count.'</span> profiles. 
              </div>';

              print '<a class="btn btn-primary" href="?q=p&c=a">Add new SEO profile</a>' ;

            if(!file_exists('data/profiles/'. str_replace('"','',$pfile))){
              print '<span style="color:#dd4814">  <i>No default profile was found. Please select one to avoid any errors!</i></span>';
            }

              print '<br /><br />';

               if($count > 0){
                  $pages = floor($count / 10);
                  $r_pages = $count % 10;
                  if($r_pages != 0){
                    $pages++;
                  }

                  $cp = 1; 
                  $i = 0;
                  $p = 0;
                  $x = 1;
                  $t = 0;
                  $c = false;
                  $cc = false;
                  $pagesnr = '<div class="pagination pagination-centered"><ul class="tabs">';

                  foreach(array_reverse($ifiles) as $key => $value){
                    if($i % 10 == 0){
                        print '<div class="tab-content"  id="tabs'.$cp.'">
                          <table class="table table-bordered table-striped c-border">
                              <thead>
                                <tr>
                                  <th>#</th>
                                  <th>File name</th>
                                  <th>Name</th>
                                  <th>Description</th>
                                  <th>Is Public</th>
                                  <th>Actions</th>
                                </tr>
                              </thead>
                              <tbody>';
                        
                        if($cp == 1){
                          $pagesnr .= '<a ><button href="#" class="defaulttab btn btn-primary"  rel="tabs'.$cp.'">'.$cp.'</button></a>&nbsp;';
                        }
                        else{
                          $pagesnr .= '<a ><button href="#"  class="btn btn-primary" rel="tabs'.$cp.'">'.$cp.'</button></a>&nbsp;';
                        }
                        $t = 1;
                          
                          $p = $p + 10;
                          $n = $pages * 10 - $p;
                          if($n == 0){
                          if($c != true){
                            if($cp == $pages){
                              $c = true;
                              $cc = true;
                            }
                          }
                        }
                      }


                     print '<tr id="'.$key.'">
                     <td>'. ($i+1) .'</td>
                     <td>'.$key.'</td>
                     <td>'.htmlentities($value[0],ENT_QUOTES).'</td>
                     <td>'.htmlentities($value[1],ENT_QUOTES).'</td>
                     <td>'.htmlentities($value[2],ENT_QUOTES).'</td>
                     <td><i><span class="link-edit"><a href="?q=p&e='.$key.'" class="classicpointer"> Edit</a></span> - <span class="log-out"><a class="classicpointer" onclick="delsp('.  chr(047) . $key . chr(047) .')"> Delete</a></span></i> <i>'. ($key == $pfile ? '(Default Profile)' :  '') .'</i> </td>
                     </tr>';


                      if($t == 10){
                        print ' </tbody>
                            </table></div>';
                        $cp++;
                      }

                      if($cc == true){
                        if($x == $r_pages){
                          print ' </tbody>
                            </table></div>';
                        }
                        $x++;
                      }

                      $t++;
                      $i++;

                  }

                  $pagesnr .= '</ul></div>';
                  print $pagesnr;
                }
                else{

                  print '<h2> There are no profiles yet. </h2>';
                }

          }

          }
          elseif($q == 'a'){
            
              #
              # Ads and Analytics
              #

              print '
              <div class="page-header">
                    <h2 id="tables">Ads and Analytics</h2>
                    If you don`t want ads or analytics, just leave these fields empty.
                  </div>
              ';

          //Processing area

            if(isset($_POST['check'])){

              $lang    = $objIni->getValue("lang");
              
              if(isset($_POST['ad1'])){
                $ad_code = str_replace('"',"'",$_POST['ad1']);
              }
              else{
                $ad1 = '';
              }
              if(isset($_POST['analytics'])){
                $anal_code = str_replace("'",'"',$_POST['analytics']);
              }
              else{
                $analytics = '';
              }
                $objIni->setValue('name', trim('"'. $name) . '"' );
                $objIni->setValue('slogan', trim('"'.$slogan). '"');
                $objIni->setValue('meta_desc', trim('"'.$meta_desc). '"');
                $objIni->setValue('main_text', trim('"'.$main_text). '"');
                $objIni->setValue('ad_code', trim('"'. $ad_code) . '"' );
                $objIni->setValue('analytics_code', trim("'".$anal_code). "'");
                $objIni->setValue('skin', trim($skin));
                $objIni->setValue('lang', trim($lang));
                $objIni->setValue('is_pb', $is_pb);
                $objIni->setValue('incl_sp', $incl_sp);
                $objIni->setValue('incl_kw', $incl_kw);
                $objIni->setValue('incl_pdf', trim($incl_pdf));
                $objIni->saveFile();


                print '
                  <div class="col-lg-12">
                    <div class="alert alert-dismissable alert-success">
                       <strong>Success:</strong> Settings has been saved.
                     </div>
                   </div>
                ';

            }

           $ad           = htmlentities(str_replace('"','',$objIni->getValue("ad_code")),ENT_QUOTES);
           $analytics    = htmlentities(str_replace("'",'',$objIni->getValue("analytics_code")),ENT_QUOTES);

           print '
           <form action="?q=a" method="post" class="col-lg-12">
           <input type="hidden" name="check" />
           <h3 class="catind"><i class="icon-align-justify nostyle"></i> Ads code</h3>
           <br />

            <div class="form-group">
           <label for="ad1">Ad code</label>
           <textarea name="ad1" class="form-control" id="ad1" >'. $ad .'</textarea>
           Top of the page (Under the navigation bar). Recommended ad: Display ad - Leaderboard (728 x 90)
           </div>

           

          <h3 class="catind"><i class="icon-signal nostyle"></i> Analytics code</h3>
          <br />


           <div class="form-group">
          <label for="analytics">Analytics code</label>
          <textarea name="analytics" class="form-control" id="analytics" >'. $analytics .'</textarea>
          The code will pe placed in the '.htmlentities("<head>").' section of your site.
          </div>

          <input type="submit" class="btn btn-primary" value="Save Settings" />

          </form>

          ';

              #
              # End of Ads and Analytics
              #

          }
          elseif($q == 'e'){
            session_destroy();
            print '<center>
            <h2>You will now be logged out.</h2>
            <a href="'.$_SERVER["PHP_SELF"].'">Click here if your browser doesn`t refresh.</a>
            <meta http-equiv="refresh" content="2">
            </center>';
          }
          elseif($q == 'st'){
            print '<div class="page-header">
                    <h2 id="tables">Framework Statistics</h2>
                    Here, you can see different statistics about your installation.
                  </div>';

                  //grabbign some statiscs

                  $data = get('http://qwebdev.eu/sstats/?p=1');
                  $l_v = trim($data);
                  $c_v = $script_version;
                  $nr_sites = count(file('data/sites.txt'));
                  $nr_pfiles = count(scandir('data/profiles/')) - 2;

                  if (version_compare($l_v, $c_v, "==") || version_compare($l_v, $c_v, "<=")) { 
                     print '<div class="alert alert-info" style="padding: 8px 35px 8px 14px; background-color: rgb(217, 237, 247); border: 1px solid rgb(188, 232, 241); color: rgb(58, 135, 173);">
                              <strong>Message:</strong> 
                              Your installation is up to date.
                     </div>';
                  }
                  else{
                   print '<div class="alert alert-info ared">
                              <strong>Message:</strong> 
                              Your installation is not up to date. Visit CodeCanyon, download an install the latest version for the best experience.
                     </div>';
                  }
                 print '

                  <table>
                  <tbody>

                  <tr>
                  <td>Your version&nbsp;&nbsp;</td>
                  <td>'.$c_v.'</td>
                  </tr>


                  <tr>
                  <td>Latest version&nbsp;&nbsp;</td>
                  <td>'.$l_v.'</td>
                  </tr>

                  <tr>
                  <td>Sites analysed&nbsp;&nbsp;</td>
                  <td>'.$nr_sites.'</td>
                  </tr>

                  <tr>
                  <td>Number of profiles&nbsp;&nbsp;</td>
                  <td>'.$nr_pfiles.'</td>
                  </tr>  


                  </tbody>
                  </table>

                  ';
          }
        }
        else{
          print '
          <center>
            <h2>Hey, and welcome to the admin panel!</h2>
            Start using it by clicking on the menu above to customise and optimise your site.<br />
            If you want to go to the front page, you can click <a class="bluerboy" href="index.php">HERE</a>.
          </center>';
        }


      }
      else{

          #
          # User not logged in
          #

         print '
          <center>
           <h1>Login</h1>
           <form action="'. $_SERVER['PHP_SELF'] .'" method="post">
           <input type="hidden" name="check" />
           <div class="form-group">
           <label class="sr-only" for="user">Username</label>
           <input type="text" class="form-control" id="user" placeholder="Username" name="user">
           </div>
           <div class="form-group">
           <label class="sr-only" for="pass">Password</label>
           <input type="password" class="form-control" id="pass" placeholder="Password" name="pass">
           </div>
           <button type="submit" class="btn btn-primary">Sign in</button>
           </form>
           </center>
           <br />';

        
        if(isset($_POST['check'])){

          //If the login form has been submited

          if(!empty($_POST['user']) && !empty($_POST['pass'])){

            $s_user = trim($_POST['user']);
            $s_pass = trim($_POST['pass']);

            if($s_user == $user && $s_pass == $pass ){
              print '
              <div class="col-lg-12">
              <div class="alert alert-dismissable alert-success">
                       <strong>Login Successful</strong> You will now be redirected. <a href="'.$_SERVER["PHP_SELF"].'">Click here</a> for manual redirect.
                     </div>
                     <meta http-equiv="refresh" content="2">
                     </div>
                ';
                $_SESSION['admin'] = $user;
            }
            else{
                 print '
                <div class="col-lg-12">
                <div class="alert alert-dismissable alert-danger"> 
                <strong>Error:</strong> Username and password didn`t matched.
                </div>
                </div>
                ';
            }

          }
          else{

            //If the user & pass fields were not submited

            print '
                <div class="col-lg-12">
                <div class="alert alert-dismissable alert-danger">
                <strong>Error:</strong> Please fill both fields before you try to submit.
                </div>
                </div>
                ';
          }
        }
      }


      ?>


      </div>

    </div>



    </div>
    <br/><br/>
    <div class="corgi_footer">
      <div class="container">
        <div class="row">
          <div class="span12">
              <div class="footertext pull-left">
              SEO Monster 2 (v.<?php print $script_version; ?>)
              </div>
              <div class="footertext pull-right">
              All rights reserved © <a href="http://codecanyon.net/user/ic0de/portfolio">icode</a> 2013
              </div>
          </div>
        </div>
      </div>
    </div>
    <!-- Le javascript
    ================================================== -->
   <script src="js/bootstrap.js"></script>
  </body>
</html>
