// I'm Urdna- you may know me from Wikipedia, Xbox live, or anything else related to computers (I have yet to find anyone else by this name) // You can leave me a comment at http://en.wikipedia.org/wiki/user:urdna/notes if you want!
// Thanks for looking at my source; its kinda crazy as this is my first expirence with real programing.
// Most of the code is orriginaly mine (I had help with the page.head.write and post_main sections)
if(!storage.counternotesadd) storage.counternotesadd=0; if(!storage.reasons) storage.reasons=newStorableCollection(); functionget_main(){ if(request.cookies['auth']=="yes"){ response.redirect("/cookiecheck"); } print(H1(" Notes")); printp("Welcome to Notes!!! Notes is an Appjet Aplication made by Urdna, It uses Appjet's persistant storage to allow users to store or take notes in their browser, above a webpage. Notes typed in the text box will be deleted when a user changes iframes (clicking 'Google' or 'Wikipedia' at the top of the page) or if a webpage does not allow itself to be shown in an iframe. Notes is not responsible for any 'notes' lost while using this service. ~Urdna ((",link("http://email.appjet.net/urdna","Email Urdna"),"))") br(); printp(link("/cookiecheck","Continue to Notes")); storage.counternotesmain; }
functionget_cookiecheck(){
if(request.cookies['auth']=="yes"){ response.redirect("/home"); } // If the cookies haven't been given already give them with google as the page // If they have (auth = yes) don't mess with the cookies!
response.setCookie({ name:"url", value:"http://google.com", secure:false, expires:1 }); response.setCookie({ name:"auth", value:"yes", secure:false, expires:1 }); // ^^ something with page and auth cookie, if auth doesn't exist set cookie to google.com
response.redirect("/home") }
functionget_home(){ // thanks to user "Terhorst" for this sections original code print(raw(""" <div onclick="expandNotes();" class="notes" id="contractedNotes"> <p><i>Edit notes</i></p> </div> <div class="notes" id="expandedNotes"> <iframe src="http://note.appjet.com/myipnotes" margin="10" border="1" scrolling="auto" width="1000" height="248"> </iframe> </br></br> <a onclick="contractNotes(); return false;" href="#">Hide Notes</a> </div>
"""));
// end of "terhorst"'s code }
functionget_about(){ print(H1(" Notes")); print("Notes is an Appjet app made by Urdna. Notes allows users to take 'notes' in their web browser, and save them to appjet servers. This allows users to access their notes from anywhere. This page is currently undergoing updates. Notes has had "+storage.counternotes+" hits.") printp(link("/home","Return to Notes"));
}
functionget_delete(){ print("This will delete all notes from your IP address. Are you sure you wish to continue?"); varform=newQuickForm({action:"http://note.appjet.com/delete",method:"post"}); form.addSubmit("submit","Delete my notes"); print(form); print(link("/","Don't delete my notes")); }