GupShup.html.dynamic.groupOwnerDetails = {};
GupShup.html.dynamic.groupOwnerDetails.vars = {};
GupShup.html.dynamic.groupOwnerDetails.vars.entityDetails = {};
GupShup.html.dynamic.groupOwnerDetails.vars.webarooUserDetails = {};
GupShup.html.dynamic.groupOwnerDetails.vars.loggedInUserId = -1;
GupShup.html.dynamic.groupOwnerDetails.vars.groupOwnerUserId = -1;
GupShup.html.dynamic.groupOwnerDetails.methods = {};
GupShup.html.dynamic.groupOwnerDetails.methods = {
updateForEntityDetails : function (htmlContent)
{
var status = false;
var entityDetails = GupShup.html.dynamic.groupOwnerDetails.vars.entityDetails;
if((typeof(entityDetails) == 'object') && (typeof(entityDetails.status) != 'undefined') && (entityDetails.status == 'SUCCESS'))
{
var map = [{key:'$ENTITY_NAME$', dataMember: 'name'}];
htmlContent.content = GupShup.util.expandTemplate(htmlContent.content, map, entityDetails.info);
status = true;
}
return status;
},
updateForWebarooUserDetails : function(htmlContent)
{
var status = false;
var webarooUserDetails = GupShup.html.dynamic.groupOwnerDetails.vars.webarooUserDetails;
if((typeof(webarooUserDetails) == 'object') && (typeof(webarooUserDetails.status) != 'undefined') && (webarooUserDetails.status == 'SUCCESS'))
{
if(GupShup.util.trim(webarooUserDetails.info[0].profileName) == "")
{
webarooUserDetails.info[0].profileName = 'anonymous';
}
var map =
[
{key:'http://resource2.smsgupshup.com/webimages/$WEBAROO_USER_IMG_SRC$.jpg', dataMember: 'imageUrl'},
{key:'$PROFILE_NAME$', dataMember: 'profileName'},
{key:'$USER_AGE$', dataMember: 'age'},
{key:'$USER_ID$', dataMember: 'id'}
];
htmlContent.content = GupShup.util.expandTemplate(htmlContent.content, map, webarooUserDetails.info);
GupShup.html.dynamic.groupOwnerDetails.vars.groupOwnerUserId = webarooUserDetails.info[0].id;
status = true;
}
return status;
},
updateDetails : function()
{
var innerHTML = GupShup.util.getInnerHTML('groupOwnerDetailsJsp_webarooUserDetailsTemplate_RIGHT');
var htmlContent = {'content': innerHTML};
var entityDetails = GupShup.html.dynamic.groupOwnerDetails.vars.entityDetails;
var webarooUserDetails = GupShup.html.dynamic.groupOwnerDetails.vars.webarooUserDetails;
if(GupShup.html.dynamic.groupOwnerDetails.methods.updateForEntityDetails(htmlContent, entityDetails)
&& GupShup.html.dynamic.groupOwnerDetails.methods.updateForWebarooUserDetails(htmlContent, webarooUserDetails))
{
GupShup.util.setInnerHTML('groupOwnerDetailsJsp_webarooUserDetailsContainerRIGHT', htmlContent.content);
var ageId = 'groupOwnerDetailsJsp_AgeDiv_RIGHT_' + webarooUserDetails.info[0].id;
if(webarooUserDetails.info[0].displayAge && (webarooUserDetails.info[0].age > 0))
GupShup.html.util.showElement(ageId);
else
GupShup.html.util.hideElement(ageId);
/* Check if we have a valid logged in user and the current group owner is same as the logged in user. */
var sendMessageDivId = 'sendMessageDiv_' + GupShup.html.dynamic.groupOwnerDetails.vars.groupOwnerUserId;
if ((GupShup.html.dynamic.groupOwnerDetails.vars.groupOwnerUserId > 0)
&& (GupShup.html.dynamic.groupOwnerDetails.vars.groupOwnerUserId == GupShup.html.dynamic.groupOwnerDetails.vars.loggedInUserId))
{
GupShup.html.util.hideElement(sendMessageDivId);
}
else
{
GupShup.html.util.showElement(sendMessageDivId);
}
GupShup.html.util.showElement('groupOwnerDetailsJsp_webarooUserDetailsContainerRIGHT');
}
else
{
GupShup.html.util.hideElement('groupOwnerDetailsJsp_webarooUserDetailsContainerRIGHT');
}
},
initPage : function()
{
var webarooUserDetailsJSONStr = '{"info":[{"gender":"MALE","imageUrl":"http://resource.smsgupshup.com/webimages/profile/0/649/649570_1223866256692.png","profileName":"MITSALERT","displayAge":false,"description":"MOST INTELLIGENT TALENTED STUDENT ALERT,RAYAGADA 
 MITSALERT is a social network group which deals with the fastest alert system for MITS family and its different associates apart from this college too. Different news of college, campus drives, events and holidays information with latest research and developments are covered rapidly. ","location":"RAYAGADA","id":649570}],"params":{"limit":-1,"start":0,"type":"USER_INFO","infoType":"WEBAROOUSER","needTotalForPg":true,"entityId":"4511509"},"message":"","totalForPg":1,"status":"SUCCESS","errorCode":"NO_ERROR"}';
var entityDetailsJsonStr = '{"info":[{"isDefault":"false","totalSubscribers":832,"imageUrl":"http://resource2.smsgupshup.com/webimages/entity/4/511/4511509_1223865980617.png","totalPosts":316,"userId":4511443,"isPremium":false,"isPrivate":false,"id":4511509,"description":"MITSALERT is a social network group which deals with the fastest alert system for MITS family and its different associates apart from this college too. ","groupUrl":"http://www.smsgupshup.com/groups/MITSALERT","name":"MITSALERT","isPartner":false,"orgName":"MITSALERT"}],"params":{"limit":-1,"start":0,"type":"USER_INFO","infoType":"SMSENTITY","needTotalForPg":true,"entityId":"4511509"},"message":"","totalForPg":1,"status":"SUCCESS","errorCode":"NO_ERROR"}';
GupShup.html.dynamic.groupOwnerDetails.vars.entityDetails = GupShup.util.getJsonFromResponse(entityDetailsJsonStr);
GupShup.html.dynamic.groupOwnerDetails.vars.webarooUserDetails = GupShup.util.getJsonFromResponse(webarooUserDetailsJSONStr);
GupShup.html.dynamic.groupOwnerDetails.methods.updateDetails();
}
};
try
{
GupShup.html.dynamic.groupOwnerDetails.methods.initPage();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process groupOwnerDetailsJsp dynamic module : error-' + error);
}
try
{
GupShup.html.util.showElement("adModule1",false);
GupShup.html.util.overlay(document.getElementById("adModuleholder1_RIGHT"),document.getElementById("adModule1"),"left", 0, 0);
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process ad module 1 : error-' + error);
}
GupShup.html.dynamic.favGroups = {};
GupShup.html.dynamic.favGroups.methods = {
getClassForImg : function(isPremium)
{
return (isPremium)? "goldframe" : "frame";
},
favGroupsJsp_process : function()
{
var favGroupsJSONStr = '{"subscriptions":[{"isDefault":"false","totalSubscribers":0,"imageUrl":"http://resource2.smsgupshup.com/webimages/images/channels/4.3.0.76849.gif","totalPosts":0,"userId":4511443,"isPremium":false,"isPrivate":false,"id":11313026,"description":"MITSALERT IS GOOD FOR ALL STUDENT.PLS DON'T DEFAME IT. ","groupUrl":"http://www.smsgupshup.com/groups/MITSINFO","name":"MITSINFO","isPartner":false,"orgName":"MITSINFO"},{"isDefault":"false","totalSubscribers":832,"imageUrl":"http://resource2.smsgupshup.com/webimages/entity/4/511/4511509_1223865980617.png","totalPosts":316,"userId":4511443,"isPremium":false,"isPrivate":false,"id":4511509,"description":"MITSALERT is a social network group which deals with the fastest alert system for MITS family and its different associates apart from this college too. ","groupUrl":"http://www.smsgupshup.com/groups/MITSALERT","name":"MITSALERT","isPartner":false,"orgName":"MITSALERT"},{"isDefault":"false","totalSubscribers":28392,"imageUrl":"http://resource2.smsgupshup.com/webimages/entity/0/459/459170_1214337708659.png","totalPosts":566,"userId":459175,"isPremium":false,"isPrivate":false,"id":459170,"description":"Its an initiative taken by BPUT's Student to give update and alerts About BPUT and its affiliated also the constituents colleges. ","groupUrl":"http://www.smsgupshup.com/groups/BPUTALERT","name":"BPUTALERT","isPartner":false,"orgName":"BPUTALERT"}],"userDetails":{"globalUserId":649570,"name":"MITSIAN","id":4511443},"params":{"limit":5,"start":0,"type":"MY_FAV_SUBSCRIPTIONS","userId":"4511443","showLatestMsg":"false","needTotalForPg":false,"showAll":false},"message":"","webarooUserDetails":{"gender":"MALE","age":22,"imageUrl":"http://resource.smsgupshup.com/webimages/profile/0/649/649570_1223866256692.png","profileName":"MITSALERT","displayAge":true,"description":"MOST INTELLIGENT TALENTED STUDENT ALERT,RAYAGADA 
 MITSALERT is a social network group which deals with the fastest alert system for MITS family and its different associates apart from this college too. Different news of college, campus drives, events and holidays information with latest research and developments are covered rapidly. ","location":"RAYAGADA","id":649570},"status":"SUCCESS","errorCode":"NO_ERROR"}';
if (GupShup.util.isInitialized(GupShup.conf.currentModule))
{
if (GupShup.util.trim(GupShup.conf.currentModule.refreshUrl) == '')
{
GupShup.conf.currentModule.refreshUrl
= GupShup.conf.readUrl + "&type=" + 'MY_FAV_SUBSCRIPTIONS'
+ '&userId=4511443' + '&showAll=false' + '&showLatestMsg=false'
+ '&start=0' + '&limit=' + '5' + '&needTotalForPg=false';
}
else
{
favGroupsJSONStr = GupShup.conf.currentModule.refreshArgs;
}
}
var favGroups = GupShup.util.getJsonFromResponse(favGroupsJSONStr);
if((typeof(favGroups.status) != 'undefined') && (favGroups.status == 'SUCCESS') && (favGroups.subscriptions.length > 0))
{
var tmplMap =
[
{key:'http://resource2.smsgupshup.com/webimages/$GROUP_IMG_SRC$.jpg', dataMember:'imageUrl'},
{key:'$GROUP_NAME$', dataMember:'name'},
{key:'$IMG_CLASS$', dataMember:'isPremium', dataProcessor:GupShup.html.dynamic.favGroups.methods.getClassForImg},
{key:'http://resource2.smsgupshup.com/webimages/$GROUP_PAGE_URL$.jpg', dataMember:'groupUrl'},
{key:'$POSTS_COUNT$', dataMember:'totalPosts'},
{key:'$SUBSCRIBER_COUNT$', dataMember:'totalSubscribers'}
];
var containerDivId = 'favGroupsListContainerRIGHT';
var templateDivId = 'favGroupTemplateRIGHT';
GupShup.util.expandTemplateInDiv(containerDivId, templateDivId, tmplMap, favGroups.subscriptions);
document.getElementById('favGroupsBlockContainerRIGHT').style.display = "block";
}
}
};
try
{
GupShup.html.dynamic.favGroups.methods.favGroupsJsp_process();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process favGroupsJsp module : error-' + error);
}
function subscribeOnMobileShouldShowDiv(entityDetails) {
if(GupShup.util.isInitialized(entityDetails) && (entityDetails.status == 'SUCCESS'))
{
if(entityDetails.info[0].isPrivate || entityDetails.info[0].isPartner)
return false;
if(GupShup.util.isInitialized(entityDetails.info[0].subscriptionDetails))
return (!entityDetails.info[0].subscriptionDetails.isSubscribed);
return true;
}
else
{
return false;
}
}
function subscribeOnMobile_process()
{
var entityDetailsJsonStr = '{"info":[{"isDefault":"false","totalSubscribers":832,"imageUrl":"http://resource2.smsgupshup.com/webimages/entity/4/511/4511509_1223865980617.png","totalPosts":316,"userId":4511443,"isPremium":false,"isPrivate":false,"id":4511509,"description":"MITSALERT is a social network group which deals with the fastest alert system for MITS family and its different associates apart from this college too. ","groupUrl":"http://www.smsgupshup.com/groups/MITSALERT","name":"MITSALERT","isPartner":false,"orgName":"MITSALERT"}],"params":{"limit":-1,"start":0,"type":"USER_INFO","infoType":"SMSENTITY","needTotalForPg":true,"entityId":"4511509"},"message":"","totalForPg":1,"status":"SUCCESS","errorCode":"NO_ERROR"}';
var entityDetails = GupShup.util.getJsonFromResponse(entityDetailsJsonStr);
var moduleId = 'subscribeOnMobileModule_RIGHT';
if (subscribeOnMobileShouldShowDiv(entityDetails))
{
GupShup.html.util.showElement(moduleId);
}
else
{
GupShup.html.util.hideElement(moduleId);
}
}
try
{
subscribeOnMobile_process();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process subscribeOnMobile module : error-' + error);
}
$ENTITY_NAME$ is a Premium Group,
and the 5 sample posts shown are randomly picked from all the group posts.
The monthly subscription charges for this group are Rs.$JOIN_COST$/-. Your subscription is suspended. Please click on "Renew" button for reactivating it.
$ENTITY_POSTS_COUNT$ posts, $GROUP_SUBSCRIBERS$ members |
Join
You are about to report that this message violates GupShup Terms of Service.
We will review your request and take appropriate steps as necessary. Your report will be strictly confidential.
This group contains messages that may be unsuitable for some users. By clicking on 'Proceed' you confirm that you are older than 18 years of age and agree to view messages from this group.
$ENTITY_TMPL_EXPANSION$
No group found.
$ENTITY_NAME$
$ENTITY_NAME$ is a private group. You must contact the owner of this group to join it and receive group messages.
Send a message to $ENTITY_NAME$ to join this group.
To send a message from your mobile, SMS MSG $ENTITY_NAME$ followed by the message to 567678.
This message may be unsuitable for some users. By clicking on 'Proceed' you confirm that you are older than 18 years of age and agree to view this message.
$MSG_TMPL_EXPANSION$
This member has not posted any messages yet but will surely do so soon.
No messages found for specified page.
This is SMS GupShup Premium Group: Subscription charge is Rs.$JOIN_COST$/- for $BILLING_PERIOD$ days.
You can join to receive free $TRIAL_PERIOD$ days trial, after which you will need to pay using your preferred payment method.
SMS updates from $ENTITY_NAME$ will be sent to this mobile number.
You can cancel any time by clicking on Manage link in Groups Joined
You do not have sufficient balance in your Prepaid Account to proceed. Please Recharge your Prepaid account first and try again.
Send SMS Greeting Confirmation
You will be charged Rs.$COST$ for every SMS greeting.
SMS greetings will not be delivered on CDMA mobile phones and you will not be charged for those users.
Item:
$ITEM$
Sent to:
$MEMBERS$ friends
Approx. Total Cost:
Rs. $TOTAL_COST$
Available Prepaid Balance:
Rs. $BALANCE$
$WARNIG$
Leave $ENTITY_NAME$
You are about to leave the premium group $ENTITY_NAME$.
Your subscription will be cancelled immediately & you will stop
receiving SMS messages from this group. You will not be charged for
this premium group in future.
You can rejoin this group at any time
by paying Rs. $JOIN_COST$ monthly subscription fee.
SMS Greetings Confirmation
SMS greetings sent to your $MEMBERS$.
Your prepaid account balance is Rs.$BALANCE$
Premium Group Confirmation
You have re-subscribed to premium group $ENTITY_NAME$. SMS updates from $ENTITY_NAME$ will be sent to your mobile phone.
Your prepaid account balance is Rs.$BALANCE$
Paid Post Confirmation
You are using our Paid Message Service. You will be charged Rs.$COST$/message.
Sending to:
$MEMBERS$ members
Approx. Total Cost:
Rs. $TOTAL_COST$
Available Prepaid Balance:
Rs. $BALANCE$
$WARNIG$
Are you a business looking for fast, Premium SMS delivery service? Please contact us at businessgroups@smsgupshup.com
Group Post Confirmation
Message has been posted to your group.
Your prepaid account balance is Rs.$BALANCE$
Send Group Post Confirmation
Your group has zero members. You must invite some members before you can send a paid message.
Send SMS Greeting Confirmation
Your group has zero members. You must invite some members before you can send a SMS Greeting.