Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'combined-storybox-json' into dev

Conflicts:
	source.php
  • Loading branch information...
commit 8d5e87ff8150042f2eefe6817672f0d614349b43 2 parents 69d4c52 + 97a9a54
@swvist swvist authored
View
13 css/storybox.less
@@ -16,11 +16,14 @@ div.groupBox {
}
.more, .less {
-display:block;
-font-size:14px;
-position: absolute;
-right: 200px;
-cursor: url('../pics/pointer.png') , auto;
+ display:block;
+ font-size:14px;
+ position: absolute;
+ right: 200px;
+ cursor: pointer;
+ &:hover {
+ text-decoration:underline;
+ }
}
.less {
View
4 css/structure.less
@@ -109,7 +109,7 @@ margin: 0;
height: 100px; /* min logo size */
position: relative;
- #logo{
+ #logo1, #logo2{
background :@offWhite;
border-color: #D2D2D2;
border-right: 1px solid #DDDDDD;
@@ -201,7 +201,7 @@ z-index:-2;
position:relative;
top:40px; /* Height of bottom bar */
- #logo{
+ #logo1, #logo2{
border-color: #D2D2D2;
background:#f5f5f5;
background: -webkit-gradient(linear, left top, left bottom, from(@gray1), to(white));
View
1  functions/default.settings.php
@@ -29,4 +29,5 @@
$global_couch_user = ''; // <CouchDB Username>
$global_couch_password = ''; // <CouchDB Password>
+
?>
View
68 functions/interface.php
@@ -73,16 +73,6 @@ function getTagSearchJson($tag,$page)
}
/**
-* Helper Function. Returs an array(size $count) of the CID's of most popular videos
-* @param integer $count The number of videos that should be returned.
-* @return array Array of Popular Videos CID's.
-*/
-function getPopularVideoArray($count){
- $sql="Select cn_id from content_video order by cn_views desc limit $count";
- return resource2array(dbquery($sql));
-}
-
-/**
* Helper Function. Returs an array(size $count) of the CID's of featured videos
* @param integer $count The number of videos that should be returned.
* @return array Array of Featured Videos CID's.
@@ -105,27 +95,27 @@ function getTopRatedVideoArray($count)
}
/**
-* Returs the JSON strings of the $count of $type ofStorybox Video content
-* and their details.
-* $type = featured | toprated | popular
+* Helper Function. Returs an array(size $count) of the CID's of most popular videos
* @param integer $count The number of videos that should be returned.
-* @return string Featured Videos JSON.
+* @return array Array of Popular Videos CID's.
*/
-function getStoryBoxJson($type,$count){
- switch ($type) {
- case "featured": $contentarray = getFeaturedVideoArray($count);
- break;
- case "popular": $contentarray = getPopularVideoArray($count);
- break;
- case "toprated": $contentarray = getTopRatedVideoArray($count);
- break;
- }
- $json=array();
+function getPopularVideoArray($count){
+ $sql="Select cn_id from content_video order by cn_views desc limit $count";
+ return resource2array(dbquery($sql));
+}
+
+/**
+* Helper Function. Returns data for each CID in input array as an array
+* @param array $contentarray An array of content ID's
+* @return array Data for all CID's in input as an array
+*/
+function getStoryBoxDataArray($contentarray){
$vcount=count($contentarray);
+ $data = array();
for($i=0;$i<$vcount;$i++)
{
$obj=new video($contentarray[$i]);
- array_push($json,array( 'cid'=>$obj->getContentId(),
+ array_push($data,array( 'cid'=>$obj->getContentId(),
'title'=>$obj->getTitle(),
'viewcount'=>$obj->getViewCount(),
'poster'=>$obj->getPoster(),
@@ -134,8 +124,36 @@ function getStoryBoxJson($type,$count){
'fullname'=>user::getFullNameS($obj->getUserId()),
'userpic'=>user::getUserPictureS($obj->getUserId())));
}
+ return $data;
+}
+
+/**
+* Returs a combined JSON for all the story box sections
+* Utilizes various helper functions
+* @param integer $fcount The number of videos in featured section
+* @param integer $tcount The number of videos in toprated section
+* @param integer $pcount The number of videos in popular section
+* @return string JSON string containing all Storybox data
+*/
+function getCombinedStoryBoxJson($fcount, $tcount, $pcount){
+ $featuredarray = getFeaturedVideoArray($fcount);
+
+ //Remove any featured array content from toprated
+ $topratedarray = getTopRatedVideoArray($tcount+$fcount);
+ $topratedarray = array_values(array_diff($topratedarray, $featuredarray));
+ array_splice($topratedarray,$tcount);
+
+ //Remove both of the above from popular
+ $populararray = getPopularVideoArray($pcount+$tcount+$fcount);
+ $populararray = array_values(array_diff($populararray,array_merge($featuredarray, $topratedarray)));
+ array_splice($populararray,$pcount);
+
+ $json = array( "featured" => getStoryBoxDataArray($featuredarray),
+ "toprated" => getStoryBoxDataArray($topratedarray),
+ "popular" => getStoryBoxDataArray($populararray));
return json_encode($json);
}
+
/**
* Returns liked/disliked videos of a user.
* @param integer $uid User ID
View
8 index.php
@@ -23,11 +23,9 @@
echo $piwik;
?>
<script type="text/javascript">
-$(document).ready(function() {
- P.updateStoryBox('Featured')
- P.updateStoryBox('Popular')
- P.updateStoryBox('Top Rated')
-});
+ $(document).ready(function() {
+ P.updateStoryBox('homePage');
+ });
</script>
</body>
View
185 js/functions.js
@@ -188,6 +188,26 @@
Paathshaala.validate.video();
});
},
+ grayOut : function (option){
+ if(option) {
+ $("<div>")
+ .attr('id', 'darkenScreenObject')
+ .css({
+ 'position': 'absolute',
+ 'top': '0px',
+ 'left': '0px',
+ backgroundColor: '#030303',
+ 'opacity': '0.25',
+ 'width': '100%',
+ 'height': $(document).height(),
+ zIndex: 99
+ })
+ .appendTo("body");
+
+ } else {
+ $('div#darkenScreenObject').remove();
+ }
+ },
hashTag : function(elem) {
var data = $(elem).html(),
reg = /#(\w{1,})/g,
@@ -201,10 +221,10 @@
},
hideEditProfile : function() {
$('#editProfile').fadeOut("fast");
- grayOut(false);
+ this.grayOut(false);
},
hideFeedback : function () {
- grayOut(false);
+ this.grayOut(false);
$('div#feedback').hide();
},
imageError : function() {
@@ -276,11 +296,11 @@
});
},
showEditProfile: function () {
- grayOut(true);
+ this.grayOut(true);
$('div#editProfile').load('editprofile.html').fadeIn("slow");
},
showFeedback : function() {
- grayOut(true);
+ this.grayOut(true);
$('div#feedback').show()
$('div#feedback').load('feedback.html', function(){
$('div#feedback ul.links li').click(function() {
@@ -327,81 +347,91 @@
},
updateStoryBox : function (type) {
/*
- type : Featured/ Top Rated / Popular
+ type : homePage / 'Liked videos' ...
All box layout updated with same code
New ui needed for upload video trigger
*/
- var videoBox = function (myobj) {
- if( myobj.fullname.length > 18 )
- myobj.fullname = myobj.fullname.slice(0 ,15 ) + '...';
- return Paathshaala.templates.box.supplant(myobj);
- },
- link,
- title = $("<span>").addClass('groupTitle'),
- more = $("<span>").addClass('more').html("Show more"),
- less = $("<span>").addClass('less').html("Show less");
- title = title.html(type);
+ var more = $("<span>").addClass('more').html("Show more"),
+ less = $("<span>").addClass('less').html("Show less"),
+ complete = function(){
+ $('img.metaImage').error(function(){
+ $(this).attr('src','pics/default.png');
+ });
+ $('img.thumbnail').error(function(){
+ $(this).attr('src','pics/error.png');
+ });
+
+ $('span.more').click(function(){
+ $(this).hide();
+ $(this).parent().find('.Hidden').slideDown('fast');
+ $(this).parent().find('.less').fadeIn();
+ });
+ $('span.less').click(function(){
+ $(this).parent().find('.Hidden').slideUp('fast');
+ $(this).parent().find('.more').fadeIn();
+ $(this).hide();
+ });
+ },
+ videoBox = function (myobj) {
+ if( myobj.fullname.length > 18 )
+ myobj.fullname = myobj.fullname.slice(0 ,15 ) + '...';
+ return Paathshaala.templates.box.supplant(myobj);
+ },
+ groupBox = function(title, json) {
+ try {
+ // throw exception if json is invalid
+ if ($.isEmptyObject(json) )
+ throw "Empty JSON";
+ title = $("<span>").addClass('groupTitle').html(title);
+ var i,
+ groupBox = $("<div>").addClass('groupBox'),
+ groupBox2 = $("<div>").addClass('Hidden').addClass('groupBox');
+ if (json.length === 4 ) {
+ for (i =0; i <4 ; i +=1)
+ groupBox = groupBox.append(videoBox(json[i]));
+ $('div#container').append(title).append(groupBox);
+ } else { /* All multi boxes handled in same way if more than 4 */
+ for (i =0; i <4 ; i +=1)
+ groupBox = groupBox.append(videoBox(json[i]));
+ for (i =4; i < json.length ; i +=1)
+ groupBox2 = groupBox2.append(videoBox(json[i]));
+ $('div#container').append($("<div>").append(title , groupBox , more , groupBox2 , less));
+ }
+ } catch(e) {
+ // handle invalid json case
+ if (e === "Empty JSON")
+ console.log("Empty JSON recived from server");
+ } finally {
+ // i wonder what to do here.
+ }
+ };
+
switch (type) {
- case 'Featured' :
- link = 'json/featured.json.php';
- break;
- case 'Top Rated' :
- link = 'json/toprated.json.php';
- break;
- case 'Popular':
- link = 'json/popular.json.php';
+ case 'homePage':
+ $.getJSON( 'json/homeStorybox.json.php' , function(json){
+ groupBox('Featured', json.featured);
+ groupBox('Popular', json.popular);
+ groupBox('Top Rated', json.toprated);
+ }).complete(function(){ complete(); });
break;
case 'Liked videos':
- link = 'json/uservideolikes.json.php';
+ $.getJSON( 'json/uservideolikes.json.php' , function(json){
+ groupBox('Liked videos', json);
+ }).complete(function(){ complete(); });
break;
case 'Disliked videos':
- link = 'json/uservideodislikes.json.php';
+ $.getJSON( 'json/uservideodislikes.json.php' ,function(json){
+ groupBox('Disliked videos', json);
+ }).complete(function(){ complete(); });
break;
case 'My Uploads':
- link = 'json/uservideouploads.json.php';
+ $.getJSON( 'json/uservideouploads.json.php' , function(json){
+ groupBox('My Uploads', json);
+ }).complete(function(){ complete(); });
break;
}
- $.getJSON( link , function(json) {
- if (json.length !== 0 ) {
- var i,
- groupBox = $("<div>").addClass('groupBox'),
- groupBox2 = $("<div>").addClass('Hidden').addClass('groupBox');
- if (json.length === 4 ) {
- for (i =0; i <4 ; i +=1)
- groupBox = groupBox.append(videoBox(json[i]));
- $('div#container').append(title).append(groupBox);
- } else { /* All multi boxes handled in same way if more than 4 */
- for (i =0; i <4 ; i +=1)
- groupBox = groupBox.append(videoBox(json[i]));
- for (i =4; i < json.length ; i +=1)
- groupBox2 = groupBox2.append(videoBox(json[i]));
- $('div#container').append($("<div>").append(title , groupBox , more , groupBox2 , less));
- }
- } else {
- $('div#container').append(title).append(groupBox);
- }
- }).complete(function(){
-
- $('img.metaImage').error(function(){
- $(this).attr('src','pics/default.png');
- });
- $('img.thumbnail').error(function(){
- $(this).attr('src','pics/error.png');
- });
- $('span.more').click(function(){
- $(this).hide();
- $(this).parent().find('.Hidden').slideDown('fast');
- $(this).parent().find('.less').fadeIn();
- });
- $('span.less').click(function(){
- $(this).parent().find('.Hidden').slideUp('fast');
- $(this).parent().find('.more').fadeIn();
- $(this).hide();
- });
-
- });
}
};
@@ -650,15 +680,18 @@
/* ! Paathshaala */
-function grayOut(vis,options){var options=options||{},zindex=options.zindex||99,opacity=options.opacity||20,opaque=(opacity/80),bgcolor=options.bgcolor||'#030303',dark=document.getElementById('darkenScreenObject');if(!dark){var tbody=document.getElementsByTagName("body")[0],tnode=document.createElement('div');tnode.style.position='fixed';tnode.style.top='0px';tnode.style.left='0px';tnode.style.overflow='hidden';tnode.style.display='none';tnode.id='darkenScreenObject';tbody.appendChild(tnode);dark=document.getElementById('darkenScreenObject');}
-if(vis){if(document.body&&(document.body.scrollWidth||document.body.scrollHeight)){var pageWidth='100%';var pageHeight='2000px';}
-dark.style.opacity=opaque;dark.style.MozOpacity=opaque;dark.style.filter='alpha(opacity='+opacity+')';dark.style.zIndex=zindex;dark.style.backgroundColor=bgcolor;dark.style.width=pageWidth;dark.style.height=pageHeight;dark.style.display='block';}else{dark.style.display='none';}}
-
$(document).ready(function(){
- P.searchBox();
- P.dashBoard();
- P.imageError();
- P.comments();
- P.quirks();
- P.validate.join();
-});
+ if($.browser.msie) {
+ $("div#indexMesssage").remove();
+ $("<div>").attr('id','indexMesssage')
+ .html("Have a life, <a href='http://abetterbrowser.org/'><em>use a modern browser</em></a>. We dont support Internet Explorer.")
+ .appendTo("#container");
+ } else {
+ P.searchBox();
+ P.dashBoard();
+ P.imageError();
+ P.comments();
+ P.quirks();
+ P.validate.join();
+ }
+});
View
11 json/featured.json.php
@@ -1,11 +0,0 @@
-<?php
- include_once '../functions/class.content.php';
- include_once '../functions/class.video.php';
- include_once '../functions/class.user.php';
- include_once '../functions/interface.php';
- //The front page design requires only 4 videos in popular category. If needed less/more, the get variable should be set.
- if(!isset($_GET['count']))
- $_GET['count']=4;
- echo getStoryBoxJson("featured",$_GET['count']);
-
-?>
View
20 json/homeStorybox.json.php
@@ -0,0 +1,20 @@
+<?php
+ /**
+ * Returns a combined storybox JSON
+ */
+
+ include_once '../functions/class.content.php';
+ include_once '../functions/class.video.php';
+ include_once '../functions/class.user.php';
+ include_once '../functions/interface.php';
+
+ if(!isset($_GET['fcount']))
+ $_GET['fcount']=4;
+ if(!isset($_GET['tcount']))
+ $_GET['tcount']=4;
+ if(!isset($_GET['pcount']))
+ $_GET['pcount']=8;
+
+ echo getCombinedStoryBoxJson($_GET['fcount'], $_GET['tcount'], $_GET['pcount']);
+
+?>
View
11 json/popular.json.php
@@ -1,11 +0,0 @@
-<?php
- include_once '../functions/class.content.php';
- include_once '../functions/class.video.php';
- include_once '../functions/class.user.php';
- include_once '../functions/interface.php';
- //The front page design requires only 4 videos in popular category. If needed less/more, the get variable should be set.
- if(!isset($_GET['count']))
- $_GET['count']=8;
- echo getStoryBoxJson("popular",$_GET['count']);
-
-?>
View
11 json/toprated.json.php
@@ -1,11 +0,0 @@
-<?php
- include_once '../functions/class.content.php';
- include_once '../functions/class.video.php';
- include_once '../functions/class.user.php';
- include_once '../functions/interface.php';
- //The front page design requires only 4 videos in Top rated category. If needed less/more, the get variable should be set.
- if(!isset($_GET['count']))
- $_GET['count']=4;
- echo getStoryBoxJson("toprated",$_GET['count']);
-
-?>
View
88 source.php
@@ -2,12 +2,12 @@
include 'functions/settings.php';
global $global_piwik_tracking;
session_start();
-
+
$header="
<meta charset='UTF-8' />
<link rel='shortcut icon' href='favicon.ico'>
- <link rel='stylesheet/less' type='text/css' href='css/structure.less'>
- <link rel='stylesheet/less' type='text/css' href='css/storybox.less'>
+ <link rel='stylesheet/less' type='text/css' href='css/structure.less' >
+ <link rel='stylesheet/less' type='text/css' href='css/storybox.less' >
<script src='js/less-1.1.3.min.js' type='text/javascript'></script>";
$scripts="
@@ -28,68 +28,68 @@
if(!isset($_SESSION['uid'])){
$topBar = "<div id='top'>
- <a href='index.php' id='logo' title='Paathshaala'> <h1></h1> </a>
+ <a href='index.php' id='logo1' title='Paathshaala'> <h1></h1> </a>
<div class='topbarLeft'>
<form action='search.php' method='get' >
- <img src='pics/search.png' class='searchButton' />
+ <img src='pics/search.png' class='searchButton' alt=''/>
<input type='search' name='tag' placeholder='Search' class='searchBox' required />
</form>
</div>
<ul class='userBar'>
<li id=showJoin><a>Join</a></li>
<li>|</li>
- <li id=showlogin><a>Login</a>&nbsp;&nbsp;<img src='pics/down.png' id='logChangeButton'/></li>
+ <li id=showlogin><a>Login</a>&nbsp;&nbsp;<img src='pics/down.png' id='logChangeButton' alt=''/></li>
</ul>
<form class='login' action='response/login.php' method='post'>
- <img src='pics/users.png'> <input required type='text' name='uname' placeholder='Username' /> <br />
- <img src='pics/key.png'> <input required type='password' name='pass' placeholder='Password' /> <br />
+ <img src='pics/users.png' alt=''> <input required type='text' name='uname' placeholder='Username' /> <br />
+ <img src='pics/key.png' alt=''> <input required type='password' name='pass' placeholder='Password' /> <br />
<input type='hidden' name='page' value='".$_SERVER['PHP_SELF']."'>
<input type='hidden' name='parameter' value='".http_build_query($_GET)."'>
- <button type='submit' id='loginButton' type='button'>login</button>
+ <button type='submit' id='loginButton'>login</button>
</form>
<form class='join' action='response/join.php' method='get'>
<div class='joinMessage'>Enter your credentials</div>
- <img src='pics/user.png'> <input required type='text' id='fname' placeholder='Full Name' /> <img src='.$nullImage.'><br />
- <img src='pics/users.png'> <input required type='text' id='username' placeholder='Username' /> <img src='.$nullImage.'> <br />
- <img src='pics/mail.png'> <input required type='email' id='email' placeholder='Email'/> <img src='.$nullImage.'><br />
- <img src='pics/roll.png'> <input required type='text' id='roll' placeholder='Roll Number' /> <img src='.$nullImage.'> <br />
- <img src='pics/key.png'> <input required type='password' id='pass1' placeholder='Password' /> <img src='.$nullImage.'> <br />
- <img src='pics/key.png'> <input required type='password' id='pass2' placeholder='Password again'/> <img src='.$nullImage.'> <br />
+ <img src='pics/user.png' alt='' /> <input required type='text' id='fname' placeholder='Full Name' /> <img src='$nullImage' alt='' /><br />
+ <img src='pics/users.png' alt='' /> <input required type='text' id='username' placeholder='Username' /> <img src='$nullImage' alt='' /> <br />
+ <img src='pics/mail.png' alt='' /> <input required type='email' id='email' placeholder='Email'/> <img src='$nullImage' alt='' /><br />
+ <img src='pics/roll.png' alt='' /> <input required type='text' id='roll' placeholder='Roll Number' /> <img src='$nullImage' alt='' /> <br />
+ <img src='pics/key.png' alt='' /> <input required type='password' id='pass1' placeholder='Password' /> <img src='$nullImage' alt='' /> <br />
+ <img src='pics/key.png' alt='' /> <input required type='password' id='pass2' placeholder='Password again'/> <img src='$nullImage' alt='' /> <br />
<button id='joinButton' type='button'>Join</button>
</form>
</div>
-<img src='pics/load.gif' id='loading' style='display:none;'>";
+<img src='pics/load.gif' id='loading' style='display:none;' alt='loading...'>";
}
else{
$topBar = "<div id='top'>
-<a href='index.php' id='logo' title='Paathshaala'> <h1></h1> </a>
+<a href='index.php' id='logo1' title='Paathshaala'> <h1></h1> </a>
<div class='topbarLeft'>
<form action='search.php' method='get' >
- <img src='pics/search.png' class='searchButton' />
+ <img src='pics/search.png' class='searchButton' alt=''/>
<input type='search' name='tag' placeholder='Search' class='searchBox' required />
</form>
</div>
</ul>
<div class='loggedUser'>
-<img src='".$_SESSION['userpic']."' class='loggedImage' id='loggedImage'/>
+<img src='".$_SESSION['userpic']."' class='loggedImage' id='loggedImage' alt=''/>
<span class='loggedName' >".$_SESSION['fullname']."</span>
-<img src='pics/down.png' id='logChangeButton' style='position:relative; top:-9px; height:10px;'>
+<img src='pics/down.png' id='logChangeButton' style='position:relative; top:-9px; height:10px;' alt='' />
</div>
<div class='dashBoard' style='display:none'>
-<a href='profile.php'><img src='pics/home.png'> Dashboard </a><br />
-<a href='faq.php'><img src='pics/settings.png'> Help </a><br />
-<a href='response/logout.php'><img src='pics/tick.png'> Sign off </a><br />
+<a href='profile.php'><img src='pics/home.png' alt=''> Dashboard </a><br />
+<a href='faq.php'><img src='pics/settings.png' alt=''> Help </a><br />
+<a href='response/logout.php'><img src='pics/tick.png' alt=''> Sign off </a><br />
</div>
</div>
-<img src='pics/load.gif' id='loading' style='display:none;'> ";
+<img src='pics/load.gif' id='loading' style='display:none;' alt='loading...'> ";
}
$bottomBar = "<div id='bottom'>
- <a href='http://www.teamunwired.org/' id='logo' title='teamunwired'> <h1></h1> </a>
+ <a href='http://www.teamunwired.org/' id='logo2' title='teamunwired'> <h1></h1> </a>
<ul class='bottomLinks'>
<li><a href=''>Credits</a></li>
<li>|</li>
@@ -99,38 +99,34 @@
<li>|</li>
<li>
<a href='http://www.teamunwired.org/'>Teamunwired</a> &nbsp;&nbsp;
- <a href='http://www.teamunwired.org/'><img src='pics/web.png'></a>&nbsp;&nbsp;
- <a href='http://www.facebook.com/teamunwired'><img src='pics/facebook.png'></a>&nbsp;&nbsp;
- <a href='http://www.twitter.com/teamunwired'><img src='pics/twitter.png'></a>
+ <a href='http://www.teamunwired.org/'><img src='pics/web.png' alt='' ></a>&nbsp;&nbsp;
+ <a href='http://www.facebook.com/teamunwired'><img src='pics/facebook.png' alt='' ></a>&nbsp;&nbsp;
+ <a href='http://www.twitter.com/teamunwired'><img src='pics/twitter.png' alt='' ></a>
</li>
<li>|</li>
<li>
<a href='https://github.com/nitcalicut/Paathshaala/'>Paathshaala &nbsp;</a>&nbsp;
- <a href='http://www.facebook.com/paathshaala.tuw'><img src='pics/facebook.png'> </a>&nbsp;&nbsp;
- <a href='http://twitter.com/jaseemabid/'><img src='pics/twitter.png'> </a></li>
+ <a href='http://www.facebook.com/paathshaala.tuw'><img src='pics/facebook.png' alt='' > </a>&nbsp;&nbsp;
+ <a href='http://twitter.com/jaseemabid/'><img src='pics/twitter.png' alt='' > </a></li>
</ul>
</div> <!-- /bottom -->
<div id='bottombar'></div>";
-if(isset($_SESSION['uid']))
-{
-$commentSubmit = "<div class='commentBox'style='height: 70px;'>
- <div class='commentBoxImage'> <img src='".$_SESSION['userpic']."' class='fitin' /> </div>
- <div class='commentBoxText'>
-
- <span class='commentTitle' style='margin-left:5px;'>".$_SESSION['fullname']."</span>
- <div class='data'>
- <textarea id='comment' rows='2' cols='57' placeholder='Comment here. Enter for submit and down key for new line.'></textarea>
- </div>
- </div>
-</div>";
+if(isset($_SESSION['uid'])) {
+ $commentSubmit = "<div class='commentBox'style='height: 70px;'>
+ <div class='commentBoxImage'> <img src='".$_SESSION['userpic']."' class='fitin' /> </div>
+ <div class='commentBoxText'>
+
+ <span class='commentTitle' style='margin-left:5px;'>".$_SESSION['fullname']."</span>
+ <div class='data'>
+ <textarea id='comment' rows='2' cols='57' placeholder='Comment here. Enter for submit and down key for new line.'></textarea>
+ </div>
+ </div>
+ </div>";
}
-else
-{
+else {
$commentSubmit="Please log in to comment.";
}
-
-
?>
Please sign in to comment.
Something went wrong with that request. Please try again.