/* Atul Bhat : Website Terminal code. /* Author: Atul Bhat/* Website: http://atulbhats.com/* Updated: January 2016/* DO NOT ADD SINGLE LINE COMMENTS WITH double slashes !!!!! PHP will make the whole file a comment. Always use /* */ function getweather($loc){$data="op=weather&loc="+$loc;$clloc=$loc.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="Weather for "+$loc+" returned no result. Please check the location and try again."; } $('.weather'+$clloc).html(e); showdefault(); }, error: function(){ $('.weather'+$clloc).html('Weather not available due to some tech error. Please try again. Sorry.'); showdefault(); } });}function getnews($topic){$data="op=news&topic="+$topic;$clloc=$topic.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="News about "+$topic+" returned no result. Please try again. after a while"; } $('.news'+$clloc).html(e); $('#defaultline').show(); }, error: function(){ $('.news'+$clloc).html('News not available due to some tech error. Please try again. Sorry.'); $('#defaultline').show(); } }); $('body').scrollTop("+100px");}function ping($site){$clloc=$site.replace('.','');$clloc=$clloc.replace('-','');$('.ping'+$clloc).html("");http_ping($site,$clloc);}function convertmoney($str){$data="op=cur&str="+$str;$clloc=$str.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="No meaning of "+$wrd+" found. Try googling \"define "+$wrd+"\" "; } $('.currency'+$clloc).html(e); showdefault(); }, error: function(){ $('.meaning'+$clloc).html('Meaning not available due to some tech error. Please try again. Sorry.'); showdefault(); } });}function getmeaning($wrd){$data="op=dic&wrd="+$wrd;$clloc=$wrd.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="No meaning of "+$wrd+" found. Try googling \"define "+$wrd+"\" "; } $('.meaning'+$clloc).html(e); showdefault(); }, error: function(){ $('.meaning'+$clloc).html('Meaning not available due to some tech error. Please try again. Sorry.'); showdefault(); } });}function getthesaurus($wrd){$data="op=thes&wrd="+$wrd;$clloc=$wrd.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="No thesaurus of "+$wrd+" found. Try googling \"thesaurus "+$wrd+"\" "; } $('.thesaurus'+$clloc).html(e); showdefault(); }, error: function(){ $('.thesaurus'+$clloc).html('Thesaurus not available due to some tech error. Please try again. Sorry.'); showdefault(); } });}function getslang($wrd){$data="op=urban&wrd="+$wrd;$clloc=$wrd.replace(/\s/g,'');$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="No meaning of "+$wrd+" found. Try googling \"define "+$wrd+"\" "; } $('.urban'+$clloc).html(e); showdefault(); }, error: function(){ $('.urban'+$clloc).html('Meaning not available due to some tech error. Please try again. Sorry.'); showdefault(); } });}function getcomic(which){$which=which.replace(/\s/g,"");$data="op=comic&n="+which;$.ajax({ type: "POST", url: "/terminal/apis.php", data: $data, success: function(e) { if($.trim(e)==""){ e="No Comic Found"; } $('.comic'+$which).html(""+e+""); if(which=='calvin'){ $link='http://www.gocomics.com/calvinandhobbes/'; } if(which=='channelate'){ $link='http://www.channelate.com/'; } if(which=='cyanide'){ $link='http://explosm.net/'; } showdefault(); }, error: function(){ $('.cnh').html('Connection Error. Try again.'); showdefault(); } });}function getascii(){$.ajax({ type: "POST", async: "true", url: "/terminal/ascii.php", success: function(e) { $('.ascii').css('font-size','8px'); $('.ascii').html(e); showdefault(); }, error: function(){ $('.ascii').html('Ascii Could Not be Loaded Now. Please check Connection and Try Later'); showdefault(); }});}function showdefault(){$('#defaultline').show(); setTimeout(function(){ $(document).scrollTop($(document).height()); },1000);}function hidedefault(){$('#defaultline').hide();}function skipintro($type){$intro_run=0;$introstop=true;$('#introdiv').html("");clearInterval($type);$p==$intro.length;$intro=$intro.replace(/#/gi,'
');$intro=$intro.replace(/\/BGui/gi,'gui');$intro=$intro.replace(/\/BHelp/gi,'help');$intro=$intro.replace(/\/BTer/gi,'terminal');$like=$like.replace(/\/BMsg/gi,'message');$intro=$intro.replace(/CPY/gi,''+$like+' ©'+$copy+'');$intro=$intro.replace('GUI','Click Here');$('#introdiv').html($intro);$('#defaultline').show();clearInterval($type);$('#defaultline').before('
welcome_bot@atulbhats : ~$ '+$salute+'
');}$(document).ready(function(){$('#introdiv').html('');$time=new Date();$time_hours=$time.getHours();$time_mins=$time.getMinutes();if($time_hours>15 && $time_mins>00){$salute="Evening";}else if($time_hours>12 && $time_mins>00){$salute="Afternoon";}else if($time_hours>00 && $time_mins>00){$salute="Morning";}else{$salute="Day";}$salute="Good "+$salute; $z=0;$x=0;$('#actualinput').focus();$('#defaultline').hide();$('.cursor').css('background','rgb(238, 238, 238)');$link="";$p=0; /*intro counter*/$msg=0;$asciia=0;$msgcmd=0;$sendact=0;$clr=0;$save=0;/*# : br^ : bold open%: copyright~ : bold close*/$like="The site code is open source and you can use 'git' command to access it. If you like / '!like' the design, you can use the 'feedback' command.
";$copy=" "+year+" AtulBhatS - terminal version."; /* Hey you Code Reader. You may Steal the Idea. Copy the code. But dont steal the code */$logged="PS: You Are Logged in as "+ip+" And that\'s your login name.";$intro="#";$intro="Welcome to atulbhats.com |"+" Designed like a terminal to add more interaction with user."+" If terminal is not your thing, use the command '/BGui' to move to a graphical interface."+" To continue with terminal, start with '/BHelp'."+" If you love terminals or this design, use the '/BTer' command. #If you do not have a working keyboard, GUI#CPY";$help="
Interface Commands
lsLists out Available Commands
bioDisplays my bio
dobHints my Date of Birth
socialShows Social Links Commands
thoughts To go to my blog [built from scratch] (blog or cd thoughts commands will also work).
thoughtsTerminal To go to my blog [with terminal interface] (blogTerminal or cd thoughtsTerminal commands will also work).
captures To view a gallery of images I clicked (photography or photos commands will also work).
emailDisplays Email Address
messageActivates Message Sending Options (ping and msg commands will also work).
feedbackActivates Feedback Sending Options.
asciiDisplays an ASCII art.
picFor Those of you who haven't met me, This command opens my facebook dp in a new tab
visitTakes you to the previously loaded Link in a new tab.
guiTakes you to a webpage with graphical user interface
clsClear Screen. (clr will also work).
dirAvailable Directories.
projectsOpens AtulBhatS Projects Page.
userIdentifies the User
physics To know my interest in physics (phy command will also work).
paste Check out the PasteBin on my domain You might find something interesting there. Typing ctrl+v also works for the same.
googlesearches google (encrypted) for a query that follows the command. eg: google atul bhat
searchsearches duckduckgo for a query that follows the command. eg: search atul bhat
wikisearches wikipedia for a query that follows the command. eg: wiki atul bhat
definedisplays the meaning of a word. eg: define website
weatherdisplays the weather at a place. eg: weather new york
locatesearches for a place on map. eg: locate new york
cyanide and happinessLoads the comic of the day at Cyanide and Happiness! Yes, I love these comics.
privacyDisplays the site's privacy statement.
exitExits Terminal
"+"";$intro_run=1;$type=setInterval(function(){writeintro(); },15);function writeintro(){$html=$('#introdiv').html();if($p<$intro.length-1 && $intro_run==1){if($intro[$p]=='#') $('#introdiv').html($html+'
');/*else if($intro[$p]=='^') $('#introdiv').html($html+'');else if($intro[$p]=='~') $('#introdiv').html($html+'');*/else if($intro[$p]=='%') $('#introdiv').html($html+'©');else if($intro[$p]=='*') $('#introdiv').html($html+'');else if($intro[$p]=='/' && $intro[$p+1]=='B' && $intro[$p+2]=='G' && $intro[$p+3]=='u' && $intro[$p+4]=='i'){$('#introdiv').html($html+'gui');$p=$p+4;}else if($intro[$p]=='/' && $intro[$p+1]=='B' && $intro[$p+2]=='P' && $intro[$p+3]=='r' && $intro[$p+4]=='i'){$('#introdiv').html($html+'privacy');$p=$p+4;}else if($intro[$p]=='/' && $intro[$p+1]=='B' && $intro[$p+2]=='H' && $intro[$p+3]=='e' && $intro[$p+4]=='l' && $intro[$p+5]=='p' ){$('#introdiv').html($html+'help');$p=$p+5;} else if($intro[$p]=='/' && $intro[$p+1]=='B' && $intro[$p+2]=='T' && $intro[$p+3]=='e' && $intro[$p+4]=='r'){$('#introdiv').html($html+'terminal');$p=$p+4;} /*else if($intro[$p]=='/' && $intro[$p+1]=='B' && $intro[$p+2]=='G' && $intro[$p+3]=='i' && $intro[$p+4]=='t'){$('#introdiv').html($html+'git');$p=$p+4;} */else if($intro[$p]=='C' && $intro[$p+1]=='P' && $intro[$p+2]=='Y'){$('#introdiv').html($html+''+$like+' ©'+$copy+'');$p=$p+2;} else if($intro[$p]=='G' && $intro[$p+1]=='U' && $intro[$p+2]=='I'){$('#introdiv').html($html+'Click Here');$p=$p+2;} else {$('#introdiv').html($html+$intro[$p]);}}else if($p>=$intro.length-1){clearInterval($type);$intro_run=0;$('#defaultline').show();$loadedintro=$('#introdiv').html();$loadedintro=$loadedintro.replace(/\^/g,'');$loadedintro=$loadedintro.replace(/~/g,'');$('#introdiv').html($loadedintro);$('#defaultline').before('
welcome_bot@atulbhats : ~$ '+$salute+'
');}$p++;}function sendmsg(){$data="username="+$name+"&useremail="+$email+"&userphone="+$phone+"&usermessage="+$message+"&bot1=imnotabot&bot2=imahuman&antibot1=&antibot2=";$.ajax({ type: "POST", url: "/terminal/sendmail.php", data: $data, success: function() { $html="
Success! Dear "+$name+" your message has been sent successfully. Thank you :) I will contact you asap. Have a nice time."; $('#defaultline').before('
');$('#line'+$l).html($html);$('#commandcontainer').text("");$('#actualinput').val("");$l++; }, error: function(){ $html="
Aw Crap!
Sorry "+$name+", Due to some technical Issue your message sending failed :(
Please Try again, or use the GUI interface by using 'gui' command if typing commands is tedious.
Sorry."; $('#defaultline').before('
');$('#line'+$l).html($html);$('#commandcontainer').text("");$('#actualinput').val("");$l++; } });}function savecommand(command,type){$.ajax({ type: "POST", url: "/commands/newcommand.php", data: 'c='+command+'&t='+type, success :function(){ } });}function destroy(){$z=4;setInterval(function(){$('#dest').text($z);$z--;if($z==-2){window.open('about:blank','_self');}},1000);}setInterval(function(){blinkcursor();},560);function blinkcursor(){$bg=$('.cursor').css('background-color');if($bg=='rgb(238, 238, 238)'){$('.cursor').css('background-color','transparent');}else $('.cursor').css('background-color','rgb(238, 238, 238)');}$l=0;var $history=new Array();var $cmdarray=new Array('help','cls','gui','user','ascii','pic','bio','dob','email','social','message','dir','projects','physics','phy','paste','ctrl+v','exit','fb','in','tw','g+','ig','be','visit','first','gui','ip','color','cipher','2012','2013','2014','2015','terminal','captures','thoughts','blog');function runcommand($command){/*addcommand();*/unnull();rehistory($command);$history[$z]=$command;$z++;$x=$z;$command=$command.toLowerCase();var nameReg = /^[a-zA-Z0-9\s\+\-]+$/; var numReg = /^[0-9\+\-]+$/; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var googleReg = /^google [A-Za-z0-9\s]+$/; var searchReg = /^search [A-Za-z0-9\s]+$/; var wikiReg = /^wiki [A-Za-z0-9\s]+$/; var weatherReg = /^weather [A-Za-z0-9\s]+$/; var newsReg = /^news [A-Za-z0-9\s]+$/; var locateReg = /^locate [A-Za-z0-9\s]+$/; var defineReg = /^define [A-Za-z0-9\s]+$/; var thesaurusReg = /^thesaurus [A-Za-z0-9\s]+$/; var urbanReg=/^define -u [A-Za-z0-9\s]+$/; var pingReg = /^ping [A-Za-z0-9\.\/\w-]+$/; var openReg = /^open [A-Za-z0-9\.\/\-\?\#\~\+\_\w-]+$/; var currencyReg = /^currency [A-Za-z0-9\s\.\/\-\?\#\~\+\_\w-]+$/; var comicReg = /^comic [A-Za-z0-9\s\.\/\-\?\#\~\+\_\w-]+$/; var wiki="wiki"; var google="google"; var weather="weather"; var news="news";if($command=='cancelsending'){ $command2='Cancelled'; $msg=0; $msgcmd=0;}else $command2=$command;$('#defaultline').before('
'+ip+'@atulbhats : ~$ '+$command2+'
');if($command=='exit'){$html="The Site Will Self Destruct in 5";hidedefault();destroy();}else if($msg==0){if($command.trim()=="search"){$html="Search is a features wherein you can search something directly from this website.
"+"Currently you can Use:
google keyword : search the keyword in google (encrypted.google.com). eg:google atul bhat"+"
wiki keyword : search the keyword in wikipedia. eg:wiki atul bhat"+"
weather location : get the current weather conditions for a place (Yahoo weather). eg:weather antarctica"+"
define keyword : get the meaning of a word from Merriam Webster a.k.a dictionary. eg: define big bang"+"
locate keyword : locate a place on map (Google Maps). eg:wiki atlantis";}else if($command.trim()=="google"){$html="No Query Entered. Taking you to Google...";}else if(googleReg.test($command)){$qry = $command.substr(7);$html="Searching Google for \""+$qry+"\" ...";}else if($command.trim()=="search"){$html="No Query Entered. Taking you to Duckduckgo...";}else if(searchReg.test($command)){$qry = $command.substr(7);$html="Searching Duckduckgo for \""+$qry+"\" ...";}else if($command.trim()=="wiki"){$html="No Query Entered. Taking you to Wikipedia...";}else if(wikiReg.test($command)){$qry = $command.substr(5);$html="Searching Wikiwand (the better wikipedia) for \""+$qry+"\" ...";}else if($command.trim()=="locate"){$html="No Place specified. Please Enter a Location after the keyword and a space.";}else if(locateReg.test($command)){$qry = $command.substr(7);$html="Locating \""+$qry+"\" on google maps ...";}else if($command.trim()=="news"){$qry="gen";$clqry="gen";$html='
Loading News... This may take some while.
';}else if(newsReg.test($command)){$qry= $command.substr(5);$clqry=$qry.replace(/\s/g,'');$html='
Loading '+$qry+' News...
';}else if($command.trim()=="weather"){$html="No Location specified. Please Enter a Location after the keyword and a space.";}else if(weatherReg.test($command)){$qry= $command.substr(8);$clqry=$qry.replace(/\s/g,'');$html='
Loading Weather...
';}else if($command.trim()=="comic"){$html="No Comic specified.";}else if(comicReg.test($command)){$qry= $command.substr(6);$clqry=$qry.replace(/\s/g,'');$html='
Loading Comic...
';}else if($command.trim()=="currency"){$html="No Currency specifed. Try again with currencies mentioned to convert.";}else if(currencyReg.test($command)){$qry= $command.substr(9);$clqry=$qry.replace(/\s/g,'');$html='
Loading Rates...
';}else if($command.trim()=="define -u"){$html="Word not entered. Please Enter a word to find its dictionary meaning.";}else if(urbanReg.test($command)){$qry= $command.substr(10);$clqry=$qry.replace(/\s/g,'');$html='
Loading the Slang Meanings for '+$qry+'...
';}else if($command.trim()=="define"){$html="Word not entered. Please Enter a word to find its dictionary meaning.";}else if(defineReg.test($command)){$qry= $command.substr(7);$clqry=$qry.replace(/\s/g,'');$html='
Loading the Meanings for '+$qry+'...
';}else if($command.trim()=="thesaurus"){$html="Word not entered. Please Enter a word to find its Thesaurus.";}else if(thesaurusReg.test($command)){$qry= $command.substr(10);$clqry=$qry.replace(/\s/g,'');$html='
Loading the Thesaurus for '+$qry+'...
';}else if($command.trim()=="open"){$html="No URL Entered. Try Again.";}else if(openReg.test($command)){$address= $command.substr(5);switch($address){case 'facebook':case 'fb': $address="http://facebook.com";break;case 'gmail': $address="http://gmail.com";break;case 'mail': $address="http://e.atulbhats.com";break;case 'yt':case 'youtube': $address="http://youtube.com";break;case 'captures': $address="http://atulbhats.com/captures";break;default: $address="http://"+$address;break;}$html='Opening '+$address+'...';}else if($command.trim()=="ping"){$html="Ping address not specified. specify a website to ping.";$html="Ping feature is on the way.";}/*else if(pingReg.test($command)){$qry= $command.substr(5);$clqry=$qry.replace(/\s/g,'');$html='
';}else if($command.indexOf('ping') && !(pingReg.test($command))){$html="Invalid address for ping request. Check the address";}*/else{switch($command){case 'hi':case 'hello':$html=$command+" to you too! Please type help and hit enter for info on commands. For just the list, type ls";break;case 'hola':$html="Hola! ¿Como estas? ¿Hablo Engles? Por favor, escribe help y pulsa enter para obtener información sobre los comandos. Por tan sólo la lista, escriba ls ";break;case 'ls':$html="Available Commands
";break;case 'bio':$html="I am someone who juggles between physics, web design, blogging and web browsing. And when I'm not doing any of these, I work on ambigrams, work magic with photoshop, watch TV series etc. When I watch a movie, I write my thoughts about it on my blog..";break;case 'physics':case 'phy':$html="Physics as I see is mathematics with a story, Its the understanding of the universe where variables and numbers leading to equations are the sentences.
My interest came in physics back when i was pursuing my bachelor degree in science with physics, maths and comp. sci as major subjects. Now i continue this path and am working to be a theoretical physicist with interests in cosmology and string theory.";break;case 'user':$html="The only info I have is you are "+ip+", and that's the most I can find out about you. Anyways thanks for visiting";break;case 'social':$html="Choose any of the Below Commands to socialize
fb\t\t:Facebook Timeline
g+\t\t:Google+ Page
tw\t\t:Twitter Profile
in\t\t:LinkedIn Profile
ig\t\t:Instagram Photos
be\t\t:Behance - Portfolio
skype\t\t:Skype caller id
git\t\tMy Github profile";break;case 'help':$html=$help;break;case 'git':$html="http://github.com/atulbhats
The usual github link with '/atulbhats' at the end. Add '/atulbhats.com-terminal-version' to view this site's code repository.
use 'visit' to open the link";$link="http://github.com/atulbhats";break;case 'fb':$html="http://facebook.com/atulbhats
The usual facebook link with '/atulbhats' at the end
use 'visit' to open the link";$link="http://facebook.com/atulbhats";break;case 'g+':$html="http://plus.google.com/+AtulBhat
The usual Google Plus link with '/+AtulBhat' at the end
use 'visit' to open the link";$link="http://plus.google.com/+AtulBhat";break;case 'be':$html="http://www.behance.net/atulbhats
The usual Behance link with '/atulbhats' at the end
use 'visit' to open the link";$link="https://www.behance.net/atulbhats";break;case 'tw':$html="http://twitter.com/atulbhats
The usual Twitter link with '/atulbhats' at the end
use 'visit' to open the link";$link="http://twitter.com/atulbhats";break;case 'in':$html="http://linkedin.com/in/atulbhats
The usual LinkedIn India link with '/atulbhats' at the end
use 'visit' to open the link";$link='http://linkedin.com/in/atulbhats';break;case 'ig':$html="http://instagram.com/atul.bhat
The usual Instagram link with '/atul.bhat' at the end
use 'visit' to open the link";$link='http://instagram.com/atul.bhat';break;case 'skype':$html="My Skype username is atulbhats7";$link="skype:atulbhats7?call";break;case 'email':$html="You can email me at ping@atulbhats.com";$link="mailto:ping@atulbhats.com";break;case 'ascii':$html="Loading Ascii";$asciia=1;break;case 'dir':$html="Basically my website archives. Sites I have Designed for myself since 2012 (first-2015).
From webs to hosted to dot.tk to having my own domain."+"
Also Directories on my site (various pages and projects)"+"

Syntax: cd dir_name

"+"List of Directories you can open:
";break;case 'cd':$html="You Forgot to Type in the Directory Name! Try Again with the Proper Directory Name"+"
Use Dir command to get the list of directories"+"
Syntax: cd dir_name
";break;case 'cd first':$html="Opening my First Ever website in New Tab. Learnt it from Shriram Bhat. http://shrirambhat.com .";break;case 'cd 2012':$html="Opening the site I had in 2012 in New Tab
PS: Check out the Post Card. Write to me if you like it.";break;case 'cd 2013':$html="Opening the site I had in 2013 in New Tab
Inspired by Chris Carey Website back then.";break;case 'cd 2014':$html="Opening the site I had in 2014 in New Tab";break;case 'cd cipher':$html="My attempts in classical Cryptography coming up in New Tab";break;case 'cd color':$html="Easy attempt to get html and rgb codes of colors, in New Tab";break;case 'cd ip':$html="My Experiment with Ip Address, coming up in New Tab";break;case 'cd 2015':$html="Opening the site I had in 2014 in New Tab
Yeah Sure! This is the Site since 2015.";break;case 'cd captures':case 'captures':case 'photography':case 'photos':$html="Taking you to the Photogallery... ";break;case 'pic':$img='https://scontent-mad1-1.xx.fbcdn.net/hphotos-xap1/t31.0-8/s960x960/964437_10200521656456449_505317667_o.jpg';$html="There you go. That's how I look."+'
';break;case 'visit':if($link!=""){window.open($link,"_blank");$html="The link "+$link+" will open in new tab.";$link="";}else $html="No Social Link has been loaded. Try this command after viewing an address link to my page";break;case 'exit':$html="The Site Will Self Destruct in 5";destroy();break;case 'message':case 'msg' :case 'ping':$html="Message Sending Initiated
To cancel sending message, use \'cancelsending\' command to cancel sending this message.
Enter Your Name:";$msg=1;$msgcmd=1;break;case 'feedback':$html="Thank you! I love feedback.
Feedback Initiated
To cancel sending message, use \'cancelsending\' command to cancel sending this message.
Enter Your Name:";$msg=1;$msgcmd=1;break;case 'clr':case 'cls':$clr=1;$msg=0;$html="";break;case '':$html="";break;case 'cancelsending':$html="Message Sending Cancelled";$msg=0;$msgcmd=0;break;case 'cd thoughts':case 'thoughts':case 'blog':$html="Taking you to my blog. Please Wait...";break;case 'cd thoughtsTerminal':case 'thoughtsTerminal':case 'blogTerminal':$html="Taking you to my blogTerminal interface. Please Wait...";break;case 'terminal blogpost':$html="Taking you to the blog post. Please Wait...";break;case 'gui':$html="Taking you to the GUI website. Please Wait...";break;case 'projects':$html="Project page lists the few things I've built and worked on. Will open in new page.";break;case 'dob':$html="I was born on a date that adds up to 7 when you add date digits, also when you add month digits,
and also when you add all digits of dd-mm-yyyy. \nPS: I am not a fan of numerology.";break;case 'paste':case 'ctrl+v':$html="Opening PasteBin in New Tab.";break;case 'reload':$html="";break;/*case 'cnh':case 'cyanide and happiness':$html='
Loading Comic...
';$link="http://explosm.net";break;*/case 'privacy':$html="Ok. I know for some of you seeing your IP address being loaded is a scary thing. But don't worry.

Privacy Statement

This web page loads only the IP address which is obtained whenever a user visits any website on the internet. Apart from this data which is only the IP address of the visiting system, no other data is stored by atulbhats.com on the user's computer nor is any data loaded by atulbhats.com from the users computer. The website uses simple PHP line to get the IP address and uses the javascript code to get the system time as to greet the user upon site load. No other information is obtained, contained or extracted by the website from the system.

The above statement only applies for the web page at atulbhats.com and not the subdomains and directories. If the use visits any of the directories on this domains, then the web page may or may not store cookies and receive local data for the page functionality. However, No DATA IS SHARED with a third party or entity of any kind.

So relax. ;)";break;case 'disclaimer':$html="


The website http://atulbhats.com and its www variant at the base domain level is intended for two purposes.

1. For the admin to introduce himself to the user.
2. For the admin to access parts of the internet with ease.

It is to be duly noted that some of the features such as 'weather' and 'news' use APIs and RSS feeds from various website. The command that access these features are not restricted to public by operation. However some of these commands are not publicly displayed in the list of commands as to prevent abuse, most of these commands can be retrieved using the listing commands.

The admin does not hold any responsibilities as to the abuse of the commands by the user. The site has been built in a 'Non-commercial, Personal and private use' model and tries its best to not violate any user agreements with the APIs or their terms. For any queries, mail the admin at ping@atulbhats.com

";break;case 'terminal':$html="

Terminal! Well, you see from this site, that I like the terminal feel and look. Working with a terminal is another story. But yes! just like you wish you can leave the city life and go live in a jungle, techies wish you can skip all the buttons and slides and just look at plain old text. Right? Well, that was my thought at least. So I built this site. To make a site that functions on keystrokes. A Site that involves you. A site that give you a feel of a programmer and not any random person with this hand on a mouse.

But I don't stop just here. I learn from these and implement it in GUI as well. But no matter what I create terminal stays the favorite. You can use the 'gui' command to see what came from a use interactive GUI web page. Now for you terminal loving lot, you can check out 'blogTerminal' command to view how I made a blog interface with terminal theme. I also wrote about my inspiration and idea for terminal in my blog. Use 'terminal blogpost' command for that.

";break;default :$save=1;$html="\'"+$command+"\' Is not a known Command. But that might change the next time you are here. Use 'help' for the list of available commands";}if($save==1){savecommand($command,0);$save=0;}else{savecommand($command,1);}}}else{if($msgcmd==1){if(nameReg.test($command) && ($.trim($command)!="" )){$name=$command;$html="Hello "+$name+"
Enter Your Email so that I can contact you (and please do not give false emails. I wont spam you. I swear! ):";$msgcmd=2;}else{$html="Wow Wow, What sort of a name is that? Try again:";$msgcmd=1;}}else if($msgcmd==2){if($command=='N' || $command=='n'){$phone='';$html="Ok. I will contact you via email. Now please Type the Message and Press Alt+S to Send or Alt+C to Cancel Sending: ";$msgcmd=4;}else if($command=='Y' || $command=='y'){$html="Thanks! Please enter your Number ( with ISD code if outside india ).";$msgcmd=3;}else if($command.trim()!="" && emailReg.test($command)){$email=$command;$html="Thanks for the Email! Would you like to Submit your Phone number so that I can contact you faster? (Y/N) ";$msgcmd=2;}else{$html="Oops! Something Wrong with your Email. Please type a proper email: ";$msgcmd=2;}}else if($msgcmd==3){if($command=='no number entered proceeding to message' || $command=='n'){$phone='';$html="Ok. I will contact you via email. Now Type the Message and Press Alt+S to Send or Alt+C to Cancel Sending: ";$msgcmd=4;}else if($command.trim()!="" && numReg.test($command)){$phone=$command;$html="Thanks! Now Type the Message and Press Alt+S to Send or Alt+C to Cancel Sending: ";$msgcmd=4;}else{$html="Oops! Something Wrong with your Phone Number. Please type a proper number: ";$msgcmd=3;}}else if($msgcmd==4){if($command!=""){$message=$command;$html="Please Wait, Terminal is Sending your Message...";sendmsg();$msg=0;$sendact=0;$msgcmd=0;}else{$html="At Least say Hi :'( I'm So lonely ;)...";$msgcmd=3;}}}$('#defaultline').before('
');if($asciia==1){$html=$html.replace(/~/g," ");$html=$html.replace(/#/g,'
');$asciia=0;}$('#line'+$l).html($html);$('#commandcontainer').text("");$('#actualinput').val("");$l++;if($clr==1){$l=0;$('.line').remove();$('.commandline').remove();$clr=0;}$('#actualinput').focus();$(document).scrollTop($(document).height());}$(document).bind('keyup', function(e) {$existing=$('#commandcontainer').text();if(e.which==27 && $intro_run==1){skipintro($type);}else if(e.which==38){if($x>0){$('#actualinput').val($history[$x-1]);$('#commandcontainer').text($history[$x-1]);$x--;if($x<0)$x=0;}if($x<0){return false;}}else if(e.which==40){if($x>=0){$('#commandcontainer').text($history[$x+1]);$('#actualinput').val($history[$x+1]);$x++;}if($x>$z){return false;}}if(e.altKey && (e.which == 83)) { /*send msg if $msg==1 which is activated when message command is typed*/ if($msg==1){ $sendact=1; runcommand($existing);} /* return false; */}else if(e.ctrlKey && (e.which == 82)) { e.preventDefault(); /*send msg if $msg==1 which is activated when message command is typed*/ if($msg==1){if (confirm('Refreshing the Page with Discard Message!!') == true) { window.reload(); } else { e.preventDefault(); return false; }} /* return false;*/}else if(e.altKey && (e.which == 67)) { /*send msg if $msg==1 which is activated when message command is typed*/ if($msg==1){ $msg=0; runcommand('cancelsending');} /* return false;*/}else if(e.which==13){/*enter pressed *//*$key[$k]=$('#commandcontainer').text;*/runcommand($existing);$('#actualinput').focus();}else{$type=true;}/*else if(e.which==38){$('#commandcontainer').text=$key[$k];}*/});$('#actualinput').keyup(function(e){if(e.which==8){ $exist=$('#commandcontainer').text(); /*delete pressed */ e.preventDefault(); /*alert('del');*/ $c=$exist.length-1; $('#commandcontainer').text($exist.slice(0,$c));} else{ /*alert("pressed : "+e.which);*/$('#commandcontainer').text($(this).val());}});/*setInterval(function(){$('#actualinput').focus();},5000);*/$('body').click(function(){$(document).scrollTop($(document).height());});$(document).keydown(function(e) {$('#actualinput').focus();});function unnull(){for($i=0;$i<$history.length;$i++){if($history[$i]=="" || $history[$i]==null || $history[$i]==undefined ){for($j=$i;$j<$history.length;$j++){$history[$j]=$history[$j+1];}$z--;}}$z=$history.length;}function rehistory($cmd){if($history.indexOf($cmd)>=0){for($i=$history.indexOf($cmd);$i<$history.length;$i++){$history[$i]=$history[$i+1];}$z--;}}});