Friday, 9 October 2015

DB


Java

logo


Camera

<!DOCTYPE html>
<html>
  <head>
    <title>Capture Photo</title>

    <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    <script type="text/javascript" charset="utf-8">

    var pictureSource;   // picture source
    var destinationType; // sets the format of returned value

    // Wait for device API libraries to load
    //
    document.addEventListener("deviceready",onDeviceReady,false);

    // device APIs are available
    //
    function onDeviceReady() {
        pictureSource=navigator.camera.PictureSourceType;
        destinationType=navigator.camera.DestinationType;
    }

    // Called when a photo is successfully retrieved
    //
    function onPhotoDataSuccess(imageData) {
      // Uncomment to view the base64-encoded image data
      //console.log(imageData);

      // Get image handle
      //
      var smallImage = document.getElementById('smallImage');

      // Unhide image elements
      //
      smallImage.style.display = 'block';

      // Show the captured photo
      // The inline CSS rules are used to resize the image
      //
      smallImage.src = "data:image/jpeg;base64," + imageData;
    }

    // Called when a photo is successfully retrieved
    //
    function onPhotoURISuccess(imageURI) {
      // Uncomment to view the image file URI
      // console.log(imageURI);

      // Get image handle
      //
      var largeImage = document.getElementById('largeImage');

      // Unhide image elements
      //
      largeImage.style.display = 'block';

      // Show the captured photo
      // The inline CSS rules are used to resize the image
      //
      largeImage.src = imageURI;
    }

    // A button will call this function
    //
    function capturePhoto() {
      // Take picture using device camera and retrieve image as base64-encoded string
      navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
        destinationType: destinationType.DATA_URL });
    }

    // A button will call this function
    //
    function capturePhotoEdit() {
      // Take picture using device camera, allow edit, and retrieve image as base64-encoded string
      navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true,
        destinationType: destinationType.DATA_URL });
    }

    // A button will call this function
    //
    function getPhoto(source) {
      // Retrieve image file location from specified source
      navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
        destinationType: destinationType.FILE_URI,
        sourceType: source });
    }

    // Called if something bad happens.
    //
    function onFail(message) {
      alert('Failed because: ' + message);
    }

    </script>
  </head>
  <body>
    <button onclick="capturePhoto();">Capture Photo</button> <br>
    <button onclick="capturePhotoEdit();">Capture Editable Photo</button> <br>
    <button onclick="getPhoto(pictureSource.PHOTOLIBRARY);">From Photo Library</button><br>
    <button onclick="getPhoto(pictureSource.SAVEDPHOTOALBUM);">From Photo Album</button><br>
    <img style="display:none;width:60px;height:60px;" id="smallImage" src="" />
    <img style="display:none;" id="largeImage" src="" />
  </body>
</html>

Complaint

<!DOCTYPE html>
<html>
<head>
   

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
     <link rel="stylesheet" type="text/css" href="css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#flip").click(function(){
        $("#panel").slideToggle("slow");
    });
});
</script>

<script>
$(document).ready(function(){
    $("#flip2").click(function(){
        $("#panel2").slideToggle("slow");
    });
});
</script>


<style>

</style>

<!--<script type="text/javascript" charset="utf-8" src="cordova.js"></script>-->
<script type="text/javascript" charset="utf-8">
   /* var pictureSource=navigator.camera.PictureSourceType;
    var destinationType=navigator.camera.DestinationType;   */
   



        //Function to capture Photo from Phone camera and store it to Phone SavedPhotoAlbum
        function capturePhoto() {
        navigator.camera.getPicture(uploadPhoto, onFail, { quality: 75, saveToPhotoAlbum: true, allowEdit: false,
            destinationType: Camera.DestinationType.FILE_URI });
        }

        function onSuccess(imageURI) {
            var image = document.getElementById('myImage');
            image.src = imageURI;
        }

        function onFail(message) {
            alert('Failed because: ' + message);
        }

   
        //Function to get photo from Phone SavedPhotoAlbum
       /* function getPhoto() {
         
          navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 75,
            destinationType: destinationType.FILE_URI,
            sourceType: destinationType.SAVEDPHOTOALBUM });
        }

        // Called when a photo is successfully retrieved
        //
        function onPhotoURISuccess(imageURI) {
          // Uncomment to view the image file URI
           console.log(imageURI);
           console.log("Image taken.");

          // Get image handle
          //
          var largeImage = document.getElementById('largeImage');

          // Unhide image elements
          //
          largeImage.style.display = 'block';

          // Show the captured photo
          // The inline CSS rules are used to resize the image
          //
          largeImage.src = imageURI;
        }
    */


        //Function to upload image to remote server
        function uploadPhoto(imageURI) {
            var options = new FileUploadOptions();
            options.fileKey="image";
            options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
            options.mimeType="image/jpeg";

            var params = new Object();
            params.value1 = "test";
            params.value2 = "param";

            options.params = params;
            options.chunkedMode = false;

            var ft = new FileTransfer();
            ft.upload(imageURI,  encodeURI("http://192.168.102.84:8080/punebook/Images/"), win, fail, options);
        }

        function win(r) {
            console.log("Code = " + r.responseCode);
            console.log("Response = " + r.response);
            console.log("Sent = " + r.bytesSent);
            alert(r.response);
        }

        function fail(error) {
            alert("An error has occurred: Code = " = error.code);
        }



























    </script>


</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>



<div id="flip2">Your complaint</div>
<div id="panel2">


    <div class="card">
               
                <p>Please fill out the details regarding your complaint</p>
                <center><input type="text" id="subject"  placeholder="Subject" style="width:275px;"></center><br><br>
                <center><input type="text" id="content" placeholder="Complaint" style="height:200px;width:275px;"/></center><br><br>
                <center><input type="button"   name="image" onclick=capturePhoto() value="Take a Snap"/></center><br><br>
                <center><input type="submit" id="submit" placeholder="Submit"></center><br><br>


    </div>

</div>          
         
             <div class="content">
            <div class="card">
                <h1>Complaint Satus!</h1>
                <p><span style="color:#8bc34a">Resolved!</span> Nagar road near Hyatt Hotel fixed 2 days ago.</p>
            </div></div>

 

</body>
</html>

Latlang

<!DOCTYPE html>
<html>
<head>
   

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
     <link rel="stylesheet" type="text/css" href="css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $.support.cors = true;


                                       /* navigator.globalization.dateToString(
                                            new Date(),
                                            function (date) { alert('date: ' + date.value + '\n'); },
                                            function () { alert('Error getting dateString\n'); },
                                            { formatLength: 'short', selector: 'date and time' }
                                        );*/




                        var s_uid = localStorage.getItem('s_uid');
                                   

                       $.ajax({
                            type: 'POST',

                            url: 'http://10.11.18.88:8080/punebook/Mseb  ',


                           
                            data:"{'s_uid':" + s_uid + "}",

                            success: function(data){
                             var arr = JSON.parse(data);

                                var d = new Date();


                                var curr_date = d.getDate();
                                var curr_month = d.getMonth();/* Returns the month (from 0-11) */
                                var curr_month_plus= curr_month+1; /* because if the month is  4 it will show output 3 so we have to add +1 with month*/
                                var curr_year = d.getFullYear();
                                function dstrToUTC(ds) {
                                    var dsarr = ds.split("-");
                                     var mm = parseInt(dsarr[1],10);
                                     var dd = parseInt(dsarr[2],10);
                                     var yy = parseInt(dsarr[0],10);
                                     return Date.UTC(yy,mm-1,dd,0,0,0); }
                                    function datediff(ds1,ds2) {
                                     var d1 = dstrToUTC(ds1);
                                     var d2 = dstrToUTC(ds2);
                                     var oneday = 86400000;
                                     return (d2-d1) / oneday;    }
                                    var a =curr_year+ '-' + curr_month_plus + '-' + curr_date;
                                    var b;  
                                    b = arr.DueDate;
                                   // document.write(+datediff(a,b)+" day(s)<br>");

                             




                               $("#billdue").html("<p>You bill is due in " + datediff(a,b)+" days."+" <br>Due Date: " +arr.DueDate+ ". Please pay up!</p><p><h5><a href='https://wss.mahadiscom.in/wss/wss?uiActionName=getViewPayBill' target='_blank'>Pay now</a></h5></p>");

                            },

                            error: function(err){
                                 $("#billdue").html("Failed to retreive your bill information");
                                 alert("error");
                            }
                    });



    $("#flip").click(function(){
        $("#panel").slideToggle("slow");




    });



});


       


</script>

<style>

</style>
</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>
</div>
       
        <div class="content">
            <div class="card" id="billdue">


            </div>
           
         
           
        </div>

</body>
</html>

MSEDCL

<!DOCTYPE html>
<html>
<head>
   

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
     <link rel="stylesheet" type="text/css" href="css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $.support.cors = true;


                                       /* navigator.globalization.dateToString(
                                            new Date(),
                                            function (date) { alert('date: ' + date.value + '\n'); },
                                            function () { alert('Error getting dateString\n'); },
                                            { formatLength: 'short', selector: 'date and time' }
                                        );*/




                        var s_uid = localStorage.getItem('s_uid');
                                   

                       $.ajax({
                            type: 'POST',

                            url: 'http://10.11.18.88:8080/punebook/Mseb  ',


                           
                            data:"{'s_uid':" + s_uid + "}",

                            success: function(data){
                             var arr = JSON.parse(data);

                                var d = new Date();


                                var curr_date = d.getDate();
                                var curr_month = d.getMonth();/* Returns the month (from 0-11) */
                                var curr_month_plus= curr_month+1; /* because if the month is  4 it will show output 3 so we have to add +1 with month*/
                                var curr_year = d.getFullYear();
                                function dstrToUTC(ds) {
                                    var dsarr = ds.split("-");
                                     var mm = parseInt(dsarr[1],10);
                                     var dd = parseInt(dsarr[2],10);
                                     var yy = parseInt(dsarr[0],10);
                                     return Date.UTC(yy,mm-1,dd,0,0,0); }
                                    function datediff(ds1,ds2) {
                                     var d1 = dstrToUTC(ds1);
                                     var d2 = dstrToUTC(ds2);
                                     var oneday = 86400000;
                                     return (d2-d1) / oneday;    }
                                    var a =curr_year+ '-' + curr_month_plus + '-' + curr_date;
                                    var b;  
                                    b = arr.DueDate;
                                   // document.write(+datediff(a,b)+" day(s)<br>");

                             




                               $("#billdue").html("<p>You bill is due in " + datediff(a,b)+" days."+" <br>Due Date: " +arr.DueDate+ ". Please pay up!</p><p><h5><a href='https://wss.mahadiscom.in/wss/wss?uiActionName=getViewPayBill' target='_blank'>Pay now</a></h5></p>");

                            },

                            error: function(err){
                                 $("#billdue").html("Failed to retreive your bill information");
                                 alert("error");
                            }
                    });



    $("#flip").click(function(){
        $("#panel").slideToggle("slow");




    });



});


       


</script>

<style>

</style>
</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>
</div>
       
        <div class="content">
            <div class="card" id="billdue">


            </div>
           
         
           
        </div>

</body>
</html>

Police

<!DOCTYPE html>
<html>
<head>
   

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">

        <link rel="stylesheet" type="text/css" href="css/index.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#flip").click(function(){
        $("#panel").slideToggle("slow");
    });


    $("#flip1").click(function(){
        $("#panel1").slideToggle("slow");
    });
$.ajax ({
        type: "POST",
        url:'http://192.168.102.84:8080/punebook/police',
            success: function(results) {
                var htmlStr = '';
                $.each(results, function(k, v){
                    if(v.type==='missing'){
                        $("#missing").html('"<p style="float:left;padding-right:15px;"><img src="'+v.imgsrc+'" height="100" width="100"></p><br><p>'+ v.name1 + 'Age'+ v.age+'.</p><br><br><br>"');

                    }
                    if(v.type==='wanted'){
                        $("#wanted").html('"<p style="float:left;padding-right:15px;"><img src="'+v.imgsrc+'" height="100" width="100"></p><br><p>'+ v.name1 + 'Age'+ v.age+'.</p><br><br><br>"');

                    }



            });
       
        }
});




});
</script>




</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>



<div id="flip1">Report an incident</div>
<div id="panel1">


    <div class="card">
               
                <p>Please fill out the details regarding the incident.</p>
                <center><input type="email" id="what"  placeholder="What"></center><br><br>
                <center><input type="text" id="where" placeholder="Where"></center><br><br>
                <center><input type="email" id="when"  placeholder="When"></center><br><br>
                <center><input type="submit" id="submit" placeholder="Submit"></center><br><br>


    </div>

</div>



   


        <div class="content">
            <div class="card">
                <h1>Terrorist Alert!</h1>
                <p><span style="color:#ff5858">Bomb alert!</span> Stay out of MES College of Engineering (Unless you haven't done your submissions.)</p>
            </div>




            <div class="card" id="missing">
                <h1>Missing People</h1>
                <p>These people were last seen near your area. Kindly contact the police if you have seen anyone.</p>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Bhimabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Shantabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Kantabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Baibai Chimappa Waghmare. Age 60.</p><br><br><br>

            </div>


             <div class="card" id="wanted">
                <h1>Wanted People</h1>
                <p>These rapists/murderers/theives were last seen near your area :)</p>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Bhimabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Shantabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Kantabai Chimappa Waghmare. Age 60.</p><br><br><br>
                <p style="float:left;padding-right:15px;"><img src="img/2.jpg" height="100" width="100"></p><br>
                <p>Baibai Chimappa Waghmare. Age 60.</p><br><br><br>
            </div>

           

    </div>

       
       
           


           
     
           

           
           
     

</body>
</html>

PMPML

<!DOCTYPE html>
<html>
<head>
   

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
     <link rel="stylesheet" type="text/css" href="css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#flip").click(function(){
        $("#panel").slideToggle("slow");
    });

    $.ajax({
      type:'GET',
      url: 'api/pmpml.java',
      success: function(data){
        var string = $.parseJSON(data);     //do we need this?
        $("#infocard").html(string);
      },
      error: function(){
        alert('Failed Receive');
      }
    });
});

/*var countries = [
   { value: 'Andorra', data: 'AD' },
 
   { value: 'Zimbabwe', data: 'ZZ' }
];

$('#autocomplete').autocomplete({
    lookup: countries,
    onSelect: function (suggestion) {
        alert('You selected: ' + suggestion.value + ', ' + suggestion.data);
    }
});
*/
</script>

<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log("navigator.geolocation works well");
}// onSuccess Callback
// This method accepts a Position object, which contains the
// current GPS coordinates
//
var onSuccess = function(position) {
    alert('Latitude: '          + position.coords.latitude          + '\n' +
          'Longitude: '         + position.coords.longitude         + '\n' +
          'Altitude: '          + position.coords.altitude          + '\n' +
          'Accuracy: '          + position.coords.accuracy          + '\n' +
          'Altitude Accuracy: ' + position.coords.altitudeAccuracy  + '\n' +
          'Heading: '           + position.coords.heading           + '\n' +
          'Speed: '             + position.coords.speed             + '\n' +
          'Timestamp: '         + position.timestamp                + '\n');
};

// onError Callback receives a PositionError object
//
function onError(error) {
    alert('code: '    + error.code    + '\n' +
          'message: ' + error.message + '\n');
}

navigator.geolocation.getCurrentPosition(onSuccess, onError);</script>


    <style>
      #map {
        width: 320px;
        height: 300px;
      }
    </style>


    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places"></script>
    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />


    <script type="text/javascript">
      var map;
      var infowindow;
      var service ;
      function initialize(lat,lng)
      {
        var origin = new google.maps.LatLng(lat,lng);
     
        map = new google.maps.Map(document.getElementById('map'), {
          mapTypeId: google.maps.MapTypeId.ROADMAP,
          center: origin,
          zoom: 16
        });
       
        var request = {
          location: origin,
          radius: 2500,
          types: ['train_station','bus_station','subway_station','transit_station']
        };
        infowindow = new google.maps.InfoWindow();
        service = new google.maps.places.PlacesService(map);
        service.search(request, callback);
      }

      function callback(results, status) {
        if (status == google.maps.places.PlacesServiceStatus.OK) {
          for (var i = 0; i < results.length; i++) {
            createMarker(results[i]);
          }
        }
      }

      function createMarker(place) {
     
        var placeLoc = place.geometry.location;
        var marker = new google.maps.Marker({
          map: map,
          position: place.geometry.location
        });
        var content='<strong style="font-size:1.2em">'+place.name+'</strong>'+
                    '<br/><strong>Latitude:</strong>'+placeLoc.lat()+
                    '<br/><strong>Longitude:</strong>'+placeLoc.lng()+
                    '<br/><strong>Type:</strong>'+place.types[0]+
                    '<br/><strong>Rating:</strong>'+(place.rating||'n/a');
        var more_content='<img src="http://googleio2009-map.googlecode.com/svn-history/r2/trunk/app/images/loading.gif"/>';
       
        //make a request for further details
        service.getDetails({reference:place.reference}, function (place, status)
                                    {
                                      if (status == google.maps.places.PlacesServiceStatus.OK)
                                      {
                                        more_content='<hr/><strong><a href="'+place.url+'" target="details">Details</a>';
                                       
                                        if(place.website)
                                        {
                                          more_content+='<br/><br/><strong><a href="'+place.website+'" target="details">'+place.website+'</a>';
                                        }
                                      }
                                    });


        google.maps.event.addListener(marker, 'click', function() {
         
          infowindow.setContent(content+more_content);
          infowindow.open(map, this);
        });
      }

      google.maps.event.addDomListener(window, 'load', function(){initialize(18.5549083,73.8782702);});
    </script>







</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>

       
        <div class="content">
            <div class="card" id="infocard">
                <h1>PMPML</h1>
                <p>It'll have something like select your destination...</p>
            </div>
           
            <div class="card">
                <input type="text" name="country" id="autocomplete" placeholder="Search for Bus Stop"/>
               
            </div>

        </div>

        <div class="card">
            <h1>Nearest Bus Stop</h1><br>
            <div id="map"></div>
            <p>Here's your location. Now walk to the nearest bus-stop.</p>

        </div>

</body>
</html>

Police

<!DOCTYPE html>
<html>
<head>
 

        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
     <link rel="stylesheet" type="text/css" href="css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#flip").click(function(){
        $("#panel").slideToggle("slow");
    });
});
</script>

<style>

</style>
</head>
<body>

<div id="flip">PuneBook</div>
<div id="panel">
    <ul>
        <a href="police.html"><li>Police</li></a><hr>
        <a href="msedcl.html"><li>MSEDCL</li></a><hr>
        <a href="pmpml.html"><li>PMPML</li></a><hr>
        <a href="complaint.html"><li>Complaint Box</li></a><hr>
        <a href="newsfeed.html"><li>Home</li></a>
    </ul>
</div>

     

        <div class="content">
            <div class="card">
                <h1>Terrorist Alert!</h1>
                <p><span style="color:#ff5858">Bomb alert!</span> Stay out of MES College of Engineering (Unless you haven't done your submissions.)</p>
            </div>
         
         
         
            <div class="card">
                <h1>Power Bill</h1>
                <p>Your due date is today. Pay up.</p>
                <h5>Pay now</h5>
            </div>
         
         
         

         
         
            <div class="card">
                <div class="card-image image3">
                 
                </div>
                <p>In essence, a card is just a rectangular region which contains content.  This content could be text, images, lists, etc... The card UI methaphor  dictates the interaction and layout of these regions.</p>
            </div>
         
            <div class="card">
                <h1>This is a card!</h1>
                <p>In essence, a card is just a rectangular region which contains content.  This content could be text, images, lists, etc... The card UI methaphor  dictates the interaction and layout of these regions.</p>
            </div>

            <div class="card">
                <div class="card-image image2">
                    <h2>Have you seen her?</h2>
                </div>
                <p>Bhimabai Chimappa Waghmare. Age 60.</p>
            </div>
         
         
            <div class="card">
                <h1>This is a card!</h1>
                <p>In essence, a card is just a rectangular region which contains content.  This content could be text, images, lists, etc... The card UI methaphor  dictates the interaction and layout of these regions.</p>
            </div>
         
        </div>

</body>
</html>

Index

<!DOCTYPE html>
<html>
    <head>
        <!--
        Customize this policy to fit your own app's needs. For more guidance, see:
            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
        Some notes:
            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                * Enable inline JS: add 'unsafe-inline' to default-src
        -->
        <meta http-equiv="Content-Security-Policy" content="default-src *; script-src * 'unsafe-eval' 'unsafe-inline'; connect-src *; img-src *; style-src * 'unsafe-inline' ; media-src *;">
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
        <link rel="stylesheet" type="text/css" href="css/index.css">
   


        <title>Hello World</title>
    </head>
    <body>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script type="text/javascript">


            $(document).ready(function(){
                //$.support.cors = true;

                        var $username = $("#email");
                        var $password = $("#pass");
                       

                $("#submit").on('click', function(){
                    $.ajax({
                        type: 'POST',
                        crossDomain: true,

                        url: 'http://10.11.18.88:8080/punebook/Login',

                        data: JSON.stringify( {username: $username.val(), password: $password.val()}),
                        //data: "{'username': "+$username.val()+", 'password': "+$password.val()+" }",
                        success: function(data){

                            var arr = JSON.parse(data);
                            if(arr.Status== "true")
                            {
                                alert("You have successfully logged in!");
                                localStorage.setItem('s_uid', arr.s_uid);
                                location.href="newsfeed.html";
                            }

                            else if(arr.status == "false")
                            {    alert("Logged in attempt failed!");
                              }

                           
                        },

                        error: function(err){
                            console.log("error data",err);
                            alert("Connection Failed");
                        }
                    });
                });  

            //return false;
            });
                    </script>
   
       
        <div class="app"><br>
            <h1>PuneBook</h1><br><br>
        <input type="email" id="email"  placeholder="Email" required><br><br>
        <input type="password" id="pass" placeholder="Password" required><br><br>
        <input type="button" id="submit" value="Login"></input>
        <a href="newsfeed.html">Go to next page</a>
       

 
        <!-- <script type="text/javascript" src="cordova.js"></script> -->
        <script type="text/javascript" src="js/index.js"></script>
    </body>
</html>

Thursday, 8 October 2015

CSS


* {
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

     
body {
    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
    font-family: Arial, Helvetica, sans-serif;
    background:#e6e6e6;
    padding:0px;
    margin:0px;
    color:#333;
    min-height:100%;
}

.content {
 
    top:0px;  
    bottom:0px;
    left:0px;
    right:0px;
    overflow:scroll;
    padding-top: 10px;
    -webkit-overflow-scrolling:touch;
    margin-bottom:0px;
}
.header {
    text-align:center;
    /*position:fixed;*/
    height:25px;
    left:0px;
    right:0px;
    padding:5px 0px 5px 0px;
    border-bottom:3px solid #CCC;
    font-size:20px;
    font-weight:bold;
    font-family: Helvetica;
    background-color: white;
    color:black;
    border: solid 1px #c3c3c3;
    margin:0px;
}
.card {
    background:#FFF;
    border:1px solid #e6e6e6;
    border-bottom:1.5px solid #BBB;
    border-radius:3px;
    padding:1.5rem;
    margin:7px;
    overflow:hidden;
 
    animation-name:fly-in-from-left;
    animation-delay:0s;
    transform-origin:top left;
    animation-duration: 0.8s;
}

@keyframes fly-in-from-left {
  from {
    transform:translateY(15rem) rotate(15deg);
    opacity:0;
  }
}

p{
    color:grey;
    font-family: Helvetica;
}

.card-image {
    width:100%;
    height:200px;
    padding:0px;
    margin:0px;
    background-position:center;
    background-repeat:no-repeat;
    position:relative;
    overflow:hidden;
}

.card-image .banner {
    height:50px;
    width:50px;
    top:0px;
    right:0px;
    background-position:top right;
    background-repeat:no-repeat;
    position:absolute;
}

a {
    color:white;
    text-decoration:none;
}

a:hover {
    color:white;
    text-decoration:none;
}

.card-image h1,
.card-image h2,
.card-image h3,
.card-image h4,
.card-image h5,
.card-image h6 {
    position:absolute;
    bottom:0px;
    width:100%;
    color:white;
    background:rgba(0,0,0,0.65);
    margin:0px;
    padding:6px;
    border:none;
}
.image1 {
    background-image:url('../img/1.jpg');
}

.image2 {
    background-image:url('../img/2.jpg');
}

.image3 {
    background-image:url('../img/3.jpg');
}

.image4 {
    background-image:url('../img/1.jpg');
}

.image5 {
    background-image:url('../img/1.jpg');
}

.image6 {
    background-image:url('../img/1.jpg');
}

h1 {
    font-size:24px;
    font-weight:normal;
    margin:0px;
    overflow:visible;
    padding:0px;
    text-align:center;
    font-family: Helvetica;
}

.logo{
    float:left;
}


}
li{
    text-align: center;
    padding-right: 40px;
}
ul{
    list-style: none;
}
hr{
    padding-right: 40px;
    width: 50%;
}


#flip {
    padding: 15px;
    text-align: center;
    background-color: #394249;
    border-bottom:3px solid #273238;
    border: solid 1px #273238;
    color:white;

}

#panel {
    padding: 50px;
    display: none;
    background-color: #273238;
    color:white;
}
li{
    text-align: center;
    padding-right: 40px;
}
ul{
    list-style: none;
}
hr{
    margin-left: 20px;
    margin-right: 20px;
    width: 50%;
}

.app {
    background:url(../img/c256.png) no-repeat center top; /* 170px x 200px */
    position:absolute;             /* position in the center of the screen */
    left:50%;
    top:45%;
    height:50px;                   /* text area height */
    width:225px;                   /* text area width */
    text-align:center;
    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
                                   /* offset horizontal: half of text area width */
}
::-webkit-input-placeholder {
   text-align: center;
}
input{
    width: 200px;
    height:40px;
}

#flip1 {
    padding: 15px;
    text-align: center;
    background-color: #303f9f;
    border-bottom:3px solid #303f9f;
    border: solid 1px #303f9f;
    color:white;

}

#panel1 {
    padding: 10px;
    display: none;
    background-color: #3f51b5;
    color:white;
}

#flip2 {
    padding: 15px;
    text-align: center;
    background-color: #b8340e;
    border-bottom:3px solid #b8340e;
    border: solid 1px #b8340e;
    color:white;

}

#panel2 {
    padding: 10px;
    display: none;
    background-color: #c8402a;
    color:white;
}