Source: site.view [edit]
Function name: viv
Arguments:
Description: OPTIONALARGS: sessionkey, message
Page type: html
Render function:  
Module: magicparties

Page source:

<!doctype html>
<!--
	Template:	 Unika - Responsive One Page HTML5 Template
	Author:		 imransdesign.com
	URL:		 http://imransdesign.com/
    Designed By: https://www.behance.net/poljakova
	Version:	1.0	
-->
<html lang="en-US">
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>Magic-Parties.com</title>
		<meta name="description" content="Viv Magic">
		<meta name="keywords" content="Viv, magic trick, prediction" />
		<meta name="author" content="Adam Cheyer">
        <link rel="icon" type="image/x-icon" href="http://www.magic-parties.com/favicon.ico" />

		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1">
        
        <!-- Google Fonts  -->
		<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,500' rel='stylesheet' type='text/css'> <!-- Body font -->
		<link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'> <!-- Navbar font -->

		<!-- Libs and Plugins CSS -->
		<link rel="stylesheet" href="http://www.magic-parties.com/inc/bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="http://www.magic-parties.com/inc/animations/css/animate.min.css">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
		<!-- link rel="stylesheet" href="http://www.magic-parties.com/inc/font-awesome/css/font-awesome.min.css" --> <!-- Font Icons -->
		<link rel="stylesheet" href="http://www.magic-parties.com/inc/owl-carousel/css/owl.carousel.css">
		<link rel="stylesheet" href="http://www.magic-parties.com/inc/owl-carousel/css/owl.theme.css">

		<!-- Theme CSS -->
        <link rel="stylesheet" href="http://www.magic-parties.com/css/reset.css">
		<link rel="stylesheet" href="http://www.magic-parties.com/css/style.css">
		<link rel="stylesheet" href="http://www.magic-parties.com/css/mobile.css">
		
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
        <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" rel="stylesheet">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
    <script type="text/javascript" src="http://lab.abhinayrathore.com/jquery_youtube/jquery.youtubepopup.min.js"></script>
    <script type="text/javascript">
		$(function () {
			$("a.youtube").YouTubePopup({ autoplay: 0 });
		});
    </script>		


		<!-- Skin CSS -->
		<!-- <link rel="stylesheet" href="http://www.magic-parties.com/css/skin/cool-gray.css"  -->
        <!-- <link rel="stylesheet" href="http://www.magic-parties.com/css/skin/ice-blue.css"> -->
        <!-- <link rel="stylesheet" href="http://www.magic-parties.com/css/skin/summer-orange.css"> -->
        <!-- <link rel="stylesheet" href="http://www.magic-parties.com/css/skin/fresh-lime.css"> -->
        <link rel="stylesheet" href="http://www.magic-parties.com/css/skin/night-purple.css">

		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
			<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
		<![endif]-->

	</head>

     <!--  OPTIONALARGS: <webl>ToString(OPTIONALARGS);</webl> -->
    <body data-spy="scroll" data-target="#main-navbar" cz-shortcut-listen="true">

        <!-- Display loading image while page loads -->
        <div class="page-loader"></div>

    	<div class="body">
        
            <!--========== BEGIN HEADER ==========-->
            <header id="header" class="header-main">

                <!-- Begin Navbar -->
                <nav id="main-navbar" class="navbar navbar-default navbar-fixed-top navbar-shrink" role="navigation"> 
                    <!-- Classes: navbar-default, navbar-inverse, navbar-fixed-top, navbar-fixed-bottom, navbar-transparent. Note: If you use non-transparent navbar, set "height: 98px;" to #header -->

                  <div class="container">

                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                      </button>
                            <!--<a class="navbar-brand page-scroll" href="http://www.magic-parties.com/">Magic-Parties.com</a>-->
                            <a class="navbar-brand page-scroll" href="http://www.magic-parties.com/">
                                <img class="img-responsive" src="http://www.magic-parties.com/img/mp-logo.png" alt="logo" />
                            </a>
                    </div>

                    <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1" aria-expanded="false">
                        <ul class="nav navbar-nav navbar-right">
                            <li><a class="page-scroll" href="body">Home</a></li>
                                <li class=""><a class="page-scroll" href="#about-section">About</a></li>
                                <li class=""><a class="page-scroll" href="#register-section">
                                  <webl>
                                     var sessionkey = wubinfo.cookies.sessionkey ? nil;
			                         if (sessionkey == nil) then
            			                if (Size(OPTIONALARGS) > 0) then
                        			       sessionkey = OPTIONALARGS[0]
			                            end
            			             end;
			                         if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then
            			                sessionkey = nil;
                        			 end;
                                     var userInfo = WubCall("getSessionInfo", ["mpviv", sessionkey]);
                			         if (userInfo == nil) then
			                             `Register`
            			             else
                        			     `Configure`
			                         end;
                                  </webl>
                                </a></li>
                        </ul>
                    </div><!-- /.navbar-collapse -->
                  </div><!-- /.container -->
                </nav>
                <!-- End Navbar -->

            </header>
            <!-- ========= END HEADER =========-->
            
        	<!-- Begin text carousel intro section -->
            <section id="text-carousel-intro-section" class="parallax" data-stellar-background-ratio="0.5" style="background-image: url(&quot;http://www.magic-parties.com/img/mp-viv.png&quot;);">
				
				<div class="container">
					<div class="caption text-center text-main" data-stellar-ratio="0.7">

						<div id="owl-intro-text" class="owl-carousel">
							<div class="item" style="color:white;">
                                <div class="extra-space-l"></div>
                                <div class="extra-space-l"></div>
								<h1>"Absolutely Unique!"</h1>
								<!-- a class="btn btn-blank" href="https://creativemarket.com/Themetorium" target="_blank" role="button">View More!</a -->
							</div>
							<div class="item" style="color:white;">
								<div class="extra-space-l"></div>
								<div class="extra-space-l"></div>
								<h1>"Positively Perplexing"</h1>
								<!-- a class="btn btn-blank" href="https://creativemarket.com/Themetorium" target="_blank" role="button">View More!</a  -->
							</div>
						</div>

					</div> <!-- /.caption -->
				</div> <!-- /.container -->

			</section>
			<!-- End text carousel intro section -->
                                
            <!-- Begin about section -->
			<section id="about-section" class="page bg-style1">
                <!-- Begin page header-->
                <div class="page-header-wrapper">
                    <div class="container">
                        <div class="page-header text-center wow fadeInUp" data-wow-delay="0.3s">
                            <h2>About Viv Magic</h2>
                            <div class="devider"></div>
                            <p class="subtitle">An AI that Knows Things...</p>
                        </div>
                    </div>
                </div>
                <!-- End page header-->

                <!-- Begin rotate box-1 -->
                <div class="rotate-box-1-wrapper">
                    <div class="container">
                        <div class="row">

                          <div>
                            <center>
                               <iframe width="560" height="315" src="https://www.youtube.com/embed/ZJrOjbTOmVw" frameborder="0" allowfullscreen></iframe>
                            </center>
                          </div>
                          

                            <div width="100">
                                <a class="rotate-box-2 square-icon wow zoomIn" data-wow-delay="0">
                                        <h4>&nbsp; The Viv Effect</h4>
                                        <p>Produced by the team that created Siri, Viv is a next-generation AI Assistant that is capable of 
                                           automating numerous tasks and services on behalf of it's user.  Soon resident on millions of devices,
                                           Viv will set the new standard for artificial intelligence in your phone and everywhere.</p>                          
                                          <p>&nbsp;</p>
                                        <p>The Viv Effect leverages the ubiquity of the Viv assistant to amaze spectators in all sorts of situations.
                                           With no apparent influence by the magician, Viv will now be able to make startling predictions, from
                                           cards still to be selected, to the number of cards randomly flipped over in a deck, to personal information
                                           that only the spectator could know.
                                        </p>                                          
                                        <p>The Viv Effect features instant reset and a highly customizable set of prediction options and patter output.
                                        </p>                                          
                                </a>
                            </div>                       
                            
                        </div> <!-- /.row -->
                    </div> <!-- /.container -->
                </div>
                <!-- End rotate box-1 -->
                
                <div class="extra-space-l"></div>
                <div class="extra-space-l"></div>
                <div class="extra-space-l"></div>
                <div class="extra-space-l"></div>
                                
                
          <!-- End about section -->

                                  
                
            <!-- Begin contact section -->
			<section id="register-section" class="page text-white parallax" data-stellar-background-ratio="0.5" style="background-image: url(http://www.magic-parties.com/img/contact-bg.jpg);">
            <div class="cover"></div>
            
                 <!-- Begin page header-->
                <div class="page-header-wrapper">
                    <div class="container">
                        <div class="page-header text-center wow fadeInDown" data-wow-delay="0.4s">
                            <h2><webl>
                                     var sessionkey = wubinfo.cookies.sessionkey ? nil;
			                         if (sessionkey == nil) then
            			                if (Size(OPTIONALARGS) > 0) then
                        			       sessionkey = OPTIONALARGS[0]
			                            end
            			             end;
			                         if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then
            			                sessionkey = nil;
                        			 end;
                                     var userInfo = WubCall("getSessionInfo", ["mpviv", sessionkey]);
                			         if (userInfo == nil) then
			                             `Register`
            			             else
                        			     `Configure`
			                         end;                              
                              </webl></h2>
                            <div class="devider"></div>
                            <p class="subtitle">The Viv Effect</p>
                            <webl>
                               var res = "";
                               if Size(OPTIONALARGS) > 1 then
                                  res = `<br><h4 style="color: lightblue;">` + OPTIONALARGS[1] + "</h4>\n"
                               end;
                               res;
                            </webl>                             
                        </div>
                    </div>                  
                </div>
                <!-- End page header-->
                
                <div class="contact wow bounceInRight" data-wow-delay="0.4s">
                    <div class="container">
                    	<div class="row">
                           <webl>
                              var sessionkey = wubinfo.cookies.sessionkey ? nil;
			                  if (sessionkey == nil) then
            			         if (Size(OPTIONALARGS) > 0) then
                        			sessionkey = OPTIONALARGS[0]
			                     end
            			      end;
			                  if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then
            			                sessionkey = nil;
                        	  end;
                              var userInfo = WubCall("getSessionInfo", ["mpviv", sessionkey]);
                			  if (userInfo == nil) then                             
                            `<div class="col-sm-6">
                                <div class="contact-info">
                                    <h4>Login</h4>
                                    <ul class="contact-address">
                                       <form class="form-horizontal" action="/webl/WubHub_DoIt" method="post">
                                           <input name="cmdline" value="siteutil.siteLogin(site,username,pw,err,succ,category)" type="hidden"/>
                                           <input name="site" value="mpviv" type="hidden"/>
                                           <input name="err" value="magicparties.registerError" type="hidden"/>
                                           <input name="succ" value="magicparties.viv" type="hidden"/>                              
                                           <div class="form-group">
                                               <label for="userName" class="col-sm-2 control-label" data-localize="login.username">Username</label>
                                               <div class="col-sm-10">
                                                   <input type="text" class="form-control" id="userName"  name="username" placeholder="">
                                               </div>
                                           </div>
                                           <div class="form-group">
                                               <label for="pasword" class="col-sm-2 control-label" data-localize="login.password">Password</label>
                                               <div class="col-sm-10">
                                                   <input type="password" class="form-control" name="pw" id="password" placeholder="">
                                               </div>
                                           </div>
                                           <div class="row">
                                               <div class="col-sm-offset-2 col-sm-10">                                                   
                                                   <button type="submit" class="btn btn-custom" data-localize="login.login">Login</button>
                                               </div>
                                           </div>
                                       </form>
			                        </ul>
                                </div>
                            </div>
                        
                        	<div class="col-sm-6">
                                <div class="contact-form">
                                	<h4>Create an Account</h4>
                                       <form class="form-horizontal" action="/webl/WubHub_DoIt" method="post">
                                             <input name="cmdline" value="siteutil.siteRegister(site,name,phone,email,username,pw,pw2,err,succ)" type="hidden"/>
                                             <input name="site" value="mpviv" type="hidden"/>
                                             <input name="err" value="magicparties.registerError" type="hidden"/>
                                             <input name="succ" value="magicparties.registerSuccess" type="hidden"/>
                                             <div class="form-group">
                                                 <label for="name" class="col-sm-3 control-label" data-localize="login.name">Your Name</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" data-localize="login.namePlaceholder" class="form-control" 
                                                          id="name" name="name" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="Telephone" class="col-sm-3 control-label" data-localize="login.phone">Telephone</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" class="form-control" id="Telephone" name="phone" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="email" class="col-sm-3 control-label" data-localize="login.email">Email</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" class="form-control" id="email" name="email" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="userName" class="col-sm-3 control-label" data-localize="login.username">Username</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" class="form-control" id="userName" name="username" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="password" class="col-sm-3 control-label" data-localize="login.password">Password</label>
                                                 <div class="col-sm-9">
                                                     <input type="password" class="form-control" id="password" name="pw" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="confirmPassword" class="col-sm-3 control-label" data-localize="login.confirm">Confirm</label>
                                                 <div class="col-sm-9">
                                                     <input type="password" class="form-control" id="confirmPassword" name="pw2" placeholder="">
                                                 </div>
                                             </div>
                                             <div class="row">
                                                 <div class="col-sm-offset-3 col-sm-9">                                                   
                                                     <button type="submit" class="btn btn-custom" data-localize="login.register">Register</button>
                                                 </div>
                                             </div>
                                         </form>
                                </div>	
                            </div>`;
                             else
                         var config = WubCall("getConfigInfo", [sessionkey]);
                      	`<div class="col-sm-6">
                                <div class="contact-form">
                                	<h4>Configure Viv</h4>
                                       <form class="form-horizontal" action="/webl/WubHub_DoIt" method="post">
                                             <input name="cmdline" value="magicparties.configure(sessionkey,message,card)" type="hidden"/>
                                             <input name="sessionkey" value="` + sessionkey + `" type="hidden"/>
                                             <div class="form-group">
                                                 <label for="card" class="col-sm-3 control-label" >Default Card</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" class="form-control" id="card" name="card" value="` + config.card + `">
                                                 </div>
                                             </div>
                                             <div class="form-group">
                                                 <label for="message" class="col-sm-3 control-label">Response</label>
                                                 <div class="col-sm-9">
                                                     <input type="text" class="form-control" id="message" name="message" 
                                                         value="` + config.message + `">
                                                 </div>
                                             </div>

                                             <div class="row">
                                                 <div class="form-group">
                                                      <label for="message" class="col-sm-3 control-label"><a href="/site/viv(nil)">Logout</a></label>
                                                     <div class="col-sm-offset-3 col-sm-9">
                                                          <button type="submit" class="btn btn-custom" >Save</button>
                                                     </div>
                                                 </div>
                                             </div>
                                             <div class="row">
                                                 <div class="col-sm-offset-3 col-sm-9">                                                   
                                                 </div>
                                             </div>
                                         </form>
                                </div>	
                            </div>`;
                             end;                             
                          </webl>
                                                                                
                        </div> <!-- /.row -->
                        
                    </div> <!-- /.container -->
                </div>
            </section>
            <!-- End contact section -->
                
                

                
            <!-- Begin footer -->
            <footer class="text-off-white">
            
                <div class="footer-top">
                	<div class="container">
                    	<div class="row wow bounceInLeft" data-wow-delay="0.4s">

                        <div class="row">
                            <div class="container">
                				<ul class="social-list">
                                            <li>
                                                <a href="#" class="rotate-box-1 square-icon text-center wow zoomIn" data-wow-delay="0.3s">
                                                    <span class="rotate-box-icon"><i class="fa fa-facebook"></i></span>
                                                </a>
                                            </li>
                                            <li> 
                                                <a target="_blank" href="https://twitter.com/magic_parties" class="rotate-box-1 square-icon text-center wow zoomIn" data-wow-delay="0.4s">
                                                    <span class="rotate-box-icon"><i class="fa fa-twitter"></i></span>
                                                </a>
                                            </li>
                                            <li> 
                                                <a target="_blank" href="https://www.youtube.com/channel/UCHFdAxjD89gFkCwcHh0_80w" class="rotate-box-1 square-icon text-center wow zoomIn" data-wow-delay="0.5s">
                                                    <span class="rotate-box-icon"><i class="fa fa-youtube"></i></span>
                                                </a>
                                            </li>
                    			</ul>
                			</div>                
                        </div>

                        </div> <!-- /.row -->
                    </div> <!-- /.container -->
                </div>
                
                <div class="footer">
                    <div class="container text-center wow fadeIn" data-wow-delay="0.4s">
                        <p class="copyright">Copyright &copy; 2016 by Magic-Parties.com. All rights reserved.</p>
                    </div>
                </div>

            </footer>
            <!-- End footer -->

                <!-- Scroll to top button -->
                <a href="#" class="scrolltotop"><i class="fa fa-arrow-up"></i></a> 
        
            </section>
        </div>
        <!-- body ends -->
        
        <!-- Plugins JS -->
            		
        <script src="http://www.magic-parties.com/inc/bootstrap/js/bootstrap.min.js"></script>
		<script src="http://www.magic-parties.com/inc/owl-carousel/js/owl.carousel.min.js"></script>
		<script src="http://www.magic-parties.com/inc/stellar/js/jquery.stellar.min.js"></script>
		<script src="http://www.magic-parties.com/inc/animations/js/wow.min.js"></script>
        <script src="http://www.magic-parties.com/inc/waypoints.min.js"></script>
		<script src="http://www.magic-parties.com/inc/isotope.pkgd.min.js"></script>
		<script src="http://www.magic-parties.com/inc/classie.js"></script>
		<script src="http://www.magic-parties.com/inc/jquery.easing.min.js"></script>
		<script src="http://www.magic-parties.com/inc/jquery.counterup.min.js"></script>
		<script src="http://www.magic-parties.com/inc/smoothscroll.js"></script>

		<!-- Theme JS -->
		<script src="http://www.magic-parties.com/js/theme.js"></script>

        <script type="text/javascript">
          
           var sessionkey = "<webl>
              var sessionkey = wubinfo.cookies.sessionkey ? nil;
              var res = "nil";
			  if (sessionkey == nil) then
            	 if (Size(OPTIONALARGS) > 0) then
                    sessionkey = OPTIONALARGS[0]
			     end
              end;
			  if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then
                 var sessionkey = wubinfo.cookies.sessionkey ? nil;
                 if (sessionkey != nil) then
                    WubCall("siteutil.siteLogout", ["mpviv", sessionkey]);
                  end;
                  res = `"; document.cookie = "sessionkey=;path=/site/; expires=Thu, 01 Jan 1970 00:00:01 GMT;`
               else
                  res = ToString(sessionkey)
               end;

               res;</webl>";
              
           function setCookie(cname, cvalue, exdays) {
              console.log("Setting cookie: " + cvalue);
              var d = new Date();
              d.setTime(d.getTime() + (exdays*24*60*60*1000));
              var expires = "expires="+d.toUTCString();
              document.cookie = cname + "=" + cvalue + ";path=/site/; " + expires;
           }
           
           if (sessionkey != "nil") {
              setCookie("sessionkey", sessionkey, 365);
           }
        </script>
      
        <div style="clear: both;"></div>
    </body> 
</html>