Click here to Skip to main content
13,144,958 members (53,214 online)
Click here to Skip to main content

Stats

105.5K views
17.9K downloads
117 bookmarked
Posted 19 Mar 2013

Making a Search Engine

, 3 May 2013
This article discusses the making of a search engine.
<?
class headercode{
public function  getCode($name1){
   $gen = array(0 => array('name' => 'Home', "url" => 'index.php')
             ,1 => array('name' => 'Image Search', "url" => '#')
			 ,2 => array('name' => 'Crawler Status', "url" => 'crwlrst.php')
			 ,3 => array('name' => 'Add your web site', "url" => 'add.php')
			 );
	 $acc = array(0 => array('name' => 'Device', "url" => 'login_device.php')
                 ,1 => array('name' => 'Manage', "url" => '')
			 );
    // Create Menu
    echo '<table class=navbar cellpadding=0>';
    echo '<tr style="background-color: #0C0C0C;" >';		 
     foreach ($gen as $i => $value) { 
     	if($name1==$value['name'])
     	{
	     echo '<td class=navlst><a href="'.$value['url'].'" class="navitm" style="background-color: rgba(20, 102, 104, 0.88);">'.$value['name'].'</a></td>';
	    }
	    else 
     	{
     	echo '<td class=navlst><a href="'.$value['url'].'" class="navitm">'.$value['name'].'</a></td>';
       }
    }
     echo '</tr>';
    echo '</table>';
	}
public function  getCodeL($name1){
   $gen = array(0 => array('name' => 'Home', "url" => 'index.php')
             ,1 => array('name' => 'Download', "url" => 'download.php')
			 ,2 => array('name' => 'Licence', "url" => 'licence.php')
			 ,3 => array('name' => 'Forum', "url" => 'forum.php')
			 ,4 => array('name' => 'Support', "url" => 'support.php')
			 ,5 => array('name' => 'Contact us', "url" => 'contact_us.php')
			 ,6 => array('name' => 'Screenshot', "url" => 'screenshot.php')
			 ,7 => array('name' => 'Login', "url" => 'login_u.php')
			 );
	 $acc = array(0 => array('name' => 'Device', "url" => 'login_device.php')
                 ,1 => array('name' => 'Manage', "url" => '')
			 );
    // Create Menu
    echo '<table class=navbar cellpadding=0>';
    echo '<tr style="background-color: #0C0C0C;" >';		 
     foreach ($gen as $i => $value) { 
     	if($value['name']=='Login')
     	{
	     echo '<td class=navlst><a href="'.$value['url'].'" class="navitm" style="background-color: rgba(20, 102, 104, 0.88);">'.$value['name'].'</a></td>';
	    }
	    else 
     	{
     	echo '<td class=navlst><a href="'.$value['url'].'" class="navitm">'.$value['name'].'</a></td>';
       }
     }
     echo '</tr>';
     echo '<tr style="background-color: rgba(20, 102, 104, 0.88)">';
      foreach ($acc as $i => $value1) { 	
	    if($value1['name']==$name1)
         {echo '<td><a href="'.$value1['url'].'" class="navitm_s" style="background-color: rgba(0, 177, 127, 0.95);color:white;" >'.$value1['name'].'</a></td>'; }
        else
         {echo '<td><a href="'.$value1['url'].'" class="navitm_s">'.$value1['name'].'</a></td>'; }		
     }
     if (sizeof($gen)>sizeof($acc))
     {
     $diff=sizeof($gen)-sizeof($acc);
      for($i = 0; $i < $diff; ++$i)
     {
        echo '<td></td>';
     }

    }
     echo '</tr>';
     
    echo '</table>';
	}
}
?>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

kburman6
Student
India India
I just love coding. But due to my studies it became very tough for me to manage both.

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170915.1 | Last Updated 4 May 2013
Article Copyright 2013 by kburman6
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid