<?php

defined('WikyBlog') or die("Not an entry point...");


class share{
	function share(){
		global $page,$serverName4,$dbObject,$langA;
		ob_start();
		
		$shareUrl = urlencode($serverName4.$dbObject->uniqLink);
		$title = urlencode($page->displayTitle);
		$page->displayTitle = $langA['share'].' > '.$page->displayTitle;
		$link = $page->regLink($langA['share'], '/Edit'.$dbObject->uniqLink.'?cmd=share');
		
		/*
		smarking
		
		*/
		
		echo '<style> .share td{width:10em;padding:2em;white-space:nowrap;}</style>';
		echo '<table class="share" style="margin-right:auto;margin-left:auto">';
		//del.icio.us
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/delicious.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://del.icio.us/post?url='.$shareUrl.'&title='.$title.'">';
			echo 'del.icio.us';
			echo '</a>';
			echo '</td>';
		
		
		//technorati
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/technorati.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://technorati.com/cosmos/search.html?url='.$shareUrl.'">';
			echo 'Technorati';
			echo '</a>';
			echo '</td>';
		
		//Digg
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/digg.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://digg.com/submit?phase=2&url='.$shareUrl.'&title='.$title.'">';
			echo 'Digg';
			echo '</a>';
			echo '</td>';
			
		echo '</tr><tr>';
			
		//reddit
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/reddit.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo ' <a target="_blank" href="http://reddit.com/submit?url='.$shareUrl.'&title='.$title.'">';
			echo 'Reddit';
			echo '</a>';
			echo '</td>';
		
		//Newsvine
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/newsvine.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo ' <a target="_blank" href="http://www.newsvine.com/_tools/seed&save?popoff=0&u='.$shareUrl.'">';
			echo 'Seed Newsvine';
			echo '</a>';
			echo '</td>';
			
		//blinklist
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/blinklist.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://blinklist.com/index.php?Action=Blink/addblink.php&Description='.$title.'&URL='.$shareUrl.'">';
			echo 'BlinkList';
			echo '</a>';
			echo '</td>';
			
		echo '</tr><tr>';
	
		//furl
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/furl.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://furl.net/storeIt.jsp?t='.$title.'&u='.$shareUrl.'">';
			echo 'Furl';
			echo '</a>';
			echo '</td>';
			
		//Fark	
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/fark.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo ' <a target="_blank" href="http://cgi.fark.com/cgi/fark/edit.pl?new_url='.$shareUrl.'&new_comment='.$title.'">';
			echo 'Fark';
			echo '</a>';
			echo '</td>';
		
		//Simpy	
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/simpy.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://simpy.com/simpy/LinkAdd.do?title='.$title.'&href='.$shareUrl.'">';
			echo 'Simpy';
			echo '</a>';
			echo '</td>';
			
		echo '</tr><tr>';
		
		//Spurl
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/spurl.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://www.spurl.net/spurl.php?url='.$shareUrl.'&title='.$title.'">';
			echo 'Spurl';
			echo '</a>';
			echo '</td>';
			
		//Facebook
			echo '<td>';
			echo '<img src="http://www.facebook.com/images/share/facebook_share_icon.gif" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://www.facebook.com/sharer.php?u='.$shareUrl.'&t='.$title.'">';
			echo 'Facebook';
			echo '</a>';
			echo '</td>';

		//ma.gnolia
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/magnolia.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://ma.gnolia.com/bookmarklet/add?url='.$shareUrl.'&title='.$title.'">';
			echo 'ma.gnolia';
			echo '</a>';
			echo '</td>';
					
		echo '</tr><tr>';
					
		//Blogmarks
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/blogmarks.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://blogmarks.net/my/new.php?title='.$title.'&url='.$shareUrl.'">';
			echo 'Blogmarks';
			echo '</a>';
			echo '</td>';
			
		//google
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/google_bmarks.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk='.$shareUrl.'&title='.$title.'">';
			echo 'Google';
			echo '</a>';
			echo '</td>';
			
		//Yahoo
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/yahoomyweb.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://myweb.yahoo.com/myresults/bookmarklet?t='.$title.'&u='.$shareUrl.'">';
			echo 'Yahoo';
			echo '</a>';
			echo '</td>';
			
		echo '</tr><tr>';
		
		//Smarking
			echo '<td>';
			echo '<img src="'.wbLinks::getDir('/imgs/social/smarking.gif').'" border="0" width="16" height="16" style="vertical-align:middle" /> ';
			echo '<a target="_blank" href="http://smarking.com/editbookmark/?url='.$shareUrl.'">';
			echo 'Smarking';
			echo '</a>';
			echo '</td>';
			
		echo '</table>';
		
		$page->contentB[$link] = wb::get_clean();
	}
}

new share();
	