initial commit

This commit is contained in:
2026-06-25 13:03:45 +06:00
commit 4589f4a8d0
3229 changed files with 941958 additions and 0 deletions

View File

View File

View File

View File

@@ -0,0 +1,248 @@
<style>
@charset "utf-8";
/* CSS Document */
@import url('https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i');
body{ padding:0; margin:0; font-weight:400; font-size:15px}
.container{ max-width:1152px; font-weight:400;}
img{ max-width:100%; height:auto; display:block}
h1{ font-weight:100; margin-bottom:20px; }
h1 strong{ font-weight:900; }
.header{ background:#fff; padding:20px 0}
.nav{ margin:0; padding:0; margin-top:15px; display:block; text-align:right}
.nav li{ display:inline-block; text-transform:uppercase; font-weight:400; margin-left:20px;}
.nav li a{ color:#000}
.nav li a:hover{ text-decoration:none}
.slider{ background:url(cdn/images/slide-bg.jpg); max-height:550px; overflow:hidden; color:#fff;background-repeat: repeat-x;background-position: center;}
.slider ul{ margin:0; padding:0}
.slider li{ display:inline-block; margin-right:10px;}
.slider h1{ margin-top:170px; line-height:55px; font-weight:300}
.phone-animation{ background:url(cdn/images/phone.png) no-repeat top; height:600px; position:relative; padding:129px 42px 0px 44px; }
.phone-animation .item{ padding:0; margin:0 ;}
.block-1{ background:#fff; font-size:35px; font-weight:100; padding:60px 0;}
.block-1 strong{ font-weight:900;}
.block-1 a{ background:#F98300; color:#fff; border-radius:25px; padding:5px 20px; text-transform:uppercase}
.block-5{ background:#2068ad; color:#fff; padding:30px 0}
.block-5 li{ display:inline-block; font-size:28px; text-align:center; border:solid 2px #fff; margin:5px 35px; border-radius:100%; height:200px; width:200px; padding-top:40px;}
.block-5 li strong{ font-size:35px; font-weight:700}
.block-5 ul{ margin:0; padding:0; display:block; text-align:center;}
.block-6{padding:100px 0; }
.app-container{ padding:0px 0px 100px 0;}
.app-block {padding:0px 0px; background:#fff;
-webkit-box-shadow: 0px 0px 14px 2px rgba(0,0,0,0.12);
-moz-box-shadow: 0px 0px 14px 2px rgba(0,0,0,0.12);
box-shadow: 0px 0px 14px 2px rgba(0,0,0,0.12);}
.group-expense{ background:#07467d}
.mess-expense{ background:#607d8b}
.family-expense{ background:#55bb76}
.app-block img{ width:60px; float:left; padding:15px 10px 10px 10px; }
.app-container h1 {
font-size: 28px;
line-height: 20px !important;
padding: 15px;
color: #FFFFFF;
min-height: 6.5rem;
}
.app-container h1 span {font-size:11px; font-weight:600}
.app-desc {padding: 0px 15px;
min-height: 240px;
line-height: 25px;
text-align: justify;
font-weight: 500;
font-size: 0.91rem;
}
.app-info{ list-style:none; margin:0; margin-top:30px; padding:0}
.app-info ul { margin:0; padding:0}
.app-info li{ display:block; background:#d2d2d2; border-bottom:solid 1px #fff; padding:8px 0; margin:0;}
.app-info a{ color:#e65b37 !important; font-weight:bold;}
.app-info a.create-new{ background:url(cdn/images/icon/ico-create-new.png) no-repeat right center; padding-right:25px; }
.app-info a.download{ background:url(cdn/images/icon/ico-download.png) no-repeat right center; padding-right:25px; }
.feature { font-size:13px; border-bottom:solid 1px #dadada; margin-bottom:15px; }
.feature img{margin-right:20px; }
.feature h3{ font-size:15px; text-transform:uppercase }
.footer{ background:url(cdn/images/footer-bg.png) repeat-x #4e97dc; color:#fff; padding-bottom:50px;}
.social-icons{ margin:0; padding:0}
.social-icons li{ list-style:none; display:inline-block}
.social-tab{ padding:50px 0; border-bottom:solid 1px #4283c0; margin-bottom:50px;}
.copyright{ background:#0a4782; color:#fff; padding:20px 0; font-size:12px; text-align:center}
.block7{ padding:50px 0; background:#f1f1f1;}
.testimonial .item { font-style:italic;}
.testimonial .item img{ width:100px !important; margin:0 auto; margin-bottom:15px; }
.testimonial .item cite{ color:#000; font-weight:400;}
@media (min-width: 320px) and (max-width: 768px) {
.slider h1{ margin-top:100px;}
h1{ font-size:170%}
.app-info li{ display:block; margin-bottom:15px;}
.social-icons{ text-align:center !important; margin-bottom:10px;}
.block-5 li{ display:block; text-align:center; margin:20px auto;}
img{ margin:10px 0;}
.phone-animation { display:none;}
.slider{ text-align:center;}
}
/*.dialog iframe{
width:60% !important;
}
.dialog .ui-dialog{
width : 100% !important
}*/
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable.ui-resizable{
width:60% !important;
}
.demo-video img{
width:250px;
}
@media (min-width: 768px) and (max-width: 991px) {
.app-desc {
padding: 0px 12px;
min-height: 250px;
line-height: 19px;
}
}
</style>
<!--3 column App Inof-->
<div class="app-container">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="app-block">
<div class="group-expense"><img src="<?php echo CDN_URL; ?>images/WeXpense.png" alt=""/>
<h1><?php echo __("LBL_GROUP_EXPENSE_STRONG");?> <br>
<span><em><?php echo __("LBL_TRACK_SPLIT_SHARE_GROUP_EXPENSE");?></em></span></h1>
</div>
<div class="app-desc"><?php echo __("LBL_GROUP_EXPENSE_DESC");?> </div>
<div class="text-center demo-video">
<a title="<?php echo __("LBL_VIDEO_WATCH");?>" id="groupExpenseVideo" href="javascript:void(0);" style="display:inline-block" ><img style="padding: 0px;" src="<?php echo CDN_URL; ?>images/pic1_preview.png" alt="" ></a>
<a target="_blank" id="groupExpenseVideo" href="javascript:void(0);"><?php // echo __("LBL_VIDEO_WATCH");?></a></div>
<div class="text-center"><a href="<?php echo HTTP_SITE_URL;?>/6pbPNva1"><?php echo __("LBL_DEMO");?></a>
</div>
<div class="text-center app-info">
<ul>
<li><a href="<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense" class="create-new"><?php echo __("LBL_CREATE_NEW");?> </a> </li>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/1" class="download"><?php echo __("LBL_DOWNLOAD_APP");?></a></li>
</ul>
</div>
</div>
</div>
<!--End Here -->
<div class="col-md-4">
<div class="app-block">
<div class="mess-expense"><img src="<?php echo CDN_URL; ?>images/MessXpense.png" alt=""/>
<h1><?php echo __("LBL_MESS_EXPENSE_STRONG");?> <br>
<span><em><?php echo __("LBL_MANAGE_MEAL_AND_EXPENSE");?></em></span></h1>
</div>
<div class="app-desc"><?php echo __("LBL_IF_YOU_STAYING_IN_MESS_HOSTEL_SHARING_APARTMENT");?> </div>
<div class="text-center demo-video">
<a title="<?php echo __("LBL_VIDEO_WATCH");?>" id="messExpenseVideo" href="javascript:void(0);" style="display:inline-block" ><img style="padding: 0px;" src="<?php echo CDN_URL; ?>images/pic2_preview.png" alt="" ></a><br>
<a target="_blank" id="messExpenseVideo" href="javascript:void(0);"><?php // echo __("LBL_VIDEO_WATCH");?></a></div>
<div class="text-center">
<a href="<?php echo HTTP_SITE_URL;?>/7qbMRgPO"><?php echo __("LBL_DEMO");?></a></div>
<div class="text-center app-info">
<ul>
<li><a href="<?php echo HTTP_SITE_URL;?>/Home/createMessExpense" class="create-new"><?php echo __("LBL_CREATE_NEW");?> </a> </li>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/2" class="download"><?php echo __("LBL_DOWNLOAD_APP");?></a></li>
</ul>
</div>
</div>
</div>
<!--End Here -->
<div class="col-md-4">
<div class="app-block">
<div class="family-expense"><img src="<?php echo CDN_URL; ?>images/MyXpense.png" alt=""/>
<h1><?php echo __("LBL_FAMILY_EXPENSE_STRONG");?> <br>
<span><em><?php echo __("LBL_ORGANIZE_MONTHLY_INCOME_EXPENSE");?> </em></span></h1>
</div>
<div class="app-desc"><?php echo __("LBL_MANAGE_FINANCE_IMPORTNAT_TASK_EVERDAY");?> </div>
<div class="text-center demo-video">
<!-- FamilyExpense video is not ready yet -->
<a title="<?php echo __("LBL_VIDEO_WATCH");?>" style="display:inline-block" ><img style="padding: 0px;" src="<?php echo CDN_URL; ?>images/pic3.jpg" alt="" ></a><br>
<a target="_blank" id="#" href="javascript:void(0);" ><?php // echo __("LBL_VIDEO_WATCH");?></a></div>
<div class="text-center"><a href="<?php echo HTTP_SITE_URL;?>/8nbRbGcc"><?php echo __("LBL_DEMO");?></a></div>
<div class="text-center app-info">
<ul>
<li><a href="<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense" class="create-new"><?php echo __("LBL_CREATE_NEW");?> </a> </li>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/3" class="download"><?php echo __("LBL_DOWNLOAD_APP");?></a></li>
</ul>
</div>
</div>
</div>
<!--End Here -->
</div>
</div>
</div>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<!--<link rel="stylesheet" href="/resources/demos/style.css">-->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( ".dialog" ).dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 100
},
hide: {
effect: "explode",
duration: 100
}
});
var url1 = $("#dialog iframe").attr('src');
var url2 = $("#messDialog iframe").attr('src');
var url3 = $("#familyDialog iframe").attr('src');
$(".dialog iframe").attr('src', '');
$( "#groupExpenseVideo" ).on( "click", function() {
$("#dialog iframe").attr('src', url1+'&autoplay=1');
$( "#dialog" ).dialog( "open" );
//setTimeout(groupExpenseVideofunc, 111);
});
$( "#messExpenseVideo" ).on( "click", function() {
$("#messDialog iframe").attr('src', url2+'&autoplay=1');
$( "#messDialog" ).dialog( "open" );
//setTimeout(groupExpenseVideofunc, 111);
});
$( "#familyExpenseVideo" ).on( "click", function() {
$("#familyDialog iframe").attr('src', url3+'&autoplay=1');
$( "#familyDialog" ).dialog( "open" );
//setTimeout(groupExpenseVideofunc, 111);
});
$(".ui-dialog .ui-dialog-titlebar-close").on("click", function () {
$(".dialog iframe").attr('src', '');
});
});
function groupExpenseVideofunc() {
// $( ".dialog" ).parent('.ui-dialog').css('position','fixed');
// $( ".dialog" ).parent('.ui-dialog').css('top','10%');
// $( ".dialog" ).parent('.ui-dialog').css('left','20%');
}
</script>
<div id="dialog" class="dialog" title="WeXpense">
<iframe width="730" height="434" src="https://www.youtube.com/embed/j2yeMjFViWQ?rel=0" allow="autoplay; encrypted-media"></iframe>
</div>
<div id="messDialog" class="dialog" title="MessXpense">
<iframe width="730" height="434" src="https://www.youtube.com/embed/KX2Q9XYOdsc?rel=0" allow="autoplay; encrypted-media"></iframe>
</div>
<div id="familyDialog" class="dialog" title="MyXpense">
<iframe width="730" height="434" src="https://www.youtube.com/embed/1kPCbMqoV6M?rel=0" allow="autoplay; encrypted-media"></iframe>
</div>

View File

@@ -0,0 +1,31 @@
<?php
$current_lang = Configure::read('Config.language');
$LBL_APP_DOWNLOADS = __("LBL_APP_DOWNLOADS");
$LBL_ESPENSE_ITEMS = __("LBL_ESPENSE_ITEMS");
$LBL_UNIQUE_USERS = __("LBL_UNIQUE_USERS");
$LBL_DAILY_VISITORS = __("LBL_DAILY_VISITORS");
if($current_lang == "ben"){
?>
<style>
.block-5 li strong{
font-size:20px !important;
}
</style>
<?php
}
?>
<div class="block-5">
<div class="container">
<div class="row">
<div class="col-sm-12">
<ul>
<li><?php echo $LBL_UNIQUE_USERS; ?></li>
<li><?php echo $LBL_ESPENSE_ITEMS; ?></li>
<li><?php echo $LBL_APP_DOWNLOADS; ?></li>
<li><?php echo $LBL_DAILY_VISITORS; ?></li>
</ul>
</div>
</div>
</div>
</div>

0
app/View/Elements/empty Normal file
View File

View File

@@ -0,0 +1,63 @@
<div class="footer">
<div class="container">
<div class="row social-tab">
<div class="col-sm-5">
<ul class="social-icons">
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_GOOGLE_PLAY");?>" alt=""/></a></li>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_APP_STORE");?>" alt=""/></a></li>
</ul>
</div>
<div class="col-sm-3">
<div class="free-image">
<img width="80" src="<?php echo CDN_URL; ?>images/<?php echo __('LBL_FREE_PNG'); ?>" alt=""/>
</div>
</div>
<div class="col-sm-4">
<ul class="social-icons text-right">
<li><a target="_blank" href="https://www.facebook.com/expensecount"><img src="<?php echo CDN_URL; ?>images/facebook.png" alt="" /></a></li>
<li><a target="_blank" href="https://twitter.com/expensecount"><img src="<?php echo CDN_URL; ?>images/twitter.png" alt="" /></a></li>
<!-- <li><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fexpensecount.com%2F&title=ExpenseCount - The solution for managing group expense, mess expense and monthly family budget&summary=Manage your expenses better ever!&source=http%3A%2F%2Fexpensecount.com%2F"><img src="<?php echo CDN_URL; ?>images/linkedin.png" alt="" /></a></li> -->
<!--<li><a href="#"><img src="<?php echo HTTP_SITE_URL; ?>images/apple.png" alt="" /></a></li>-->
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-4">
<h3><?php echo __("LBL_WE_NEED_VOLUNTEER");?></h3>
<p><strong><?php echo __("LBL_EXPENSECOUNT_IN_YOUR_LANGUAGE");?></strong></p>
<?php echo __("LBL_EXPENSECOUNT_WE_ARE_LOOKING_FOR_VOLUMNTEER");?>
<?php echo __("LBL_PLEASE_CONTACT");?>
<a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/feedback"><?php echo __("LBL_HERE");?></a></p>
</div>
<div class="col-sm-4">
<h3><?php echo __("LBL_NEWS");?></h3>
<!-- <p>16.05.2017<br> -->
<?php echo __("LBL_DO_YOU_WANT_USE_EXPENSECOUNT_MOBILE"); ?><br>
<!-- <?php echo __("LBL_MOBILE_APP_DOWNLOAD_LINK"); ?> <a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps">https://www.expensecount.com/pages/mobileApps</a> </p> -->
</div>
<div class="col-sm-4">
<h3><?php echo __("LBL_MOBILE_APPS");?></h3>
<p>
<?php echo __("LBL_APPS_ARE_AVAILABLE_TO_DOWNLOAD_BELOW"); ?><br>
<ol>
<li><a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/1"><?php echo __("LBL_DOWNLOAD_APP_FOR_GGROUP_EXPENSE"); ?></a></li>
<li><a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/2"><?php echo __("LBL_DOWNLOAD_APP_FOR_MESS_EXPENSE"); ?></a></li>
<li><a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps/3"><?php echo __("LBL_DOWNLOAD_APP_FOR_FAMILY_EXPENSE"); ?></a></li>
</ol>
</p>
</div>
</div>
</div>
</div>
<div class="copyright">
<p><a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/aboutus"><?php echo __("LBL_ABOUT_US");?></a> |
<a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/faq"><?php echo __("LBL_FAQ");?></a> |
<a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/feedback"><?php echo __("LBL_FEEDBACK");?></a> |
<a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/termscondition"><?php echo __("LBL_TERMS_OF_USE");?></a> |
<a class="link-color" href="<?php echo HTTP_SITE_URL;?>/pages/privacypolicy"><?php echo __("LBL_PRIVACY_POLICY");?></a>
</p>
<?php echo __('LBL_COPY_RIGHT_EXPENSECOUNT'); ?> <?php echo __('LBL_ALL_RIGHTS_RESERVED'); ?>
</div>

View File

@@ -0,0 +1,8 @@
<?php
echo $this->Form->create('Home', array('action' => 'loadUniqueURL'));
echo $this->Form->input('username');
echo $this->Form->input('password', array('type' => 'password'));
echo $this->Form->input('password_confirm', array('type' => 'password'));
echo $this->Form->submit();
echo $this->Form->end();
?>

View File

View File

View File

@@ -0,0 +1,41 @@
<style>
.maintenance-section{
background:#eaeaea;
padding:7px 0;
font-size:18px;
}
.maintenance-section p{
margin-bottom: 0;
color: #ff0000;
}
.maintenance-warning #close-btn img{
display: inline-block;
width:15px;
}
.maintenance-warning #close-btn{
float: right;
}
</style>
<?php if(MAINTENANCE_MOOD){ ?>
<div class="maintenance-section">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="maintenance-warning text-center">
<p><img src="<?php echo CDN_URL; ?>images/warning.png" style="display: inline-block" width="25" alt="">
<?php echo __("LBL_WARNING_MAINTENENCE"); ?>
<a href="https://www.expensecount.com">https://www.expensecount.com</a> <a title="Hide this warning" href="javascript:;" id="close-btn"><img src="<?php echo CDN_URL; ?>images/flat_cross_icon.png" alt=""></a></p>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<script>
$(document).ready(function () {
$("#close-btn").on('click', function () {
$(".maintenance-section").slideUp(500);
});
});
</script>

View File

@@ -0,0 +1,38 @@
<style>
.maintenance-section{
background:#eaeaea;
padding:7px 0;
font-size:18px;
}
.maintenance-section p{
margin-bottom: 0;
color: #ff0000;
}
.maintenance-warning #close-btn img{
display: inline-block;
width:15px;
}
.maintenance-warning #close-btn{
float: right;
}
</style>
<div class="maintenance-section">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="maintenance-warning text-center">
<p><img src="<?php echo CDN_URL; ?>images/warning.png" style="display: inline-block" width="25" alt="">
<?php echo __("LBL_MY_EXPENSE_WARNING"); ?>
<a title="Hide this warning" href="javascript:;" id="close-btn"><img src="<?php echo CDN_URL; ?>images/flat_cross_icon.png" alt=""></a></p>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$("#close-btn").on('click', function () {
$(".maintenance-section").slideUp(500);
});
});
</script>

View File

@@ -0,0 +1,34 @@
<?php
$isReportShow = 'isSummaryMealReportShow';
$reportTable = 'summary-meal-table';
$title = __("LBL_SUMMARY_OF_MEAL_AND_COST");
$title_class = 'summary-of-meal';
?>
<h5 id="summaryHeader" style="text-align: left; margin-top: 20px;" <?php echo 'class="'.$title_class.'">'.$title; ?>
<span class="showHideSpan" style=""> (<label <?php echo 'for="'. $isReportShow.'">'. __("LBL_HIDE_SHOW").' <input type="checkbox" value="1" name="isMealReportShow" id="'.$isReportShow.'"'; ?> checked="checked"></label>)</span>
</h5>
<div class="<?php echo $reportTable; ?>">
<p>* Per meal cost is <?php echo $meal_rate." ".$data['Expense']['currency']; ?><br/>
<?php if (!empty($participant_id)) { ?>
* Meals for you: <?php echo $meal_total." ( out of ".$total_meal.") and cost :".$meal_total*$meal_rate." ".$data['Expense']['currency']." ( out of ".$total_expense." ".$data['Expense']['currency'].")"; ?>
<?php } ?>
</p>
</div>
<script>
$(document).ready(function(){
var reportId = '<?php echo $isReportShow; ?>';
var reportTable = '<?php echo $reportTable; ?>';
var reportTitleClass = '<?php echo $title_class; ?>';
$('#'+reportId).on('click', function () {
if(this.checked) {
$('.'+reportTable).show().removeClass('hideCell');
$('.'+reportTitleClass).removeClass('hidden-print');
} else {
$('.'+reportTable).hide().addClass('hideCell');
$('.'+reportTitleClass).addClass('hidden-print');
}
});
});
</script>

View File

@@ -0,0 +1,88 @@
<?php
if ($check_extras == 1) {
$isReportShow = 'isSettledReportShow';
$reportTable = 'settle-table';
$title = __("LBL_SETTLED");
$title_class = 'settle-report';
} elseif ($check_extras == 2) {
$title = __("LBL_ADVANCED");
$isReportShow = 'isAdvancedReportShow';
$reportTable = 'advanced-table';
$title_class = 'advanced-report';
}
?>
<h5 id="summaryHeader" style="text-align: left;" <?php echo 'class="'.$title_class.'">'.$title; ?>
<span class="showHideSpan" style=""> (<label <?php echo 'for="'. $isReportShow.'">'. __("LBL_HIDE_SHOW").' <input type="checkbox" value="1" name="isMealReportShow" id="'.$isReportShow.'"'; ?> checked="checked"></label>)</span>
</h5>
<table class="table printTable <?php echo $reportTable; ?>" id="exportTable" width="100%">
<thead>
<tr>
<th><?php echo __("LBL_WHO_PAID"); ?></th>
<th><?php echo __("LBL_PAID_TO"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
<th><?php echo __("LBL_WHEN"); ?></th>
</tr>
</thead>
<tbody>
<?php
$personal_total_expense = 0;
$total_expense = 0;
$settled = 0;
$advanced = 0;
$finalExpenseList = array();
foreach ($data['GroupExpense'] as $key => $value) {
$extras_value = 0;
if (isset($value['extras']) && !empty($value['extras'])) {
$extrasArray = explode('|', $value['extras']);
$extras_value = $extrasArray[0];
}
if ($value['what'] == 'Balance Expense' && empty($value['extras'])) {
$extras_value = 1;
}
if ($extras_value == $check_extras ) {
$finalExpenseList[$key]['participent_name'] = $value["participent_name"];
$finalExpenseList[$key]['amount'] = $value["amount"];
$finalExpenseList[$key]['what'] = $value["what"];
$finalExpenseList[$key]['expense_date_new'] = $value["expense_date_new"];
$finalExpenseList[$key]['involve_list'] = $value["involve_list"];
$finalExpenseList[$key]['my_expense'] = '';
$finalExpenseList[$key]['currency'] = $data['Expense']["currency"];
?>
<tr>
<td><?php echo $value["participent_name"]; ?></td>
<td><?php echo $value["involve_list"]; ?></td>
<td><?php
$total_expense = $total_expense + $value["amount"];
echo number_format($value["amount"], 2) . " " . $data['Expense']["currency"]; ?></td>
<td><?php echo $value["expense_date_new"]; ?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold; border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border:0px;"><?php echo number_format($total_expense, 2) . " " . $data['Expense']["currency"]; ?></td>
<td style="border:0px;"></td>
</tr>
</tfoot>
</table>
<script>
$(document).ready(function(){
var reportId = '<?php echo $isReportShow; ?>';
var reportTable = '<?php echo $reportTable; ?>';
var reportTitleClass = '<?php echo $title_class; ?>';
$('#'+reportId).on('click', function () {
if(this.checked) {
$('.'+reportTable).show().removeClass('hideCell');
$('.'+reportTitleClass).removeClass('hidden-print');
} else {
$('.'+reportTable).hide().addClass('hideCell');
$('.'+reportTitleClass).addClass('hidden-print');
}
});
});
</script>

View File

View File

@@ -0,0 +1,86 @@
<div class="slider">
<div class="container">
<div class="row">
<div class="col-sm-8">
<h1><?php echo __("LBL_COMPLETE_SOLUTION_FOR_MANAGING");?></h1>
<p>
<ul>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_GOOGLE_PLAY");?>" alt=""/></a></li>
<li><a href="<?php echo HTTP_SITE_URL;?>/pages/mobileApps"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_APP_STORE");?>" alt=""/></a></li>
</ul>
</p>
</div>
<div class="col-sm-4 phone-animation">
<div class="owl-carousel">
<div class="item"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_SLIDE_1");?>" alt=""/></div>
<div class="item"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_SLIDE_2");?>" alt=""/></div>
<div class="item"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_SLIDE_3");?>" alt=""/></div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
var owl = $('.owl-carousel');
owl.owlCarousel({
items: 1,
loop: true,
margin: 0,
autoplay: true,
autoplayTimeout: 3000,
autoplayHoverPause: false
});
})
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=179508332152";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="block-1">
<div class="container text-center">
<p><?php echo __("LBL_POSSIBLE_TO_LOGIN_STRONG");?></p>
<!-- <p><a href="<?php echo HTTP_SITE_URL; ?>"><?php echo __("LBL_TRY_NOW");?> </a></p>-->
<div class="apps">
<div class="fb-like" data-href="https://www.facebook.com/expensecount/" data-layout="button_count" data-action="like" data-size="large" data-show-faces="true" data-share="true"></div>
&nbsp;&nbsp;
<br/>
<!--
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business"
value="rajibcuetcse@gmail.com">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="item_name" value="Friends of the Park">
<input type="hidden" name="item_number" value="Fall Cleanup Campaign">
<input type="hidden" name="currency_code" value="USD">
<input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"
alt="Donate">
<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
-->
<!-- <a href="/pages/facebookApp">
<img src="/images/en_expocount-facebook.png" alt="" />
</a> -->
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<style>
.testimonial .item img {
border-radius: 50%;
}
</style>
<div class="block7">
<div class="container text-center">
<div class="owl-carousel testimonial">
<div class="item"> <img src="<?php echo CDN_URL; ?>images/testimonials/photo2.png" alt=""/>
<p>Excellent app! Used this to track and settle shared expenses on a 2 week trip. This app made it easy & painless to track & settle up at the end. Great!</p>
<cite>Fang Chow</cite> </div>
<div class="item"> <img src="<?php echo CDN_URL; ?>images/testimonials/photo0.png" alt=""/>
<p>"Best app ever! The authors of this app deserve a Nobel price for economy! Probably the most useful app in my smartphone, great way how to manage all the group expenses with different outputs (pdf, webpage, anything). I don't do reviews since it's annoying but this one is well deserved. Thank you"</p>
<cite>Peter Sámel</cite> </div>
<div class="item"> <img src="<?php echo CDN_URL; ?>images/testimonials/photo3.png" alt=""/>
<p>Straightforward and easy to use. This is exactly what I need to track expenses and keep them balanced.</p>
<cite>Luis Medina</cite> </div>
<div class="item"> <img src="<?php echo CDN_URL; ?>images/testimonials/photo1.png" alt=""/>
<p>"Nice and simple interface. Adding and deleting groups or members is easy. Send report features makes it easier to export soft copy of bills etc. 5 star worthy all the way. Great job by development team"</p>
<cite>Pradeep Tiwari</cite> </div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
var owl = $('.owl-carousel');
owl.owlCarousel({
items: 1,
loop: true,
margin: 0,
autoplay: true,
autoplayTimeout: 3000,
autoplayHoverPause: false
});
})
</script>

View File

@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
Dear Team<br/><br/>
<?php echo $data['title'];?>
<br/>
<br/>
Please review the error and take the necessary actions to resolve the issue.
<br/>
<br/>
Regards,<br/>
System Notification<br/>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts.Email.html
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title><?php echo $title_for_layout; ?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
<?php echo $content_for_layout; ?>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount</title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
<style type="text/css">
img{
display:block;
}
</style>
<?php
$expense_type_name = "WeXpense";
$expenseType = trim(substr($data["unique_url"], 0, 1));
$http_url = HTTP_SITE_URL."/".$data["unique_url"];
if($expenseType == "2"){
$expense_type_name = "MessXpense";
} else if($expenseType == "3"){
$expense_type_name = "MyXpense";
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border-bottom: 8px solid #3784cc; padding-bottom:20px;"></td>
</tr>
<tr><td style="height: 20px;">&nbsp;</td></tr>
<tr>
<td style="font-family:Helvetica, Arial, sans-serif; font-size:14px; color:#000;"> The <?php echo $expense_type_name;?> group"<?php echo $data["expense_title"];?>" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __('LBL_THE_URL_IS'); ?>:<br/> <a style="color:#ff6804;" href="<?php echo $http_url;?>" target="_blank"><?php echo $http_url;?></a> </td>
</tr>
<tr><td style="height: 20px;">&nbsp;</td></tr>
<tr>
<td style="font-family:Helvetica, Arial, sans-serif; font-size:14px; color:#000; line-height:20px;"><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?>
<br/> <br/>
<?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?> </td>
</tr>
<tr>
<td style="height:30px;"></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="Download your requested file from ExpenseCount." />
</head>
<body>
<p>Hello,</p>
<p>Great news! Your requested file is now ready for download.</p>
<p>
You can download it using the link below:
</p>
<p>
<a href="<?php echo $data['download_url']; ?>" target="_blank">Download File</a>
</p>
<br/>
<p>
Please note: This link may expire at <?php echo $data['expire_time']; ?>.
</p>
<br/>
Thanks,<br/>
ExpenseCount Team<br/>
</body>
</html>

View File

@@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
<p><b>Email From:</b> <?php echo $data["email_from"];?></p>
<p><b>IP:</b> <?php echo $data["ip"];?></p>
<p><b>Comment :</b><br/> <?php echo $data["comment"];?></p>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
<p>Great news! You now have <strong><?php echo $data['permission_type'];?></strong> access to <strong><?php echo $data['title'];?></strong>.</p>
<p>Click the link below to access the group:</p>
<p> <a href="<?php echo HTTP_SITE_URL . '/' . $data['unique_url']; ?>" target="_blank">Access Now</a> </p>
<br/>
<br/>
Thanks,<br/>
ExpenseCount Team<br/>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
Dear <br/><br/>
Welcome to ExpenseCount. Please find-out attachment herewith.
<br/>
<br/>
Thanks,<br/>
ExpenseCount Team<br/>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, MessXpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
Dear <?php echo $data['first_name'];?>,<br/><br/>
Please click <a href=" <?php echo HTTP_SITE_URL . '/users/resetpass/' . $data['token_str']; ?>" target="_blank">here</a> to reset your password or copy paste below link in browser URL bar:
<br/>
<br/>
<?php echo HTTP_SITE_URL . '/users/resetpass/' . $data['token_str']; ?>
<br/>
<br/>
Regards,<br/>
Admin <br/>
ExpenseCount <br/>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. Available on iPhone and Android." />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
</head>
<body>
Dear <?php echo $data['first_name'];?>,<br/><br/>
Welcome to ExpenseCount. Please verify your email address to activate your account.
To verify your email address please click this link:
<a href="<?php echo HTTP_SITE_URL . '/users/verify?vt=' . $data['verification_token'] . '&p=' . $data['profile_id']; ?>" target="_blank">Verify Email</a>
<br/>
<br/>
Thanks,<br/>
ExpenseCount Team<br/>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts.Email.text
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<?php echo $this->fetch('content'); ?>

View File

@@ -0,0 +1,29 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<h2><?php echo $message; ?></h2>
<p class="error">
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
<?php printf(
__d('cake', 'The requested address %s was not found on this server.'),
"<strong>'{$url}'</strong>"
); ?>
</p>
<?php
if (Configure::read('debug') > 0):
echo $this->element('exception_stack_trace');
endif;
?>

View File

@@ -0,0 +1,7 @@
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1>404 Error</h1>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<style>
.error-page{
padding-top: 2rem;
text-align: center;
}
</style>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="error-page">
<h1>Page not found 404 Error.</h1>
<h2><?php echo $message; ?></h2>
<p class="error">
<!--<strong><?php echo __d('cake', 'Error'); ?>: </strong>-->
<?php echo __d('cake', '404 error not found.'); ?>
</p>
<?php
if (Configure::read('debug') > 0):
echo $this->element('exception_stack_trace');
endif;
?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,26 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<h2><?php echo $message; ?></h2>
<p class="error">
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
<?php echo __d('cake', 'Invalid URL'); ?>
</p>
<?php
if (Configure::read('debug') > 0):
echo $this->element('exception_stack_trace');
endif;
?>

View File

@@ -0,0 +1,60 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Emails.html
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<?php
//$content = explode("\n", $content);
//foreach ($content as $line):
//echo '<p> ' . $line . "</p>\n";
//endforeach;
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ExpenseCount</title>
</head>
<body>
<style type="text/css">
img{
display:block;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border-bottom: 8px solid #3784cc; padding-bottom:20px;"><a href="https://www.expensecount.com/" target="_blank"><img src="https://www.expensecount.com/images/eng_logo.png" alt="logo"></a></td>
</tr>
<tr><td style="height: 20px;">&nbsp;</td></tr>
<tr>
<td style="font-family:Helvetica, Arial, sans-serif; font-size:14px; color:#000;"> The WeXpense group "<?php echo $data["expense_title"];?>" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __('LBL_THE_URL_IS'); ?> <a style="color:#ff6804;" href="<?php echo $this->Html->url('/', true).$data['unique_url'];?>" target="_blank"><?php echo $this->Html->url('/', true).$data["unique_url"];?></a> </td>
</tr>
<tr><td style="height: 20px;">&nbsp;</td></tr>
<tr>
<td style="font-family:Helvetica, Arial, sans-serif; font-size:14px; color:#000; line-height:20px;"><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?>
<br/> <br/>
<?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?>
</td>
</tr>
<tr>
<td style="height:30px;"></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<div class="bodyContent shadow" style="padding-top: 1px;">
<?php
//echo $this->Form->input('unique_url', array('type' => 'hidden','id'=>'unique_url','value'=>$unique_url));
//echo $this->Form->input('project_url', array('type' => 'hidden','id'=>'project_url','value'=>$this->Html->url()));
?>
<style>
#loadImg{position:absolute;}
#loadImg div{width:100px;height:100px;background:#fff;text-align:center;vertical-align:middle;padding-left:300px;padding-top:200px}
#loadImg div img {
position: absolute;
}
</style>
<!--<div class="add"><img class="img-responsive" src="<?php echo $this->webroot;?>images/add1.jpg" alt=""/></div> -->
<!--Start Tab Area -->
<div class="tabArea">
<div id="loadImg"><div><img src="<?php echo CDN_URL;?>img/loading.gif" /></div></div>
<iframe class="loadHtml" src="<?php echo $this->Html->url("/Expense/loadTab/").$unique_url;?>" onload="document.getElementById('loadImg').style.display='none';"><p>Unable to load</p></iframe>
<!-- <div class="resizeIframe"><a href="#"><img class="img-responsive" src="<?php echo $this->webroot;?>images/resize-icon.png" alt=""/></a></div> -->
</div>
<!--End Tab Area -->
</div>

View File

@@ -0,0 +1,47 @@
<style>
iframe.loadHtml {
margin: 0 !important;
padding: 0 !important;
overflow: hidden;
border: 0;
min-height: 520px;
background: #fff;
}
iframe {
width: 100%;
border: none;
display: block;
}
</style>
<div class="bodyContent shadow" style="padding-top: 1px;">
<?php
//echo $this->Form->input('unique_url', array('type' => 'hidden','id'=>'unique_url','value'=>$unique_url));
//echo $this->Form->input('project_url', array('type' => 'hidden','id'=>'project_url','value'=>$this->Html->url()));
?>
<style>
#loadImg{position:absolute;}
#loadImg div{width:100px;height:100px;background:#fff;text-align:center;vertical-align:middle;padding-left:300px;padding-top:200px}
#loadImg img{
position: absolute;}
</style>
<!--<div class="add"><img class="img-responsive" src="<?php echo $this->webroot;?>images/add1.jpg" alt=""/></div> -->
<!--Start Tab Area -->
<div class="tabArea">
<div id="loadImg"><div><img src="<?php echo CDN_URL;?>img/loading.gif" /></div></div>
<iframe class="loadHtml" src="<?php echo $this->Html->url("/Expense/loadTabDemo/").$unique_url;?>" onload="document.getElementById('loadImg').style.display='none';"><p>Unable to load</p></iframe>
<!-- <div class="resizeIframe"><a href="#"><img class="img-responsive" src="<?php echo $this->webroot;?>images/resize-icon.png" alt=""/></a></div> -->
</div>
<!--End Tab Area -->
</div>

View File

@@ -0,0 +1,551 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<style type="text/css">
.graph .graphLeft {
width: 503px;
float: left;
padding: 10px;
min-height: 285px;
overflow: auto;
}
.graph .graphRight {
width: 207px;
float: left;
border-left: 1px solid #abc6df;
padding: 10px 10px 10px 3px;
min-height: 285px;
}
</style>
<script type="text/javascript">
var lblParticipantList = "<?php echo __('LBL_INCOME_LIST'); ?>";
var lblForWhatReason = '<?php echo __("LBL_WHAT_REASON"); ?>';
var lblExpenseList = '<?php echo __("LBL_EXPENSE_LIST"); ?>';
var lblCategory = '<?php echo __("LBL_CATEGORY"); ?>';
var lblExpenseNOTFOUND = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
var lblCreatedOna = '<?php echo __("LBL_CREATED_ON"); ?>';
var lblWhen = '<?php echo __("LBL_WHEN"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblAmount = '<?php echo __("LBL_AMOUNT"); ?>';
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblModifyExpense = '<?php echo __("LBL_MODIFY_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblIncomeList = '<?php echo __("LBL_INCOME_LIST"); ?>';
var lblFindIncome = '<?php echo __("LBL_FIND_INCOME"); ?>';
var lblAddIncome = '<?php echo __("LBL_ADD_INCOME"); ?>';
var lblModifyIncome = '<?php echo __("LBL_MODIFY_INCOME"); ?>';
var lblDeleteIncome = '<?php echo __("LBL_DELETE_INCOME"); ?>';
var lblWantDeleteIncome = '<?php echo __("LBL_DO_YOU_DELETE_INCOME"); ?>';
var lblEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblIncomesOf = '<?php echo __("LBL_INCOMES_OF"); ?>';
var lblTotalIncome = '<?php echo __("LBL_TOTAL_INCOME"); ?>';
var lblTotalExpense = '<?php echo __("LBL_TOTAL_EXPENSE"); ?>';
var lblBalance = '<?php echo __("LBL_BALANCE"); ?>';
var lblDataSavingFailed = '<?php echo __("LBL_DATA_SAVING_FAILED"); ?>';
var lblIncome = '<?php echo __("LBL_INCOME"); ?>';
var lblExpens = '<?php echo __("LBL_EXPENS"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var baseUrl = "<?php echo HTTP_SITE_URL; ?>";
var session_profile_id = "<?php echo $session_profile_id; ?>";
var session_user_id = "<?php echo $print_uid; ?>";
var isPermitted = "<?php echo $isPermitted?>";
var permission_permitted = "<?php echo $permission_permitted ?>";
var delete_permitted = "<?php echo $delete_permitted ?>";
var permitted = "<?php echo $permitted ?>";
var lblExpenseNotPermitted = "<?php echo __("LBL_EXPENSE_NOT_EDIT_PERMISSION"); ?>";
var OPERATION_TYPE = <?php echo json_encode($operation_type); ?>;
var permission_list = <?php echo json_encode($permissions); ?>;
var owner = <?php echo OWNER; ?>;
var lblPermissionList = "<?php echo __('LBL_PERMISSION_LIST'); ?>";
var lblAddPermission = "<?php echo __('LBL_ADD_PERMISSION'); ?>";
var lblEditPermission = "<?php echo __('LBL_EDIT_PERMISSION'); ?>";
var lblDeletePermission = "<?php echo __('LBL_DELETE_PERMISSION'); ?>";
var lblEnableRestrictionPermission = "<?php echo __('LBL_ENABLE_RESTRICTION_MESSAGE_PERMISSION'); ?>";
var lblErrorEditPermission = "<?php echo __('LBL_ERROR_NOT_EDIT_PERMISSION'); ?>";
var lblDeleteMessagePermission = "<?php echo __('LBL_DELETE_MESSAGE_PERMISSION'); ?>";
var lblNotDeleteMessagePermission = "<?php echo __('LBL_NOT_DELETE_MESSAGE_PERMISSION'); ?>";
var lblSelectPermission = "<?php echo __('LBL_SELECT_PERMISSION_MESSAGE'); ?>";
var lblEmailExistMessage = "<?php echo __('LBL_EMAIL_EXIST_MESSAGE'); ?>";
var lblRestrictedMessage = "<?php echo __('LBL_RESTRICTED'); ?>";
var lblOff = "<?php echo __('LBL_OFF'); ?>";
var lblRestrictedOn = "<?php echo __('LBL_ON_MESSAGE'); ?>";
var lblRestrictedModeErrorMessage = "<?php echo __('LBL_MODE_ERROR_MESSAGE'); ?>";
var lblEmail= "<?php echo __('LBL_EMAIL'); ?>";
var lblPermission= "<?php echo __('LBL_PERMISSION'); ?>";
var lblErrorSavingMessage = "<?php echo __("ERROR_SAVING_DATA"); ?>";
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden', 'id' => 'expenseData', 'value' => $expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden', 'id' => 'justCreated', 'value' => $justCreated));
echo $this->Form->create(null, array('id' => 'loadForm', 'url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'permissionForm', 'url' => array('controller' => 'GroupSetting', 'action' => 'addPermission')));
echo $this->Form->end();
?>
<?php if ($permissionLevel === NO_PERMIT) { ?>
<div style="color: red;text-align: center;"><?php echo __("LBL_EXPENSE_NOT_PERMITTED"); ?></div>
<?php } else { ?>
<h1 class="tabTitle">
<div id="expenseTitleDiv"></div>
</h1>
<table>
<tr>
<td>
<div id="expenseDescDiv"></div>
</td>
<td style="text-align:right">
<div id="expenseLoginAsDiv" style="text-align:right"></div>
</td>
</tr>
</table>
<table>
<tr>
<td><strong>
<div id="expenseCreatedByDiv"></div>
</strong></td>
<td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL; ?>images/home-icon.png" alt="" /> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" onClick="printReport()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr>
</table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left">
<tr>
<th>
<div id="expense_table_title_id"></div>
</th>
<th>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/expense_icon.png" align="absmiddle"><?php echo __("LBL_INCOMES"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/permission_icon.png"
align="absmiddle"> <?php echo __("LBL_PERMISSION"); ?></a></li>
<?php } ?>
</ul>
<div id="tabs-1">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="income_grid">
<tr>
<td />
</tr>
</table>
<div id="income_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid">
<tr>
<td />
</tr>
</table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL; ?>images/slide-right-icon.png" alt="" /></a>
<div id="income_chart" style=" height:130px;"></div>
<div id="expense_chart" style=" height:130px;"></div>
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL; ?>images/slide-left-icon.png" alt="" /></a>
<div id="balance_chart" style=" height:190px;"></div>
<div id="balance_description_div"> </div>
</div>
</div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id' => 'sendEmailForm', 'url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_BELOW_AND_SEND_EMAIL"); ?></b><br /> </div>
<div id="divExpenseURL"></div>
<div id="divExpenseFacebookURL"></div><br />
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table>
<tr>
<td> <?php echo __("LBL_OR"); ?> </br /> </br /> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email', array('label' => false, 'email' => __('LBL_PLEASE_PROVIDE_EMAIL'), 'length' => '200px', 'required' => 'true', 'style' => 'width:240px; height:20px;')); ?>
<br />
<?php
if ($isPermitted) {
echo $this->Form->end('Send');
} else {
echo '<input type="button" value="Send" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif" /></p>
</td>
</tr>
</table>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br />
<?php
echo $this->Form->create(null, array('id' => 'updateGroupExpenseForm', 'url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br />
<span id="error_currency"></span><br />
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType', array("value" => "2"));
?>
<table>
<tr>
<td><?php echo __("LBL_TITLE"); ?></td>
<td><?php echo $this->Form->input('title', array('label' => false, 'title' => '<?php echo __("LBL_EXPENSE_TITLE_MESSAGE"); ?>', 'length' => '200px', 'required' => 'false')); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_CURRENCY"); ?></td>
<td><?php echo $this->Form->input('currency', array('label' => false)); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_DESCRIPTION"); ?></td>
<td><?php echo $this->Form->textarea('description', array('rows' => '5', 'cols' => '45')); ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><br />
<?php
if ($isPermitted) {
echo $this->Form->end('Save');
} else {
echo '<input type="button" value="Save" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg2" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif"/>
</td>
</tr>
</table>
</div>
</div>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<div id="tabs-6">
<div class="tabContent">
<?php if ($permitted) { ?>
<div class="switch-container">
<label class="switch">
<input type="checkbox" id="restrictedMode" onchange="toggleRestrictedMode(this)">
<span class="slider"></span>
</label>
<span id="restrictedLabel"><?php echo __("LBL_RESTRICTED")?>: <?php echo __("LBL_OFF")?></span>
</div>
<?php } ?>
<table id="permission_grid">
<tr>
<td></td>
</tr>
</table>
<div id="permission_pager"></div>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/family_expense.js?v=1.0.3"></script>
<script src="<?php echo CDN_URL; ?>js/permission.js?v=1.0.3"></script>
<?php
echo $this->Form->create(null, array('id' => 'expenseForm', 'url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'participantForm', 'url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target' => 'blank', 'id' => 'printForm', 'url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden', 'id' => 'printExpenseList'));
echo $this->Form->input('printIncomeList', array('type' => 'hidden', 'id' => 'printIncomeList'));
echo $this->Form->input('printExpense', array('type' => 'hidden', 'id' => 'printExpense'));
echo $this->Form->input('printNames', array('type' => 'hidden', 'id' => 'printNames'));
echo $this->Form->end();
?>
<script type="application/javascript">
$(function() {
$("#tabs").tabs();
$("#tabs").tabs({
activate: function(event, ui) {
var newIndex = ui.newTab.index();
if (newIndex == 0) {
dashBoard.setCategory(2);
dashBoard.setIncomeGridExtension();
} else if (newIndex == 1) {
dashBoard.setCategory(1);
dashBoard.setExpenseGridExtension();
} else if (newIndex == 2) {
dashBoard.drawGraph();
} else if (newIndex == 3) {
var expense_url = "<?php echo HTTP_SITE_URL . "/"; ?>" + dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_FAMILY_EXPENSE"); ?> "' + dashBoard.expense.title + '" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?><?php echo __("LBL_THE_URL_IS"); ?> :<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="' + expense_url + '" >' + expense_url + '</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __('LBL_ACCESS_FROM_MOBILE'); ?><br/>");
} else if (newIndex == 4) {
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
}
else if (newIndex == 5) {
if(permitted) {
var label = document.getElementById("restrictedLabel");
if (userPermission.restrict_mode == 1) {
$('#restrictedMode').prop('checked', true);
label.textContent = lblRestrictedMessage+": "+lblRestrictedOn;
} else {
$('#restrictedMode').prop('checked', false);
label.textContent = lblRestrictedMessage+": "+lblOff;
}
}
userPermission.displayPermissionList();
userPermission.setPermissionGridExtension();
}
}
});
$("input[type=submit]").button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function() {
$('.graphRight').hide(1000);
$('.graphLeft').animate({
width: 740
}, {
duration: 1000
});
$("#slideRight").show();
});
$("#slideRight").click(function() {
$("#slideRight").hide();
$('.graphLeft').animate({
width: 507
}, {
duration: 1000
});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function(event) {
dashBoard.createGraphImage()
});
function createGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createGroupExpense";
}
}
function createMessExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createMessExpense";
}
}
function createFamilyExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createFamilyExpense";
}
}
function gotoHome() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>";
}
}
function printGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/print";
}
}
function printReport() {
if (top.location != self.location) {
var targetUrl = "<?php echo HTTP_SITE_URL . '/Expense/printReport/' . $uniqueURL . '/' . $print_uid; ?>";
window.open(targetUrl, "_blank");
}
}
function toggleRestrictedMode(checkbox) {
var label = document.getElementById("restrictedLabel");
var restrict = 0;
var level_value = lblOff;
if (checkbox.checked) {
restrict = 1;
}
if(Object.keys(userPermission.permissions).length > 1) {
$('#restrictedMode').prop('checked', true);
alert(lblRestrictedModeErrorMessage);
return false;
}
var permissionObj = {
expense_id: dashBoard.expense.id,
mode: restrict,
unique_url: getUniqueUrl()
}
$.ajax({
type: 'POST',
url: "<?php echo HTTP_SITE_URL . '/GroupSetting/addRestriction'?>",
data: permissionObj,
success: function (data, textStatus, xhr) {
if(data.restricted_mode === true) {
userPermission.restrict_mode = 1;
level_value = lblRestrictedOn;
$('#restrictedMode').prop('checked', true);
}else {
userPermission.restrict_mode = 0;
$('#restrictedMode').prop('checked', false);
}
dashBoard.expense.version = parseInt(dashBoard.expense.version) + 1;
$("#ExpenseVersion").val(dashBoard.expense.version);
label.textContent = lblRestrictedMessage+": " + level_value;
alert(data.message);
},
error: function (xhr, textStatus, error) {
return false;
}
});
}
</script>
<script src="<?php echo CDN_URL; ?>js/common.js"></script>
</body>
</html>

View File

@@ -0,0 +1,433 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<style type="text/css">
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: .79rem;
background:#fff;
}
.ui-jqgrid .ui-jqgrid-view, .ui-jqgrid-bdiv, .ui-jqgrid-btable{width: 100% !important; overflow-x:hidden !important;}
.ui-state-hover .ui-pg-div .ui-icon{ margin: -1px 0; padding:0; height:18px;}
.ui-icon-closethick{cursor: pointer;}
#TblGrid_grid ,#TblGrid_income_grid{
display:block;
border: 0px solid red;
padding:5px;
margin-top:5px;
width:290px;
height:140px;
overflow:auto;
}
</style>
<style type="text/css">
#graphRight {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
margin-top: 0px;
width: 298px;
height: 285px;
z-index: 0;
}
#graphRightInner {
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 5px 5px 5px 5px;
padding : 30px;
width: 300px;
height: 285px;
border: 1px solid black;
z-index: 1;
}
.ui-front {
z-index: 100;
}
.ui-dialog-titlebar-close {
visibility: hidden;
}
.graph .graphLeft{width: 503px; float:left; padding:10px; min-height:285px; overflow:auto;}
.graph .graphRight{width: 207px; float:left; border-left: 1px solid #abc6df; padding:10px 10px 10px 3px; min-height:285px;}
</style>
<script type="text/javascript">
var lblForWhatReason = '<?php echo __("LBL_WHAT_REASON"); ?>';
var lblExpenseList = '<?php echo __("LBL_EXPENSE_LIST"); ?>';
var lblCategory = '<?php echo __("LBL_CATEGORY"); ?>';
var lblExpenseNOTFOUND = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
var lblCreatedOna = '<?php echo __("LBL_CREATED_ON"); ?>';
var lblWhen = '<?php echo __("LBL_WHEN"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblAmount = '<?php echo __("LBL_AMOUNT"); ?>';
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblModifyExpense = '<?php echo __("LBL_MODIFY_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblIncomeList = '<?php echo __("LBL_INCOME_LIST"); ?>';
var lblFindIncome = '<?php echo __("LBL_FIND_INCOME"); ?>';
var lblAddIncome = '<?php echo __("LBL_ADD_INCOME"); ?>';
var lblModifyIncome = '<?php echo __("LBL_MODIFY_INCOME"); ?>';
var lblDeleteIncome = '<?php echo __("LBL_DELETE_INCOME"); ?>';
var lblWantDeleteIncome = '<?php echo __("LBL_DO_YOU_DELETE_INCOME"); ?>';
var lblEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblIncomesOf = '<?php echo __("LBL_INCOMES_OF"); ?>';
var lblTotalIncome = '<?php echo __("LBL_TOTAL_INCOME"); ?>';
var lblTotalExpense = '<?php echo __("LBL_TOTAL_EXPENSE"); ?>';
var lblBalance = '<?php echo __("LBL_BALANCE"); ?>';
var lblDataSavingFailed = '<?php echo __("LBL_DATA_SAVING_FAILED"); ?>';
var lblIncome = '<?php echo __("LBL_INCOME"); ?>';
var lblExpens = '<?php echo __("LBL_EXPENS"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td> <div id="expenseDescDiv"></div></td><td style="text-align:right"><div id="expenseLoginAsDiv" style="text-align:right"></div></td></tr></table>
<table>
<tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" href="<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>" onClick="printReport()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr></table>
<div id="participantBox" >
<div class="round">
<table class="gridTable" style="text-align:left" >
<tr>
<th>
<div id="expense_table_title_id"></div>
</th>
<th >
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"><?php echo __("LBL_INCOMES"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="income_grid"><tr><td/></tr></table>
<div id="income_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="income_chart" style=" height:130px;"></div>
<div id="expense_chart" style=" height:130px;"></div>
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:190px;"></div>
<div id="balance_description_div"> </div>
</div>
</div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_BELOW_AND_SEND_EMAIL"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => __('LBL_PLEASE_PROVIDE_EMAIL'),'length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> <img id="loadImg" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></p></td></tr></table>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType',array("value"=>"2"));
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?> <img id="loadImg" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/family_expense.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printIncomeList', array('type' => 'hidden','id'=>'printIncomeList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
dashBoard.setCategory(2);
dashBoard.setIncomeGridExtension();
} else if(newIndex == 1){
dashBoard.setCategory(1);
dashBoard.setExpenseGridExtension();
} else if(newIndex == 2){
dashBoard.drawGraph();
} else if(newIndex == 3){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_FAMILY_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?><?php echo __("LBL_THE_URL_IS"); ?> :<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __('LBL_ACCESS_FROM_MOBILE'); ?><br/>");
} else if(newIndex == 4){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 507}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
function printReport(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>";
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,360 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<script type="text/javascript">
var lblForWhatReason = '<?php echo __("LBL_WHAT_REASON"); ?>';
var lblExpenseList = '<?php echo __("LBL_EXPENSE_LIST"); ?>';
var lblCategory = '<?php echo __("LBL_CATEGORY"); ?>';
var lblExpenseNOTFOUND = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
var lblCreatedOna = '<?php echo __("LBL_CREATED_ON"); ?>';
var lblWhen = '<?php echo __("LBL_WHEN"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblAmount = '<?php echo __("LBL_AMOUNT"); ?>';
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblModifyExpense = '<?php echo __("LBL_MODIFY_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblIncomeList = '<?php echo __("LBL_INCOME_LIST"); ?>';
var lblFindIncome = '<?php echo __("LBL_FIND_INCOME"); ?>';
var lblAddIncome = '<?php echo __("LBL_ADD_INCOME"); ?>';
var lblModifyIncome = '<?php echo __("LBL_MODIFY_INCOME"); ?>';
var lblDeleteIncome = '<?php echo __("LBL_DELETE_INCOME"); ?>';
var lblWantDeleteIncome = '<?php echo __("LBL_DO_YOU_DELETE_INCOME"); ?>';
var lblEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblIncomesOf = '<?php echo __("LBL_INCOMES_OF"); ?>';
var lblTotalIncome = '<?php echo __("LBL_TOTAL_INCOME"); ?>';
var lblTotalExpense = '<?php echo __("LBL_TOTAL_EXPENSE"); ?>';
var lblBalance = '<?php echo __("LBL_BALANCE"); ?>';
var lblDataSavingFailed = '<?php echo __("LBL_DATA_SAVING_FAILED"); ?>';
var lblIncome = '<?php echo __("LBL_INCOME"); ?>';
var lblExpens = '<?php echo __("LBL_EXPENS"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td> <div id="expenseDescDiv"></div></td><td text-align:right><div id="expenseLoginAsDiv" style="text-align:right"></div></td></tr></table>
<table>
<tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr></table>
<div id="participantBox" >
<div class="round">
<table class="gridTable" style="text-align:left" >
<tr>
<th>
<div id="expense_table_title_id"></div>
</th>
<th >
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"><?php echo __("LBL_INCOMES"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="income_grid"><tr><td/></tr></table>
<div id="income_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="income_chart" style=" height:130px;"></div>
<div id="expense_chart" style=" height:130px;"></div>
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:190px;"></div>
<div id="balance_description_div"> </div>
</div>
</div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_BELOW_AND_SEND_EMAIL"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => __('LBL_PLEASE_PROVIDE_EMAIL'),'length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> </p></td></tr></table>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType',array("value"=>"2"));
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?></td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/family_expense_demo.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printIncomeList', array('type' => 'hidden','id'=>'printIncomeList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
dashBoard.setCategory(2);
dashBoard.setIncomeGridExtension();
} else if(newIndex == 1){
dashBoard.setCategory(1);
dashBoard.setExpenseGridExtension();
} else if(newIndex == 2){
dashBoard.drawGraph();
} else if(newIndex == 3){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_FAMILY_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?><?php echo __("LBL_THE_URL_IS"); ?> :<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __('LBL_ACCESS_FROM_MOBILE'); ?><br/>");
} else if(newIndex == 4){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 507}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,661 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/style-old.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/grid.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<script type="application/javascript">
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousExpense = "<?php echo __('LBL_PREVIOUS_EXPENSE'); ?>";
var lblNewExpense = "<?php echo __('LBL_NEW_EXPENSE'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblExpenseNotFound = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
var lblBalanceLink = '<?php echo __("LBL_BALANCE_LINK"); ?>';
var lblSettledExpenseNotEditable = '<?php echo __("LBL_SETTLED_EXPENSE_NOT_EDITABLE"); ?>';
var baseUrl = "<?php echo HTTP_SITE_URL; ?>";
var session_profile_id = "<?php echo $session_profile_id; ?>";
var session_user_id = "<?php echo $print_uid; ?>";
var isPermitted = "<?php echo $isPermitted?>";
var permission_permitted = "<?php echo $permission_permitted ?>";
var delete_permitted = "<?php echo $delete_permitted ?>";
var permitted = "<?php echo $permitted ?>";
var lblExpenseNotPermitted = "<?php echo __("LBL_EXPENSE_NOT_EDIT_PERMISSION"); ?>";
var OPERATION_TYPE = <?php echo json_encode($operation_type); ?>;
var permission_list = <?php echo json_encode($permissions); ?>;
var owner = <?php echo OWNER; ?>;
var lblPermissionList = "<?php echo __('LBL_PERMISSION_LIST'); ?>";
var lblAddPermission = "<?php echo __('LBL_ADD_PERMISSION'); ?>";
var lblEditPermission = "<?php echo __('LBL_EDIT_PERMISSION'); ?>";
var lblDeletePermission = "<?php echo __('LBL_DELETE_PERMISSION'); ?>";
var lblEnableRestrictionPermission = "<?php echo __('LBL_ENABLE_RESTRICTION_MESSAGE_PERMISSION'); ?>";
var lblErrorEditPermission = "<?php echo __('LBL_ERROR_NOT_EDIT_PERMISSION'); ?>";
var lblDeleteMessagePermission = "<?php echo __('LBL_DELETE_MESSAGE_PERMISSION'); ?>";
var lblNotDeleteMessagePermission = "<?php echo __('LBL_NOT_DELETE_MESSAGE_PERMISSION'); ?>";
var lblSelectPermission = "<?php echo __('LBL_SELECT_PERMISSION_MESSAGE'); ?>";
var lblEmailExistMessage = "<?php echo __('LBL_EMAIL_EXIST_MESSAGE'); ?>";
var lblRestrictedMessage = "<?php echo __('LBL_RESTRICTED'); ?>";
var lblOff = "<?php echo __('LBL_OFF'); ?>";
var lblRestrictedOn = "<?php echo __('LBL_ON_MESSAGE'); ?>";
var lblRestrictedModeErrorMessage = "<?php echo __('LBL_MODE_ERROR_MESSAGE'); ?>";
var lblEmail= "<?php echo __('LBL_EMAIL'); ?>";
var lblPermission= "<?php echo __('LBL_PERMISSION'); ?>";
var lblOperation= "<?php echo __('LBL_OPERATION'); ?>";
var lblChangedBy= "<?php echo __('LBL_CHANGED_BY'); ?>";
var lblPerticipentNotDelete= "<?php echo __('LBL_PARTICIPENT_NOT_DELETE'); ?>";
var nameLength = "<?php echo PARTICIPENT_NAME_LENGTH?>";
var participantNameErrorMessage = "<?php echo __("LBL_PARTICIPENT_NAME_ERROR"); ?>";
var nameErrorMessage = "<?php echo __("YOUR_NAME_NOT_EMPTY_MAX_CHAR"); ?>";
var lblErrorSavingMessage = "<?php echo __("ERROR_SAVING_DATA"); ?>";
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden', 'id' => 'expenseData', 'value' => $expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden', 'id' => 'justCreated', 'value' => $justCreated));
echo $this->Form->create(null, array('id' => 'loadForm', 'url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<?php if ($permissionLevel === NO_PERMIT) { ?>
<div style="color: red;text-align: center;"><?php echo __("LBL_EXPENSE_NOT_PERMITTED"); ?></div>
<?php } else { ?>
<h1 class="tabTitle">
<div id="expenseTitleDiv"></div>
</h1>
<table>
<tr>
<td>
<div id="expenseDescDiv"></div>
</td>
<td style="text-align:right">
<div id="expenseLoginAsDiv" style="text-align:right"></div>
</td>
</tr>
</table>
<table>
<tr>
<td><strong>
<div id="expenseCreatedByDiv"></div>
</strong></td>
<td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page"
src="<?php echo CDN_URL; ?>images/home-icon.png"
alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer"
onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer"
onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer"
onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" onClick="printReport()" target="_blank">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr>
</table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left">
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th>
<a style="cursor:pointer" id="create-participant"><img
src="<?php echo CDN_URL; ?>images/add-icon.png"
alt=""/> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<?php } ?>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/expense_icon.png"
align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/balance_icon.png"
align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/participant_icon.png"
align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/log_icon.png"
align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/share_icon.png"
align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/setting_icon.png"
align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<li><a href="#tabs-7"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/permission_icon.png"
align="absmiddle"> <?php echo __("LBL_PERMISSION"); ?></a></li>
<?php } ?>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid">
<tr>
<td/>
</tr>
</table>
<div id="expense_pager"></div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL; ?>images/slide-right-icon.png"
alt=""/></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL; ?>images/slide-left-icon.png" alt=""/></a>
<h2><?php echo __("LBL_HOW_BLANCE"); ?></h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL; ?>images/info-icon.png"
alt=""/> <?php echo __("LBL_CLICK_ON_THE"); ?> 'Mark
Settle' <?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
</div>
</div>
</div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid">
<tr>
<td/>
</tr>
</table>
<div id="participant_pager"></div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id' => 'viewLogForm', 'return' => false, 'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate', array('readonly' => true, 'lable' => false)); ?></td>
<td><?php echo $this->Form->input('toDate', array('readonly' => true, 'lable' => false)); ?></td>
<td><?php echo $this->Form->end('View Log'); ?> <img id="loadImg"
style="display:none;margin-top:-10px;"
src="<?php echo CDN_URL; ?>images/loading.gif"/>
</td>
</tr>
</table>
<table id="log_grid">
<tr>
<td></td>
</tr>
</table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id' => 'sendEmailForm', 'url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br/></div>
<div id="divExpenseURL"></div>
<div id="divExpenseFacebookURL"></div>
<br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table>
<tr>
<td> <?php echo __('LBL_OR'); ?> </br /> </br /> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>
:<?php echo $this->Form->input('email', array('label' => false, 'email' => '<?php echo __("LBL_EMAIL_MESSAGE")?>' , 'length' => '200px', 'required' => 'true', 'style' => 'width:240px; height:20px;')); ?>
<br/>
<?php //echo $this->Form->end('Send');
?>
<?php
if ($isPermitted) {
echo $this->Form->end('Send');
} else {
echo '<input type="button" value="Send" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg1" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif"/></p>
</td>
</tr>
</table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br/>
<?php
echo $this->Form->create(null, array('id' => 'updateGroupExpenseForm', 'url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType', array("value" => "2"));
?>
<table>
<tr>
<td><?php echo __("LBL_TITLE"); ?></td>
<td><?php echo $this->Form->input('title', array('label' => false, 'title' => '<?php echo __("LBL_EXPENSE_TITLE_MESSAGE"); ?> ', 'length' => '200px', 'required' => 'false')); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_CURRENCY"); ?></td>
<td><?php echo $this->Form->input('currency', array('label' => false)); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_DESCRIPTION"); ?></td>
<td><?php echo $this->Form->textarea('description', array('rows' => '5', 'cols' => '45')); ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><br/>
<?php
if ($isPermitted) {
echo $this->Form->end('Save');
} else {
echo '<input type="button" value="Save" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg2" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif"/>
</td>
</tr>
</table>
</div>
</div>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<div id="tabs-7">
<div class="tabContent">
<?php if ($permitted) { ?>
<div class="switch-container">
<label class="switch">
<input type="checkbox" id="restrictedMode" onchange="toggleRestrictedMode(this)">
<span class="slider"></span>
</label>
<span id="restrictedLabel"><?php echo __("LBL_RESTRICTED")?>: <?php echo __("LBL_OFF")?></span>
</div>
<?php } ?>
<table id="permission_grid">
<tr>
<td></td>
</tr>
</table>
<div id="permission_pager"></div>
</div>
</div>
<?php } ?>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/group_expense.js?v=1.0.5"></script>
<script src="<?php echo CDN_URL; ?>js/permission.js?v=1.0.3"></script>
<?php
echo $this->Form->create(null, array('id' => 'expenseForm', 'url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'participantForm', 'url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'permissionForm', 'url' => array('controller' => 'GroupSetting', 'action' => 'addPermission')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target' => 'blank', 'id' => 'printForm', 'url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden', 'id' => 'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden', 'id' => 'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden', 'id' => 'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden', 'id' => 'printNames'));
echo $this->Form->end();
?>
<script type="application/javascript">
$(function () {
$("#tabs").tabs();
$("input[type=submit]").button();
$("#tabs").tabs({
activate: function (event, ui) {
var newIndex = ui.newTab.index();
if (newIndex == 0) {
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if (newIndex == 1) {
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if (newIndex == 2) {
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if (newIndex == 3) {
dashBoard.generateLogList("", 1);
if ($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == "") {
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate", lastWeek);
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if (newIndex == 4) {
var expense_url = "<?php echo HTTP_SITE_URL . "/"; ?>" + dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_GROUP_EXPENSE"); ?> "' + dashBoard.expense.title + '" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="' + expense_url + '" >' + expense_url + '</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if (newIndex == 5) {
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
} else if (newIndex === 6) {
if(permitted) {
var label = document.getElementById("restrictedLabel");
if (userPermission.restrict_mode == 1) {
$('#restrictedMode').prop('checked', true);
label.textContent = lblRestrictedMessage+": "+lblRestrictedOn;
} else {
$('#restrictedMode').prop('checked', false);
label.textContent = lblRestrictedMessage+": "+lblOff;
}
}
userPermission.displayPermissionList();
userPermission.setPermissionGridExtension();
}
}
});
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function () {
$('.graphRight').hide(1000);
$('.graphLeft').animate({
width: 740
}, {
duration: 1000
});
$("#slideRight").show();
});
$("#slideRight").click(function () {
$("#slideRight").hide();
$('.graphLeft').animate({
width: 298
}, {
duration: 1000
});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function (event) {
dashBoard.createGraphImage()
});
$("#ExpenseFromDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$("#ExpenseToDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createGroupExpense";
}
}
function createMessExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createMessExpense";
}
}
function createFamilyExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createFamilyExpense";
}
}
function gotoHome() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>";
}
}
function printGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/print";
}
}
function printReport() {
if (top.location != self.location) {
var targetUrl = "<?php echo HTTP_SITE_URL . '/Expense/printReport/' . $uniqueURL . '/' . $print_uid; ?>";
window.open(targetUrl, "_blank");
}
}
function toggleRestrictedMode(checkbox) {
var label = document.getElementById("restrictedLabel");
var restrict = 0;
var level_value = lblOff;
if (checkbox.checked) {
restrict = 1;
}
if(Object.keys(userPermission.permissions).length > 1) {
$('#restrictedMode').prop('checked', true);
alert(lblRestrictedModeErrorMessage);
return false;
}
var permissionObj = {
expense_id: dashBoard.expense.id,
mode: restrict,
unique_url: getUniqueUrl()
}
$.ajax({
type: 'POST',
url: "<?php echo HTTP_SITE_URL . '/GroupSetting/addRestriction'?>",
data: permissionObj,
success: function (data, textStatus, xhr) {
if(data.restricted_mode === true) {
userPermission.restrict_mode = 1;
level_value = lblRestrictedOn;
$('#restrictedMode').prop('checked', true);
}else {
userPermission.restrict_mode = 0;
$('#restrictedMode').prop('checked', false);
}
dashBoard.expense.version = parseInt(dashBoard.expense.version) + 1;
$("#ExpenseVersion").val(dashBoard.expense.version);
label.textContent = lblRestrictedMessage+": " + level_value;
alert(data.message);
},
error: function (xhr, textStatus, error) {
return false;
}
});
}
</script>
<script src="<?php echo CDN_URL; ?>js/common.js"></script>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,520 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<style type="text/css">
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: .79rem;
background:#fff;
}
.ui-jqgrid .ui-jqgrid-view, .ui-jqgrid-bdiv, .ui-jqgrid-btable{width: 100% !important; overflow-x:hidden !important;}
.ui-state-hover .ui-pg-div .ui-icon{ margin: -1px 0; padding:0; height:18px;}
.ui-icon-closethick{cursor: pointer;}
#graphRight {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
margin-top: 0px;
width: 425px;
height: 285px;
z-index: 0;
}
#graphRightInner {
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 5px 5px 5px 5px;
padding : 30px;
width: 425px;
height: 285px;
border: 1px solid black;
z-index: 1;
}
.ui-front {
z-index: 100;
}
.ui-dialog-titlebar-close {
visibility: hidden;
}
label[for="ExpenseFromDate"] {
margin-right: 10px;
}
label[for="ExpenseToDate"] {
margin-right: 10px;
}
</style>
<script>
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousDescription = "<?php echo __('LBL_PREVIOUS_DESCRIPTION'); ?>";
var lblNewDescription = "<?php echo __('LBL_NEW_DESCRIPTION'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblExpenseNotFound = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td> <div id="expenseDescDiv"></div></td><td text-align:right><div id="expenseLoginAsDiv" style="text-align:right"></div></td></tr></table>
<table>
<tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" href="<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>" onClick="printReport()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr></table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left" >
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th >
<a style="cursor:pointer" id="create-participant"><img src="<?php echo CDN_URL;?>images/add-icon.png" alt=""/> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/participant_icon.png" align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/log_icon.png" align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<h2>How to balance?</h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL;?>images/info-icon.png" alt=""/> <?php echo __("LBL_CLICK_ON_THE"); ?> <img src="<?php echo CDN_URL;?>images/tick-icon.png" alt=""/><?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
</div>
</div>
</div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid"><tr><td/></tr></table>
<div id="participant_pager"> </div>
</div>
</div>
<div id="tabs-4" >
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'viewLogForm','return'=>false,'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate',array('readonly'=>true,'lable'=>false)); ?></td>
<td><?php echo $this->Form->input('toDate',array('readonly'=>true,'lable'=>false));?></td>
<td><?php echo $this->Form->end('View Log');?> <img id="loadImg" style="display:none;margin-top:-10px;" src="<?php echo CDN_URL;?>images/loading.gif" /></td>
</tr>
</table>
<table id="log_grid"><tr> <td></td></tr></table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => 'Please provide your email','length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> <img id="loadImg1" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></p></td></tr></table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType',array("value"=>"2"));
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?> <img id="loadImg2" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/group_expense.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden','id'=>'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if(newIndex == 1){
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if(newIndex == 2){
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if(newIndex == 3){
dashBoard.generateLogList("",1);
if($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == ""){
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate",lastWeek );
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if(newIndex == 4){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_GROUP_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if(newIndex == 5){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 298}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
$( "#ExpenseFromDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$( "#ExpenseToDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
function printReport(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>";
}
}
</script>
<style>
fieldset { padding:0; border:0; margin-top:5px; }
</style>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,458 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<script type="application/javascript">
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousDescription = "<?php echo __('LBL_PREVIOUS_DESCRIPTION'); ?>";
var lblNewDescription = "<?php echo __('LBL_NEW_DESCRIPTION'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblExpenseNotFound = '<?php echo __("LBL_EXPENSE_NOT_FOUND"); ?>';
var baseUrl = "<?php echo HTTP_SITE_URL; ?>";
var session_profile_id = "";
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td> <div id="expenseDescDiv"></div></td><td text-align:right><div id="expenseLoginAsDiv" style="text-align:right"></div></td></tr></table>
<table>
<tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr></table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left" >
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th >
<a style="cursor:pointer" id="create-participant"><img src="<?php echo CDN_URL;?>images/add-icon.png" alt=""/> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/participant_icon.png" align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/log_icon.png" align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<h2><?php echo __("LBL_HOW_BLANCE"); ?></h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL;?>images/info-icon.png" alt=""/> <?php echo __("LBL_CLICK_ON_THE"); ?> <img src="<?php echo CDN_URL;?>images/tick-icon.png" alt=""/><?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
</div>
</div>
</div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid"><tr><td/></tr></table>
<div id="participant_pager"> </div>
</div>
</div>
<div id="tabs-4" >
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'viewLogForm','return'=>false,'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate',array('readonly'=>true,'lable'=>false)); ?></td>
<td><?php echo $this->Form->input('toDate',array('readonly'=>true,'lable'=>false));?></td>
<td><?php echo $this->Form->end('View Log');?> <img id="loadImg" style="display:none;margin-top:-10px;" src="<?php echo CDN_URL;?>images/loading.gif" /></td>
</tr>
</table>
<table id="log_grid"><tr> <td></td></tr></table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?></p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => 'Please provide your email','length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> <img id="loadImg1" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></p></td></tr></table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_INFORMATION"); ?></b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
echo $this->Form->hidden('expenseType',array("value"=>"2"));
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?> <img id="loadImg2" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/group_expense_demo.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden','id'=>'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if(newIndex == 1){
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if(newIndex == 2){
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if(newIndex == 3){
dashBoard.generateLogList("",1);
if($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == ""){
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate",lastWeek );
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if(newIndex == 4){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_GROUP_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if(newIndex == 5){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 298}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
$( "#ExpenseFromDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$( "#ExpenseToDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
</script>
<style>
fieldset { padding:0; border:0; margin-top:5px; }
</style>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

106
app/View/Expense/meal.ctp Normal file
View File

@@ -0,0 +1,106 @@
<script>
function printPage(){
window.print();
}
</script>
<div id="exportPrintTable">
<div class="wrapper">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p>
<div class="description">
<p><strong> ExpenseCount "<?php echo $expense["title"];?>"</strong></p>
<?php if(isset($expense["description"])){ ?>
<p><?php echo $expense["description"];?></p>
<?php } ?>
<p><?php echo __("LBL_CREATED_BY"); ?> <?php echo $createdBy;?>, <?php echo __('LBL_ON'); ?> <?php echo $createdDate;?></p>
</div>
<div class="print">
<?php echo __("LBL_PRINTED_BY"); ?> <?php echo $printedBy;?> <span><?php echo date("d/m/Y - H:i");?></span>
</div>
<p><?php echo $printedBy;?> <?php echo __("LBL_SHOULD_VERIFY"); ?></p>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_DATE"); ?></th>
<th><?php echo __("LBL_DAY"); ?></th>
<th><?php echo __("LBL_BREAKFAST"); ?></th>
<th><?php echo __("LBL_LUNCH"); ?></th>
<th><?php echo __("LBL_DINNER"); ?></th>
<th><?php echo __("LBL_TOTAL"); ?></th>
</tr>
</thead>
<tbody>
<?php
$subtotal = 0;
foreach($expenseList as $key=>$value){
$total = $value["breakfast"]+$value["lunch"]+$value["dinner"];
$subtotal = $subtotal + $total;
?>
<tr>
<td align="center"><?php echo $value["date"];?></td>
<td align="center"><?php echo $value["day"];?></td>
<td align="center"><?php echo $value["breakfast"];?></td>
<td align="center"><?php echo $value["lunch"];?></td>
<td align="center"><?php echo $value["dinner"];?></td>
<td align="center"><?php echo $total;?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0;font-weight: bold;" align="right"> <?php echo __("LBL_SUBTOTAL"); ?> : </td>
<td align="center" style="border:0;font-weight:bold;"> <?php echo $subtotal;?> </td>
</tr>
</tfoot>
</table>
<div class="description">
<p><strong><u><?php echo __("LBL_MEAL_SUMMARY"); ?>:</u></strong></p>
<table style="font-size:12px;">
<tr><td><?php echo __("LBL_TOTAL_MEAL"); ?>: </td><td><b><?php echo $balanceArray[0];?>,</b></td><td><?php echo __("LBL_TOTAL_COST"); ?>: </td><td><b><?php echo $balanceArray[2]." ".$expense["currency"];?></b></td></tr>
<?php if($balanceArray[0] > 0){ ?>
<tr><td colspan="4"><?php echo __(LBL_HENCE_PER_COST); ?>:(<?php echo $balanceArray[2];?> / <?php echo $balanceArray[0];?>) = <b> <?php echo round($balanceArray[2]/$balanceArray[0],2)." ".$expense["currency"];?></b></td></tr>
<?php } else { ?>
<tr><td colspan="4"><?php echo __(LBL_HENCE_PER_COST); ?>:<b><?php echo "0.00".$expense["currency"];?></b></td></tr>
<?php } ?>
</table>
</div>
<div class="footerText"><?php echo __('LBL_ADD_MODIFY_DELETE_MEAL_NECESSARY'); ?><br/>
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div>
<div class="footer-pdf-print-link hidden-print">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generatePdfBtn").on('click', function () {
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
})
});
</script>

View File

@@ -0,0 +1,737 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<script type="application/javascript">
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousExpense = "<?php echo __('LBL_PREVIOUS_EXPENSE'); ?>";
var lblNewExpense = "<?php echo __('LBL_NEW_EXPENSE'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblRecordNotFound = '<?php echo __("LBL_RECORD_NOT_FOUND"); ?>';
var lblExpenseLog = '<?php echo __("LBL_EXPENSE_LOG"); ?>';
var lblFindLog = '<?php echo __("LBL_FIND_LOG"); ?>';
var lblExpenseType = '<?php echo __("LBL_EXPENSE_TYPE"); ?>';
var lblAll = '<?php echo __("LBL_ALL"); ?>';
var lblMealsAddedOnThisDate = '<?php echo __("LBL_MEALS_ADDED_ON_THIS_DATE"); ?>';
var lblShouldPayTo = '<?php echo __("LBL_SHOULD_PAY_TO"); ?>';
var lblMealsForYou = '<?php echo __("LBL_MEALS_FOR_YOU"); ?>';
var lblOutOf = '<?php echo __("LBL_OUT_OF"); ?>';
var lblAndCost = '<?php echo __("LBL_AND_COST"); ?>';
var lblHencePerCost = '<?php echo __("LBL_HENCE_PER_COST"); ?>';
var lblTotalMeal = '<?php echo __("LBL_TOTAL_MEAL"); ?>';
var lblMealCharge = '<?php echo __("LBL_MEAL_CHARGE"); ?>';
var lblDate = '<?php echo __("LBL_DATE"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblBreakfast = '<?php echo __("LBL_BREAKFAST"); ?>';
var lblLunch = '<?php echo __("LBL_LUNCH"); ?>';
var lblDinner = '<?php echo __("LBL_DINNER"); ?>';
var lblMealList = '<?php echo __("LBL_MEAL_LIST"); ?>';
var lblAddMealInformation = '<?php echo __("LBL_ADD_MEAL_INFORMATION"); ?>';
var lblEditMealInformation = '<?php echo __("LBL_EDIT_MEAL_INFORMATION"); ?>';
var lblFindMealInformation = '<?php echo __("LBL_FIND_MEAL_INFORMATION"); ?>';
var lblDeleteMealInformation = '<?php echo __("LBL_DELETE_MEAL_INFORMATION"); ?>';
var lblDeleteMeal = '<?php echo __("LBL_DELETE_MEAL"); ?>';
var lblWantDeleteMeal = '<?php echo __("LBL_WANT_DELETE_MEAL"); ?>';
var lblBalanceLink = '<?php echo __("LBL_BALANCE_LINK"); ?>';
var lblSettledExpenseNotEditable = '<?php echo __("LBL_SETTLED_EXPENSE_NOT_EDITABLE"); ?>';
var baseUrl = "<?php echo HTTP_SITE_URL; ?>";
var session_profile_id = "<?php echo $session_profile_id; ?>";
var session_user_id = "<?php echo $print_uid; ?>";
var isPermitted = "<?php echo $isPermitted?>";
var permission_permitted = "<?php echo $permission_permitted ?>";
var delete_permitted = "<?php echo $delete_permitted ?>";
var permitted = "<?php echo $permitted ?>";
var lblExpenseNotPermitted = "<?php echo __("LBL_EXPENSE_NOT_EDIT_PERMISSION"); ?>";
var OPERATION_TYPE = <?php echo json_encode($operation_type); ?>;
var permission_list = <?php echo json_encode($permissions); ?>;
var owner = <?php echo OWNER; ?>;
var lblPermissionList = "<?php echo __('LBL_PERMISSION_LIST'); ?>";
var lblAddPermission = "<?php echo __('LBL_ADD_PERMISSION'); ?>";
var lblEditPermission = "<?php echo __('LBL_EDIT_PERMISSION'); ?>";
var lblDeletePermission = "<?php echo __('LBL_DELETE_PERMISSION'); ?>";
var lblEnableRestrictionPermission = "<?php echo __('LBL_ENABLE_RESTRICTION_MESSAGE_PERMISSION'); ?>";
var lblErrorEditPermission = "<?php echo __('LBL_ERROR_NOT_EDIT_PERMISSION'); ?>";
var lblDeleteMessagePermission = "<?php echo __('LBL_DELETE_MESSAGE_PERMISSION'); ?>";
var lblNotDeleteMessagePermission = "<?php echo __('LBL_NOT_DELETE_MESSAGE_PERMISSION'); ?>";
var lblSelectPermission = "<?php echo __('LBL_SELECT_PERMISSION_MESSAGE'); ?>";
var lblEmailExistMessage = "<?php echo __('LBL_EMAIL_EXIST_MESSAGE'); ?>";
var lblRestrictedMessage = "<?php echo __('LBL_RESTRICTED'); ?>";
var lblOff = "<?php echo __('LBL_OFF'); ?>";
var lblRestrictedOn = "<?php echo __('LBL_ON_MESSAGE'); ?>";
var lblRestrictedModeErrorMessage = "<?php echo __('LBL_MODE_ERROR_MESSAGE'); ?>";
var lblEmail= "<?php echo __('LBL_EMAIL'); ?>";
var lblPermission= "<?php echo __('LBL_PERMISSION'); ?>";
var lblOperation= "<?php echo __('LBL_OPERATION'); ?>";
var lblChangedBy= "<?php echo __('LBL_CHANGED_BY'); ?>";
var lblPerticipentNotDelete= "<?php echo __('LBL_PARTICIPENT_NOT_DELETE'); ?>";
var nameLength = "<?php echo PARTICIPENT_NAME_LENGTH?>";
var participantNameErrorMessage = "<?php echo __("LBL_PARTICIPENT_NAME_ERROR"); ?>";
var nameErrorMessage = "<?php echo __("YOUR_NAME_NOT_EMPTY_MAX_CHAR"); ?>";
var lblErrorSavingMessage = "<?php echo __("ERROR_SAVING_DATA"); ?>";
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden', 'id' => 'expenseData', 'value' => $expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden', 'id' => 'justCreated', 'value' => $justCreated));
echo $this->Form->create(null, array('id' => 'loadForm', 'url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'permissionForm', 'url' => array('controller' => 'GroupSetting', 'action' => 'addPermission')));
echo $this->Form->end();
?>
<?php if ($permissionLevel === NO_PERMIT) { ?>
<div style="color: red;text-align: center;"><?php echo __("LBL_EXPENSE_NOT_PERMITTED"); ?></div>
<?php } else { ?>
<h1 class="tabTitle">
<div id="expenseTitleDiv"></div>
</h1>
<table>
<tr>
<td>
<div id="expenseDescDiv"></div>
</td>
<td style="text-align:right">
<div id="expenseLoginAsDiv" style="text-align:right"></div>
</td>
</tr>
</table>
<table>
<tr>
<td><strong>
<div id="expenseCreatedByDiv"></div>
</strong></td>
<td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL; ?>images/home-icon.png" alt="" /> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" onClick="printReport()">| <?php echo __("LBL_PRINT"); ?></a>
</td>
</tr>
</table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left">
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th style="width:180px;">
<a style="cursor:pointer" id="create-participant"><img src="<?php echo CDN_URL; ?>images/add-icon.png" alt="" /> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<?php } ?>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-1a"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/meal_icon.png" align="absmiddle"> <?php echo __("LBL_MEAL"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/participant_icon.png" align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/log_icon.png" align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
<li><a href="#tabs-7"> <?php echo __("LBL_REPORTS"); ?></a></li>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<li><a href="#tabs-8"><img alt="Expenses" src="<?php echo CDN_URL; ?>images/permission_icon.png"
align="absmiddle"> <?php echo __("LBL_PERMISSION"); ?></a></li>
<?php } ?>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid">
<tr>
<td />
</tr>
</table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-1a">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="meal_grid">
<tr>
<td />
</tr>
</table>
<div id="meal_expense_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL; ?>images/slide-right-icon.png" alt="" /></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL; ?>images/slide-left-icon.png" alt="" /></a>
<h2><?php echo __("LBL_HOW_BLANCE"); ?></h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL; ?>images/info-icon.png" alt="" /> <?php echo __("LBL_CLICK_ON_THE"); ?> 'Mark Settle' <?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
<div id="balanceSummaryDivId"></div>
</div>
</div>
</div>
<div id="balanceDivErrorId"><?php echo __("LBL_PLEASE_ADD_MEALS_CALCULATE_BALANCE"); ?></div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid">
<tr>
<td />
</tr>
</table>
<div id="participant_pager"> </div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id' => 'viewLogForm', 'return' => false, 'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate', array('readonly' => true, 'lable' => false)); ?></td>
<td><?php echo $this->Form->input('toDate', array('readonly' => true, 'lable' => false)); ?></td>
<td><?php echo $this->Form->end('View Log'); ?> <img id="loadImg" style="display:none;margin-bottom:-10px;" src="<?php echo CDN_URL; ?>images/loading.gif" /> </td>
</tr>
</table>
<table id="log_grid">
<tr>
<td />
</tr>
</table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id' => 'sendEmailForm', 'url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br /> </div>
<div id="divExpenseURL"></div>
<div id="divExpenseFacebookURL"></div><br />
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?> </p>
<table>
<tr>
<td> <?php echo __("LBL_OR"); ?> </br /> </br /> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email', array('label' => false, 'email' => '<?php echo __("LBL_EMAIL_MESSAGE")?>', 'length' => '200px', 'required' => 'true', 'style' => 'width:240px; height:20px;')); ?>
<br />
<?php
if ($isPermitted) {
echo $this->Form->end('Send');
} else {
echo '<input type="button" value="Send" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg2" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif" /></p>
</td>
</tr>
</table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b>General Information</b><br />
<?php
echo $this->Form->create(null, array('id' => 'updateGroupExpenseForm', 'url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br />
<span id="error_currency"></span><br />
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
?>
<table>
<tr>
<td><?php echo __("LBL_TITLE"); ?></td>
<td><?php echo $this->Form->input('title', array('label' => false, 'title' => 'Please provide title', 'length' => '200px', 'required' => 'false')); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_CURRENCY"); ?></td>
<td><?php echo $this->Form->input('currency', array('label' => false)); ?></td>
</tr>
<tr>
<td><?php echo __("LBL_DEFAULT_BREAKFAST"); ?></td>
<td> <input name="data[Expense][defaultBreakfast]" type=text id="ExpenseDefaultBreakfast" onKeyUp="dashBoard.filterMealInput(this)"></td>
</tr>
<tr>
<td><?php echo __("LBL_DEFAULT_LUNCH"); ?></td>
<td><input name="data[Expense][defaultLunch]" type=text id="ExpenseDefaultLunch" onKeyUp="dashBoard.filterMealInput(this)"></td>
</tr>
<tr>
<td><?php echo __("LBL_DEFAULT_DINNER"); ?></td>
<td><input name="data[Expense][defaultDinner]" type=text id="ExpenseDefaultDinner" onKeyUp="dashBoard.filterMealInput(this)"></td>
</tr>
<tr>
<td><?php echo __("LBL_DESCRIPTION"); ?></td>
<td><?php echo $this->Form->textarea('description', array('rows' => '5', 'cols' => '45')); ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><br />
<?php
if ($isPermitted) {
echo $this->Form->end('Save');
} else {
echo '<input type="button" value="Save" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" onclick="alert(lblExpenseNotPermitted);">';
}
?>
<img id="loadImg1" style="display:none;" src="<?php echo CDN_URL; ?>images/loading.gif" />
</td>
</tr>
</table>
</div>
</div>
<div id="tabs-7">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_REPORTS"); ?></b><br /><br /><br />
<table>
<tr>
<td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printExpense()"> <?php echo __("LBL_EXPENSE_REPORTS"); ?></a> </td>
</tr>
<tr>
<td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMeals()"> <?php echo __("LBL_MEAL_SUMMARY_REPORT"); ?></a> </td>
</tr>
<tr>
<td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMyMeals()"> <?php echo __("LBL_MY_MEAL_REPORT"); ?></a> </td>
</tr>
</table>
</div>
</div>
<?php if (RESTRICTION_MODE_HIDE && $is_permission_visible) { ?>
<div id="tabs-8">
<div class="tabContent">
<?php if ($permitted) { ?>
<div class="switch-container">
<label class="switch">
<input type="checkbox" id="restrictedMode" onchange="toggleRestrictedMode(this)">
<span class="slider"></span>
</label>
<span id="restrictedLabel"><?php echo __("LBL_RESTRICTED")?>: <?php echo __("LBL_OFF")?></span>
</div>
<?php } ?>
<table id="permission_grid">
<tr>
<td></td>
</tr>
</table>
<div id="permission_pager"></div>
</div>
</div>
<?php } ?>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/mess_expense.js?v=1.0.5"></script>
<script src="<?php echo CDN_URL; ?>js/permission.js?v=1.0.3"></script>
<?php
echo $this->Form->create(null, array('id' => 'expenseForm', 'url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id' => 'participantForm', 'url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target' => 'blank', 'id' => 'printForm', 'url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden', 'id' => 'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden', 'id' => 'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden', 'id' => 'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden', 'id' => 'printNames'));
echo $this->Form->input('printOption', array('type' => 'hidden', 'id' => 'printOption'));
echo $this->Form->end();
?>
<script type="application/javascript">
$(function() {
$("#tabs").tabs();
$("#tabs").tabs({
activate: function(event, ui) {
var newIndex = ui.newTab.index();
if (newIndex == 0) {
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if (newIndex == 1) {
dashBoard.loadMealGrid();
//dashBoard.setMealGridExtension();
} else if (newIndex == 2) {
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if (newIndex == 3) {
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
// dashBoard.resetParticipantMeal();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if (newIndex == 4) {
dashBoard.generateLogList("", 1);
if ($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == "") {
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate", lastWeek);
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if (newIndex == 5) {
var expense_url = "<?php echo HTTP_SITE_URL . "/"; ?>" + dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_MESS_EXPENSE"); ?> "' + dashBoard.expense.title + '" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="' + expense_url + '" >' + expense_url + '</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if (newIndex == 6) {
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
$("#ExpenseDefaultBreakfast").val(dashBoard.defaultBreakfast);
$("#ExpenseDefaultLunch").val(dashBoard.defaultLunch);
$("#ExpenseDefaultDinner").val(dashBoard.defaultDinner);
}
else if (newIndex == 8) {
if(permitted) {
var label = document.getElementById("restrictedLabel");
if (userPermission.restrict_mode == 1) {
$('#restrictedMode').prop('checked', true);
label.textContent = lblRestrictedMessage+": "+lblRestrictedOn;
} else {
$('#restrictedMode').prop('checked', false);
label.textContent = lblRestrictedMessage+": "+lblOff;
}
}
userPermission.displayPermissionList();
userPermission.setPermissionGridExtension();
}
}
});
$("input[type=submit]").button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function() {
$('.graphRight').hide(1000);
$('.graphLeft').animate({
width: 740
}, {
duration: 1000
});
$("#slideRight").show();
});
$("#slideRight").click(function() {
$("#slideRight").hide();
$('.graphLeft').animate({
width: 298
}, {
duration: 1000
});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function(event) {
dashBoard.createGraphImage()
});
$("#ExpenseFromDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$("#ExpenseToDate").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createGroupExpense";
}
}
function createMessExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createMessExpense";
}
}
function createFamilyExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/createFamilyExpense";
}
}
function gotoHome() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>";
}
}
function printGroupExpense() {
if (top.location != self.location) {
top.location = "<?php echo HTTP_SITE_URL; ?>/Home/print";
}
}
function printReport() {
if (top.location != self.location) {
var targetUrl = "<?php echo HTTP_SITE_URL . '/Expense/printReport/' . $uniqueURL . '/' . $print_uid; ?>";
window.open(targetUrl, "_blank");
}
}
function toggleRestrictedMode(checkbox) {
var label = document.getElementById("restrictedLabel");
var restrict = 0;
var level_value = lblOff;
if (checkbox.checked) {
restrict = 1;
}
if(Object.keys(userPermission.permissions).length > 1) {
$('#restrictedMode').prop('checked', true);
alert(lblRestrictedModeErrorMessage);
return false;
}
var permissionObj = {
expense_id: dashBoard.expense.id,
mode: restrict,
unique_url: getUniqueUrl()
}
$.ajax({
type: 'POST',
url: "<?php echo HTTP_SITE_URL . '/GroupSetting/addRestriction'?>",
data: permissionObj,
success: function (data, textStatus, xhr) {
if(data.restricted_mode === true) {
userPermission.restrict_mode = 1;
level_value = lblRestrictedOn;
$('#restrictedMode').prop('checked', true);
}else {
userPermission.restrict_mode = 0;
$('#restrictedMode').prop('checked', false);
}
dashBoard.expense.version = parseInt(dashBoard.expense.version) + 1;
$("#ExpenseVersion").val(dashBoard.expense.version);
label.textContent = lblRestrictedMessage+": " + level_value;
alert(data.message);
},
error: function (xhr, textStatus, error) {
return false;
}
});
}
</script>
<script src="<?php echo CDN_URL; ?>js/common.js"></script>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,595 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<style type="text/css">
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: .79rem;
background:#fff;
}
.ui-jqgrid .ui-jqgrid-view, .ui-jqgrid-bdiv, .ui-jqgrid-btable{width: 100% !important; overflow-x:hidden !important;}
.ui-state-hover .ui-pg-div .ui-icon{ margin: -1px 0; padding:0; height:18px;}
.ui-icon-closethick{cursor: pointer;}
label[for="ExpenseFromDate"] {
margin-right: 10px;
}
label[for="ExpenseToDate"] {
margin-right: 10px;
}
</style>
<style type="text/css">
#graphRight {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
margin-top: 0px;
width: 425px;
height: 285px;
z-index: 0;
}
#graphRightInner {
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 5px 5px 5px 5px;
padding : 30px;
width: 425px;
height: 285px;
border: 1px solid black;
z-index: 1;
}
.ui-front {
z-index: 100;
}
.ui-dialog-titlebar-close {
visibility: hidden;
}
</style>
<script>
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousDescription = "<?php echo __('LBL_PREVIOUS_DESCRIPTION'); ?>";
var lblNewDescription = "<?php echo __('LBL_NEW_DESCRIPTION'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblRecordNotFound = '<?php echo __("LBL_RECORD_NOT_FOUND"); ?>';
var lblExpenseLog = '<?php echo __("LBL_EXPENSE_LOG"); ?>';
var lblFindLog = '<?php echo __("LBL_FIND_LOG"); ?>';
var lblExpenseType = '<?php echo __("LBL_EXPENSE_TYPE"); ?>';
var lblAll = '<?php echo __("LBL_ALL"); ?>';
var lblMealsAddedOnThisDate = '<?php echo __("LBL_MEALS_ADDED_ON_THIS_DATE"); ?>';
var lblShouldPayTo = '<?php echo __("LBL_SHOULD_PAY_TO"); ?>';
var lblMealsForYou = '<?php echo __("LBL_MEALS_FOR_YOU"); ?>';
var lblOutOf = '<?php echo __("LBL_OUT_OF"); ?>';
var lblAndCost = '<?php echo __("LBL_AND_COST"); ?>';
var lblHencePerCost = '<?php echo __("LBL_HENCE_PER_COST"); ?>';
var lblTotalMeal = '<?php echo __("LBL_TOTAL_MEAL"); ?>';
var lblMealCharge = '<?php echo __("LBL_MEAL_CHARGE"); ?>';
var lblDate = '<?php echo __("LBL_DATE"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblBreakfast = '<?php echo __("LBL_BREAKFAST"); ?>';
var lblLunch = '<?php echo __("LBL_LUNCH"); ?>';
var lblDinner = '<?php echo __("LBL_DINNER"); ?>';
var lblMealList = '<?php echo __("LBL_MEAL_LIST"); ?>';
var lblAddMealInformation = '<?php echo __("LBL_ADD_MEAL_INFORMATION"); ?>';
var lblEditMealInformation = '<?php echo __("LBL_EDIT_MEAL_INFORMATION"); ?>';
var lblFindMealInformation = '<?php echo __("LBL_FIND_MEAL_INFORMATION"); ?>';
var lblDeleteMealInformation = '<?php echo __("LBL_DELETE_MEAL_INFORMATION"); ?>';
var lblDeleteMeal = '<?php echo __("LBL_DELETE_MEAL"); ?>';
var lblWantDeleteMeal = '<?php echo __("LBL_WANT_DELETE_MEAL"); ?>';
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td><div id="expenseDescDiv"></div></td><td style="text-align:right"><div id="expenseLoginAsDiv" style="text-align:right"></div> </td></tr></table>
<table><tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<!-- <a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a> -->
<a style="cursor:pointer" href="<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>" onClick="printReport()">| <?php echo __("LBL_PRINT"); ?></a>
</td></tr></table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left">
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th style="width:180px;">
<a style="cursor:pointer" id="create-participant"><img src="<?php echo CDN_URL;?>images/add-icon.png" alt=""/> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-1a"><img alt="Expenses" src="<?php echo CDN_URL;?>images/meal_icon.png" align="absmiddle"> <?php echo __("LBL_MEAL"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/participant_icon.png" align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/log_icon.png" align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
<li><a href="#tabs-7"> <?php echo __("LBL_REPORTS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-1a">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="meal_grid"><tr><td/></tr></table>
<div id="meal_expense_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<h2>How to balance?</h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL;?>images/info-icon.png" alt=""/> <?php echo __("LBL_CLICK_ON_THE"); ?> <img src="<?php echo CDN_URL;?>images/tick-icon.png" alt=""/> <?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
<div id="balanceSummaryDivId"></div>
</div>
</div>
</div>
<div id="balanceDivErrorId"><?php echo __("LBL_PLEASE_ADD_MEALS_CALCULATE_BALANCE"); ?></div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid"><tr><td/></tr></table>
<div id="participant_pager"> </div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'viewLogForm','return'=>false,'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate',array('readonly'=>true,'lable'=>false)); ?></td>
<td><?php echo $this->Form->input('toDate',array('readonly'=>true,'lable'=>false));?></td>
<td><?php echo $this->Form->end('View Log');?> <img id="loadImg" style="display:none;margin-bottom:-10px;" src="<?php echo CDN_URL;?>images/loading.gif" /> </td>
</tr>
</table>
<table id="log_grid"><tr> <td/></tr></table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?> </p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => 'Please provide your email','length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> <img id="loadImg2" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></p></td></tr></table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b>General Information</b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_BREAKFAST"); ?></td><td> <input name="data[Expense][defaultBreakfast]" type=text id="ExpenseDefaultBreakfast" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_LUNCH"); ?></td><td><input name="data[Expense][defaultLunch]" type=text id="ExpenseDefaultLunch" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_DINNER"); ?></td><td><input name="data[Expense][defaultDinner]" type=text id="ExpenseDefaultDinner" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?> <img id="loadImg1" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></td></tr>
</table>
</div>
</div>
<div id="tabs-7">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_REPORTS"); ?></b><br/><br/><br/>
<table>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printExpense()" > <?php echo __("LBL_EXPENSE_REPORTS"); ?></a> </td></tr>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMeals()" > <?php echo __("LBL_MEAL_SUMMARY_REPORT"); ?></a> </td></tr>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMyMeals()" > <?php echo __("LBL_MY_MEAL_REPORT"); ?></a> </td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/mess_expense.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden','id'=>'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->input('printOption', array('type' => 'hidden','id'=>'printOption'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if(newIndex == 1){
dashBoard.loadMealGrid();
//dashBoard.setMealGridExtension();
} else if(newIndex == 2){
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if(newIndex == 3){
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
// dashBoard.resetParticipantMeal();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if(newIndex == 4){
dashBoard.generateLogList("",1);
if($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == ""){
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate",lastWeek );
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if(newIndex == 5){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_MESS_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if(newIndex == 6){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
$("#ExpenseDefaultBreakfast").val(dashBoard.defaultBreakfast);
$("#ExpenseDefaultLunch").val(dashBoard.defaultLunch);
$("#ExpenseDefaultDinner").val(dashBoard.defaultDinner);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 298}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
$( "#ExpenseFromDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$( "#ExpenseToDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
function printReport(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL.'Expense/printReport/'.$uniqueURL; ?>";
}
}
</script>
<style>
fieldset { padding:0; border:0; margin-top:5px; }
</style>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,527 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style-old.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/grid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<script type="application/javascript">
var lblEnterName = '<?php echo __("LBL_ENTER_NAME"); ?>';
var lblNameMustHaveLessThan = '<?php echo __("LBL_THE_NAME_MUST_HAVE_LESS_THAN"); ?>';
var lblCharacters = '<?php echo __("LBL_CHARACTERS"); ?>';
var lblParticipantExist = '<?php echo __("LBL_PARTICIPANT_ALREADY_EXIST"); ?>';
var lblParticipantShouldNotContain = "<?php echo __('LBL_PARTICIPANT_NAME_SHOULD_NOT_CONTAIN'); ?>";
var lblCreatedBy = "<?php echo __('LBL_CREATED_BY'); ?>";
var lblOn = "<?php echo __('LBL_ON'); ?>";
var lblClickToLogin = "<?php echo __('LBL_CLICK_TO_LOGIN'); ?>";
var lblLoggedInAs = "<?php echo __('LBL_LOGGED_IN_AS'); ?>";
var lblChangedOn = "<?php echo __('LBL_CHANGED_ON'); ?>";
var lblPaidBy = "<?php echo __('LBL_PAID_BY'); ?>";
var lblPreviousDescription = "<?php echo __('LBL_PREVIOUS_DESCRIPTION'); ?>";
var lblNewDescription = "<?php echo __('LBL_NEW_DESCRIPTION'); ?>";
var lblWhoPaid = "<?php echo __('LBL_WHO_PAID'); ?>";
var lblHowMuch = "<?php echo __('LBL_HOW_MUCH'); ?>";
var lblInvoles = "<?php echo __('LBL_INVOLVES'); ?>";
var lblWhen = "<?php echo __('LBL_WHEN'); ?>";
var lblWhatReason = "<?php echo __('LBL_WHAT_REASON'); ?>";
var lblForYou = "<?php echo __('LBL_FOR_YOU'); ?>";
var lblExpenseList = "<?php echo __('LBL_EXPENSE_LIST'); ?>";
var lblAddExpense = '<?php echo __("LBL_ADD_EXPENSE"); ?>';
var lblEditExpense = '<?php echo __("LBL_EDIT_EXPENSE"); ?>';
var lblDeleteExpense = '<?php echo __("LBL_DELETE_EXPENSE"); ?>';
var lblFindExpenses = '<?php echo __("LBL_FIND_EXPENSES"); ?>';
var lblSave = '<?php echo __("LBL_SAVE"); ?>';
var lblCancel = '<?php echo __("LBL_CANCEL"); ?>';
var lblSaveContinue = '<?php echo __("LBL_SAVE_CONTINUE"); ?>';
var lblWantDeleteExpense = '<?php echo __("LBL_WANT_DELETE_EXPENSE"); ?>';
var lblPleaseEnterNameOfExpense = '<?php echo __("LBL_ENTER_NAME_OF_YOUR_EXPENSE"); ?>';
var lblExpenseNameLessThanChar = '<?php echo __("LBL_EXPENSE_NAME_LESS_THAN_CHARACTER"); ?>';
var lblValidAmount = '<?php echo __("LBL_VALID_AMOUNT"); ?>';
var lblDistributedAmountSame = '<?php echo __("LBL_DISTRIBUTED_AMOUNT_SAME_AS_EXPENSE_AMOUNT"); ?>';
var lblDateNotValid = '<?php echo __("LBL_DATE_NOT_VALID"); ?>';
var lblCantDownload = "<?php echo __('LBL_SORRY_CANT_DOWNLOAD'); ?>";
var lblBalanceOf = "<?php echo __('LBL_BALANCE_OF'); ?>";
var lblClickTransactionMadeAlready = "<?php echo __('LBL_CLICK_TRANSACTION_MADE_ALREADY'); ?>";
var lblEnterParticipantName = "<?php echo __('LBL_PLEASE_ENTER_PARTICIPANT_NAME'); ?>";
var lblExpenseNameLessChar = "<?php echo __('LBL_EXPENSE_NAME_LESS_THAN_CHAR'); ?>";
var lblParticipantAlreadyExist = "<?php echo __('LBL_PARTICIPANT_EXIST'); ?>";
var lblName = "<?php echo __('LBL_NAME'); ?>";
var lblTotalCharge = "<?php echo __('LBL_TOTAL_CHARGE'); ?>";
var lblTotalPaid = "<?php echo __('LBL_TOTAL_PAID'); ?>";
var lblBalance = "<?php echo __('LBL_BALANCE'); ?>";
var lblParticipantList = "<?php echo __('LBL_PARTICIPANT_LIST'); ?>";
var lblAddParticipant = "<?php echo __('LBL_ADD_PARTICIPANT'); ?>";
var lblEditParticipant = "<?php echo __('LBL_EDIT_PARTICIPANT'); ?>";
var lblDeleteParticipant = "<?php echo __('LBL_DELETE_PARTICIPANT'); ?>";
var lblFindParticipant = "<?php echo __('LBL_FIND_PARTICIPANT'); ?>";
var lblWantDeleteParticipant = "<?php echo __('LBL_WANT_DELETE_PARTICIPANT'); ?>";
var lblDataSavingFailed = "<?php echo __('LBL_DATA_SAVING_FAILED'); ?>";
var lblEmailSent = '<?php echo __("LBL_EMAIL_SENT"); ?>';
var lblEmailSentFail = '<?php echo __("LBL_EMAIL_SENT_FAIL"); ?>';
var lblDataSaved = '<?php echo __("LBL_DATA_SAVED_SUCCESSFULLY"); ?>';
var lblRecordNotFound = '<?php echo __("LBL_RECORD_NOT_FOUND"); ?>';
var lblExpenseLog = '<?php echo __("LBL_EXPENSE_LOG"); ?>';
var lblFindLog = '<?php echo __("LBL_FIND_LOG"); ?>';
var lblExpenseType = '<?php echo __("LBL_EXPENSE_TYPE"); ?>';
var lblAll = '<?php echo __("LBL_ALL"); ?>';
var lblMealsAddedOnThisDate = '<?php echo __("LBL_MEALS_ADDED_ON_THIS_DATE"); ?>';
var lblShouldPayTo = '<?php echo __("LBL_SHOULD_PAY_TO"); ?>';
var lblMealsForYou = '<?php echo __("LBL_MEALS_FOR_YOU"); ?>';
var lblOutOf = '<?php echo __("LBL_OUT_OF"); ?>';
var lblAndCost = '<?php echo __("LBL_AND_COST"); ?>';
var lblHencePerCost = '<?php echo __("LBL_HENCE_PER_COST"); ?>';
var lblTotalMeal = '<?php echo __("LBL_TOTAL_MEAL"); ?>';
var lblMealCharge = '<?php echo __("LBL_MEAL_CHARGE"); ?>';
var lblDate = '<?php echo __("LBL_DATE"); ?>';
var lblDay = '<?php echo __("LBL_DAY"); ?>';
var lblBreakfast = '<?php echo __("LBL_BREAKFAST"); ?>';
var lblLunch = '<?php echo __("LBL_LUNCH"); ?>';
var lblDinner = '<?php echo __("LBL_DINNER"); ?>';
var lblMealList = '<?php echo __("LBL_MEAL_LIST"); ?>';
var lblAddMealInformation = '<?php echo __("LBL_ADD_MEAL_INFORMATION"); ?>';
var lblEditMealInformation = '<?php echo __("LBL_EDIT_MEAL_INFORMATION"); ?>';
var lblFindMealInformation = '<?php echo __("LBL_FIND_MEAL_INFORMATION"); ?>';
var lblDeleteMealInformation = '<?php echo __("LBL_DELETE_MEAL_INFORMATION"); ?>';
var lblDeleteMeal = '<?php echo __("LBL_DELETE_MEAL"); ?>';
var lblWantDeleteMeal = '<?php echo __("LBL_WANT_DELETE_MEAL"); ?>';
var baseUrl = "<?php echo HTTP_SITE_URL; ?>";
var session_profile_id = "";
</script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>
<?php
echo $this->Form->input('expenseData', array('type' => 'hidden','id'=>'expenseData','value'=>$expenseData));
echo $this->Form->input('justCreated', array('type' => 'hidden','id'=>'justCreated','value'=>$justCreated));
echo $this->Form->create(null, array('id'=> 'loadForm','url' => array('controller' => 'Expense', 'action' => 'loadTab')));
echo $this->Form->end();
?>
<h1 class="tabTitle"><div id="expenseTitleDiv"></div></h1>
<table><tr><td><div id="expenseDescDiv"></div></td><td style="text-align:right"><div id="expenseLoginAsDiv" style="text-align:right"></div> </td></tr></table>
<table><tr><td><strong><div id="expenseCreatedByDiv"></div></strong></td><td class="tabRight" style="text-align:right">
<a style="cursor:pointer" onClick="gotoHome()"> <img title="Visit Home Page" src="<?php echo CDN_URL;?>images/home-icon.png" alt=""/> <?php echo __("LBL_HOME"); ?> </a>
|<a style="cursor:pointer" onClick="createGroupExpense()"><?php echo __("LBL_NEW_GROUP_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createMessExpense()"><?php echo __("LBL_NEW_MESS_EXPENSECOUNT"); ?></a>
|<a style="cursor:pointer" onClick="createFamilyExpense()"><?php echo __("LBL_NEW_FAMILY_EXPENSECOUNT"); ?></a>
<a style="cursor:pointer" onClick="dashBoard.printExpense()">| <?php echo __("LBL_PRINT"); ?></a>
</td></tr></table>
<div id="participantBox">
<div class="round">
<table class="gridTable" style="text-align:left">
<tr>
<th>
<div id="expense_table_title_id"> <?php echo __("LBL_CLICK_NAME_TO_LOGIN"); ?></div>
</th>
<th style="width:180px;">
<a style="cursor:pointer" id="create-participant"><img src="<?php echo CDN_URL;?>images/add-icon.png" alt=""/> <?php echo __("LBL_ADD_PARTICIPANT"); ?></a>
</th>
</tr>
</table>
</div>
<div class="contentDisplay" id="div_participant">
</div>
</div>
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1"><img alt="Expenses" src="<?php echo CDN_URL;?>images/expense_icon.png" align="absmiddle"> <?php echo __("LBL_EXPENSE"); ?></a></li>
<li><a href="#tabs-1a"><img alt="Expenses" src="<?php echo CDN_URL;?>images/meal_icon.png" align="absmiddle"> <?php echo __("LBL_MEAL"); ?></a></li>
<li><a href="#tabs-2"><img alt="Expenses" src="<?php echo CDN_URL;?>images/balance_icon.png" align="absmiddle"> <?php echo __("LBL_BALANCE"); ?></a></li>
<li><a href="#tabs-3"><img alt="Expenses" src="<?php echo CDN_URL;?>images/participant_icon.png" align="absmiddle"> <?php echo __("LBL_PARTICIPANTS"); ?></a></li>
<li><a href="#tabs-4"><img alt="Expenses" src="<?php echo CDN_URL;?>images/log_icon.png" align="absmiddle"> <?php echo __("LBL_LOGS"); ?></a></li>
<li><a href="#tabs-5"><img alt="Expenses" src="<?php echo CDN_URL;?>images/share_icon.png" align="absmiddle"> <?php echo __("LBL_SHARE"); ?></a></li>
<li><a href="#tabs-6"><img alt="Expenses" src="<?php echo CDN_URL;?>images/setting_icon.png" align="absmiddle"> <?php echo __("LBL_SETTINGS"); ?></a></li>
<li><a href="#tabs-7"> <?php echo __("LBL_REPORTS"); ?></a></li>
</ul>
<div id="tabs-1">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="grid"><tr><td/></tr></table>
<div id="expense_pager"> </div>
</div>
</div>
<div id="tabs-1a">
<div class="tabContent">
<style type="text/css">
.jqplot-yaxis-tick {
white-space: nowrap;
}
</style>
<table id="meal_grid"><tr><td/></tr></table>
<div id="meal_expense_pager"> </div>
</div>
</div>
<div id="tabs-2">
<div class="tabContent">
<div id="balanceDivId" class="graph">
<div class="graphLeft">
<a id="slideRight" href="#"><img src="<?php echo CDN_URL;?>images/slide-right-icon.png" alt=""/></a>
<div id="balance_chart" style=" height:250px;"></div>
<!-- <div class="graphBtn"><a id="btnDownloadImage" >Download Graph</a></div> -->
</div>
<div class="graphRight">
<a id="slideLeft" href="#"><img src="<?php echo CDN_URL;?>images/slide-left-icon.png" alt=""/></a>
<h2><?php echo __("LBL_HOW_BLANCE"); ?></h2>
<div class="balanceContent" id="balance_payment_div"></div>
<div class="blanceLink">
<img src="<?php echo CDN_URL;?>images/info-icon.png" alt=""/> <?php echo __("LBL_CLICK_ON_THE"); ?> <img src="<?php echo CDN_URL;?>images/tick-icon.png" alt=""/> <?php echo __("LBL_SIGN_IF_TRANSACTION_MADE"); ?>
<div id="balanceSummaryDivId"></div>
</div>
</div>
</div>
<div id="balanceDivErrorId"><?php echo __("LBL_PLEASE_ADD_MEALS_CALCULATE_BALANCE"); ?></div>
</div>
</div>
<div id="tabs-3">
<div class="tabContent">
<!-- Tab Participant List -->
<table id="participant_grid"><tr><td/></tr></table>
<div id="participant_pager"> </div>
</div>
</div>
<div id="tabs-4">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'viewLogForm','return'=>false,'url' => array('controller' => 'Expense', 'action' => 'displayLog')));
?>
<?php echo $this->Form->hidden('logExpenseId'); ?>
<table>
<tr>
<td> <?php echo $this->Form->input('fromDate',array('readonly'=>true,'lable'=>false)); ?></td>
<td><?php echo $this->Form->input('toDate',array('readonly'=>true,'lable'=>false));?></td>
<td><?php echo $this->Form->end('View Log');?> <img id="loadImg" style="display:none;margin-bottom:-10px;" src="<?php echo CDN_URL;?>images/loading.gif" /> </td>
</tr>
</table>
<table id="log_grid"><tr> <td/></tr></table>
<div id="log_pager"></div>
</div>
</div>
<div id="tabs-5">
<div class="tabContent">
<?php
echo $this->Form->create(null, array('id'=> 'sendEmailForm','url' => array('controller' => 'Expense', 'action' => 'sendEmail')));
echo $this->Form->hidden('emailExpenseTitle');
echo $this->Form->hidden('emailUniqueURL');
?>
<div><b><?php echo __("LBL_COPY_TEXT_INTO_EMAIL_SEND_GROUP"); ?></b><br/> </div>
<div id = "divExpenseURL"></div>
<div id = "divExpenseFacebookURL"></div><br/>
<p><?php echo __("LBL_EXPENSECOUNT_TOOL_CREATE_GROUP_MESS_FAMILY_EXPENSE"); ?> </p>
<table><tr><td> Or </br/> </br/> <?php echo __("LBL_PUT_EMAIL_ADDRESS"); ?>:<?php echo $this->Form->input('email',array('label'=>false,'email' => 'Please provide your email','length'=>'200px','required'=>'true','style'=>'width:240px; height:20px;')); ?>
<br/>
<?php echo $this->Form->end('Send');?> <img id="loadImg2" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></p></td></tr></table>
</div>
</div>
<div id="tabs-6">
<div class="tabContent">
<b>General Information</b><br/>
<?php
echo $this->Form->create(null, array('id'=> 'updateGroupExpenseForm','url' => array('controller' => 'Home', 'action' => 'updateGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_currency"></span><br/>
<?php
echo $this->Form->hidden('expenseid');
echo $this->Form->hidden('version');
?>
<table>
<tr> <td><?php echo __("LBL_TITLE"); ?></td><td><?php echo $this->Form->input('title',array('label'=>false,'title' => 'Please provide title','length'=>'200px','required'=>'false')); ?></td></tr>
<tr> <td><?php echo __("LBL_CURRENCY"); ?></td><td><?php echo $this->Form->input('currency',array('label'=>false)) ; ?></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_BREAKFAST"); ?></td><td> <input name="data[Expense][defaultBreakfast]" type=text id="ExpenseDefaultBreakfast" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_LUNCH"); ?></td><td><input name="data[Expense][defaultLunch]" type=text id="ExpenseDefaultLunch" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DEFAULT_DINNER"); ?></td><td><input name="data[Expense][defaultDinner]" type=text id="ExpenseDefaultDinner" onKeyUp="dashBoard.filterMealInput(this)" ></td></tr>
<tr> <td><?php echo __("LBL_DESCRIPTION"); ?></td><td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?></td></tr>
<tr> <td>&nbsp;</td><td><br/><?php echo $this->Form->end('Save');?> <img id="loadImg1" style="display:none;" src="<?php echo CDN_URL;?>images/loading.gif" /></td></tr>
</table>
</div>
</div>
<div id="tabs-7">
<div class="tabContent">
<b><?php echo __("LBL_GENERAL_REPORTS"); ?></b><br/><br/><br/>
<table>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printExpense()" > <?php echo __("LBL_EXPENSE_REPORTS"); ?></a> </td></tr>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMeals()" > <?php echo __("LBL_MEAL_SUMMARY_REPORT"); ?></a> </td></tr>
<tr> <td>&#149; <a style="color:#0000CD; background-color:transparent; cursor:pointer" target=blank onClick="dashBoard.printMyMeals()" > <?php echo __("LBL_MY_MEAL_REPORT"); ?></a> </td></tr>
</table>
</div>
</div>
</div>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="<?php echo CDN_URL; ?>js/excanvas.js"></script><![endif]-->
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/mess_expense_demo.js"></script>
<?php
echo $this->Form->create(null, array('id'=>'expenseForm','url' => array('controller' => 'Expense', 'action' => 'changeGroupExpense')));
echo $this->Form->end();
echo $this->Form->create(null, array('id'=>'participantForm','url' => array('controller' => 'Expense', 'action' => 'changeParticipant')));
echo $this->Form->end();
?>
<?php
echo $this->Form->create("Expense", array('target'=>'blank','id'=> 'printForm','url' => array('controller' => 'Expense', 'action' => 'printExpense')));
echo $this->Form->input('printExpenseList', array('type' => 'hidden','id'=>'printExpenseList'));
echo $this->Form->input('printExpense', array('type' => 'hidden','id'=>'printExpense'));
echo $this->Form->input('printBalance', array('type' => 'hidden','id'=>'printBalance'));
echo $this->Form->input('printNames', array('type' => 'hidden','id'=>'printNames'));
echo $this->Form->input('printOption', array('type' => 'hidden','id'=>'printOption'));
echo $this->Form->end();
?>
<script>
$(function() {
$("#tabs").tabs({
activate: function( event, ui ) {
var newIndex = ui.newTab.index();
if(newIndex == 0){
// $("#balance_payment_div").html("");
dashBoard.setExpenseGridExtension();
} else if(newIndex == 1){
dashBoard.loadMealGrid();
//dashBoard.setMealGridExtension();
} else if(newIndex == 2){
// $("#balance_payment_div").html("");
dashBoard.drawGraph();
} else if(newIndex == 3){
// $("#balance_payment_div").html("");
dashBoard.resetParticipantBalance();
// dashBoard.resetParticipantMeal();
dashBoard.displayParticipantList();
dashBoard.setParticipantGridExtension();
} else if(newIndex == 4){
dashBoard.generateLogList("",1);
if($("#ExpenseFromDate").val() == "" && $("#ExpenseToDate").val() == ""){
var currentDate = new Date();
var lastWeek = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#ExpenseFromDate").datepicker("setDate",lastWeek );
$("#ExpenseToDate").datepicker("setDate", new Date());
}
} else if(newIndex == 5){
var expense_url = "<?php echo HTTP_SITE_URL."/";?>"+dashBoard.expense.unique_url;
$("#divExpenseURL").html('<br/><?php echo __("LBL_THE_MESS_EXPENSE"); ?> "'+dashBoard.expense.title+'" <?php echo __("LBL_ACCESSIBLE_ON_EXPENSECOUNT"); ?> <?php echo __("LBL_THE_URL_IS"); ?>:<br/> <a style="color:#0000CD; background-color:transparent;" target=blank href="'+expense_url+'" >'+expense_url+'</a> ');
$("#divExpenseFacebookURL").html("<br/><?php echo __("LBL_ACCESS_FROM_MOBILE"); ?><br/>");
} else if(newIndex == 6){
$("#ExpenseExpenseid").val(dashBoard.expense.id);
$("#ExpenseTitle").val(dashBoard.expense.title);
$("#ExpenseCurrency").val(dashBoard.expense.currency);
$("#ExpenseDescription").val(dashBoard.expense.description);
$("#ExpenseDefaultBreakfast").val(dashBoard.defaultBreakfast);
$("#ExpenseDefaultLunch").val(dashBoard.defaultLunch);
$("#ExpenseDefaultDinner").val(dashBoard.defaultDinner);
}
}
});
});
</script>
<script>
$(function() {
$( "input[type=submit]" )
.button()
});
$("#slideRight").hide();
//Slider js
$("#slideLeft").click(function(){
$('.graphRight').hide(1000);
$('.graphLeft').animate({width: 740}, {duration: 1000});
$("#slideRight").show();
});
$("#slideRight").click(function(){
$("#slideRight").hide();
$('.graphLeft').animate({width: 298}, {duration: 1000});
$('.graphRight').show(1000);
});
$("#btnDownloadImage").click(function( event ) {
dashBoard.createGraphImage()
});
$( "#ExpenseFromDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
$( "#ExpenseToDate" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "2015:2099",
dateFormat: "yy-mm-dd"
});
function createGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createGroupExpense";
}
}
function createMessExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createMessExpense";
}
}
function createFamilyExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/createFamilyExpense";
}
}
function gotoHome(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>";
}
}
function printGroupExpense(){
if (top.location!= self.location) {
top.location = "<?php echo HTTP_SITE_URL;?>/Home/print";
}
}
</script>
<style>
fieldset { padding:0; border:0; margin-top:5px; }
</style>
<div id="dialog-form" title="New Participant" style="display:none">
<p class="validateTips"></p>
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style=" top:-1000px">
</fieldset>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,114 @@
<script>
function printPage(){
window.print();
}
</script>
<div id="exportPrintTable">
<div class="wrapper">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p>
<div class="description">
<p><strong> ExpenseCount "<?php echo $expense["title"];?>"</strong></p>
<?php if(isset($expense["description"])){ ?>
<p><?php echo $expense["description"];?></p>
<?php } ?>
<p><?php echo __("LBL_CREATED_BY"); ?> <?php echo $createdBy;?>, <?php echo __('LBL_ON'); ?> <?php echo $createdDate;?></p>
</div>
<div class="print">
<?php echo __("LBL_MEALS_CONSUMED_BY"); ?> <?php echo $printedBy;?> <span><?php echo date("d/m/Y - H:i");?></span>
</div>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_DATE"); ?></th>
<th><?php echo __("LBL_DAY"); ?></th>
<th><?php echo __("LBL_BREAKFAST"); ?></th>
<th><?php echo __("LBL_LUNCH"); ?></th>
<th><?php echo __("LBL_DINNER"); ?></th>
<th><?php echo __("LBL_TOTAL"); ?></th>
</tr>
</thead>
<tbody>
<?php
$subtotal = 0;
$perMealCost = 0.0;
foreach($expenseList as $key=>$value){
$total = $value["breakfast"]+$value["lunch"]+$value["dinner"];
$subtotal = $subtotal + $total;
?>
<tr>
<td align="center"><?php echo $value["date"];?></td>
<td align="center"><?php echo $value["day"];?></td>
<td align="center"><?php echo $value["breakfast"];?></td>
<td align="center"><?php echo $value["lunch"];?></td>
<td align="center"><?php echo $value["dinner"];?></td>
<td align="center"><?php echo $total;?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0" align="center"> </td>
<td style="border:0;font-weight: bold;" align="right"> <?php echo __("LBL_SUBTOTAL"); ?>: </td>
<td align="center" style="border:0; font-weight: bold;"> <?php echo $subtotal;?> </td>
</tr>
</tfoot>
</table>
<div class="description">
<p><strong><u><?php echo __("LBL_MEAL_SUMMARY"); ?>:</u></strong></p>
<table style="font-size:12px;">
<tr><td><?php echo __("LBL_TOTAL_MEAL"); ?>: </td><td><b><?php echo $balanceArray[0];?>,</b></td><td><?php echo __("LBL_TOTAL_COST"); ?>: </td><td><b><?php echo $balanceArray[2]." ".$expense["currency"];?></b></td></tr>
<?php if($balanceArray[0] > 0){
$perMealCost = round($balanceArray[2]/$balanceArray[0],2);
?>
<tr><td colspan="4"><?php echo __('LBL_HENCE_PER_COST'); ?>: (<?php echo $balanceArray[2];?> / <?php echo $balanceArray[0];?>) = <b> <?php echo $perMealCost." ".$expense["currency"];?></b></td></tr>
<?php } else { ?>
<tr><td colspan="4"><?php echo __('LBL_HENCE_PER_COST'); ?>: <b><?php echo "0.0 ".$expense["currency"];?></b></td></tr>
<?php } ?>
<tr><td colspan="4">===============================</td></tr>
<tr><td colspan="4"><?php echo __("LBL_MEAL_COST_FOR"); ?> <b><?php echo $printedBy;?></b>: (<?php echo $subtotal;?> X <?php echo $perMealCost;?>) = <b><?php echo round($subtotal*$perMealCost,2)." ".$expense["currency"];?></b></td></tr>
</table>
</div>
<div class="footerText"><?php echo __('LBL_ADD_MODIFY_DELETE_MEAL_NECESSARY'); ?><br/>
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div>
<div class="footer-pdf-print-link hidden-print">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generatePdfBtn").on('click', function () {
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
})
});
</script>

View File

@@ -0,0 +1 @@
<h1>This is participant list</h1>

151
app/View/Expense/popup.ctp Normal file
View File

@@ -0,0 +1,151 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Modal form</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery.jqplot.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/style.css" />
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/jquery-ui.css">
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/ui.jqgrid.css">
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/jquery.jqplot.min.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-1.11.0.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery-ui.js"></script>
<script src="<?php echo CDN_URL; ?>js/i18n/grid.locale-en.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqGrid.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/jquery.jqplot.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.barRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pieRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/plugins/jqplot.pointLabels.min.js"></script>
<style>
body { font-size: 62.5%; }
label, input { display:block; }
input.text { margin-bottom:12px; width:95%; padding: .4em; }
fieldset { padding:0; border:0; margin-top:25px; }
h1 { font-size: 1.2em; margin: .6em 0; }
</style>
<script>
$(function() {
var dialog, form,
// From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29
emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,
name = $( "#name" ),
email = $( "#email" ),
password = $( "#password" ),
allFields = $( [] ).add( name ).add( email ).add( password ),
tips = $( ".validateTips" );
function updateTips( t ) {
tips.text( t ).addClass( "ui-state-highlight" );
setTimeout(function() { tips.removeClass( "ui-state-highlight", 1500 ); }, 500 );
}
function checkLength( o, n, min, max ) {
if ( o.val().length > max || o.val().length < min ) {
o.addClass( "ui-state-error" );
updateTips( "Length of " + n + " must be between " +
min + " and " + max + "." );
return false;
} else {
return true;
}
}
function checkRegexp( o, regexp, n ) {
if ( !( regexp.test( o.val() ) ) ) {
o.addClass( "ui-state-error" );
updateTips( n );
return false;
} else {
return true;
}
}
function addParticipant() {
var valid = true;
allFields.removeClass( "ui-state-error" );
valid = valid && checkLength( name, "username", 1, 12 );
valid = valid && checkRegexp( name, /^[a-z]([0-9a-z_\s])+$/i, "Username may consist of a-z, 0-9, underscores, spaces and must begin with a letter." );
if ( valid ) {
// alert("Name is"+name.val());
dialog.dialog( "close" );
}
return valid;
}
dialog = $( "#dialog-form" ).dialog({
autoOpen: false,
height: 170,
width: 300,
modal: true,
buttons: {
"Save": addParticipant,
Cancel: function() {
dialog.dialog( "close" );
}
},
close: function() {
form[ 0 ].reset();
allFields.removeClass( "ui-state-error" );
}
});
form = dialog.find( "form" ).on( "submit", function( event ) {
event.preventDefault();
addParticipant();
});
$( "#create-participant" ).button().on( "click", function() {
dialog.dialog( "open" );
});
});
</script>
</head>
<body>
<div id="dialog-form" title="Create new Participant" style="display:none">
<form>
<fieldset>
<label for="name"><?php echo __("LBL_NAME"); ?></label>
<input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all">
<input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
</fieldset>
</form>
</div>
<div id="users-contain" class="ui-widget">
</div>
<button id="create-participant"><?php echo __("LBL_CREATE_PARTICIPANT"); ?></button>
</body>
</html>

116
app/View/Expense/print.ctp Normal file
View File

@@ -0,0 +1,116 @@
<script>
function printPage(){
window.print();
}
</script>
<div id="exportPrintTable">
<div class="wrapper">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p>
<div class="description">
<p><strong> ExpenseCount "<?php echo $expense["title"];?>"</strong></p>
<?php if(isset($expense["description"])){ ?>
<p><?php echo $expense["description"];?></p>
<?php } ?>
<p><?php echo __("LBL_CREATED_BY"); ?> <?php echo $createdBy;?>, <?php echo __('LBL_ON'); ?> <?php echo $createdDate;?></p>
</div>
<div class="print">
<?php echo __("LBL_PRINTED_BY"); ?> <?php echo $printedBy;?> <span><?php echo date("d/m/Y - H:i");?></span>
</div>
<p><?php echo $printedBy;?> <?php echo __("LBL_SHOULD_VERIFY"); ?></p>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_WHO_PAID"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_INVOLVES"); ?></th>
<th ><?php echo __("LBL_FOR"); ?> <?php echo $printedBy;?>?</th>
</tr>
</thead>
<tbody>
<?php
$total_expense = 0;
$personal_total_expense = 0;
foreach($expenseList as $key=>$value){
?>
<tr>
<td><?php echo $value["paidBy"];?></td>
<td><?php
$total_expense = $total_expense + $value["amount"];
echo $value["amount"];?><?php echo " ".$expense["currency"];?></td>
<td><?php echo $value["expenseName"];?></td>
<td><?php echo $value["expenseDate"];?></td>
<td><?php echo $value["involves"];?></td>
<td><?php
$personal_total_expense = $personal_total_expense + $value["forYou"];
echo $value["forYou"];?><?php echo " ".$expense["currency"];?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: #fff;">
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo $total_expense." ".$expense["currency"]; ?></td>
<td style="border: 0px;"></td>
<td style="border: 0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo number_format($personal_total_expense, 2)." ".$expense["currency"]; ?></td>
</tr>
</tfoot>
</table>
<div class="description">
<p><strong><u>ExpenseCount <?php echo __("LBL_SOLUTION"); ?>:</u></strong></p>
<table style="font-size:12px;">
<?php
foreach($balanceArray as $key=>$value){
if(trim($value) != ""){
$valueArray = explode("|",$value);
?>
<tr><td><b><?php echo $valueArray[0];?></b> <?php echo __("LBL_SHOULD_PAY"); ?> <b><?php echo $valueArray[1];?></b></td><td>&nbsp;&nbsp;&nbsp; <?php echo $valueArray[2];?><?php echo " ".$expense["currency"];?></td></p></tr>
<?php
}
}
?>
</table>
</div>
<div class="footerText"><?php echo __('LBL_ADD_MODIFY_DELETE_MEAL_NECESSARY'); ?><br/>
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div>
<div class="footer-pdf-print-link hidden-print">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generatePdfBtn").on('click', function () {
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
})
});
</script>

View File

@@ -0,0 +1,121 @@
<script>
function printPage(){
window.print();
}
</script>
<div id="exportPrintTable">
<div class="wrapper">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p>
<div class="description">
<p><strong> ExpenseCount "<?php echo $expense["title"];?>"</strong></p>
<?php if(isset($expense["description"])){ ?>
<p><?php echo $expense["description"];?></p>
<?php } ?>
<p><?php echo __("LBL_CREATED_ON"); ?><?php echo $createdDate;?></p>
<p><?php echo __("LBL_BALANCE"); ?>: <b><?php echo $balance." ".$expense["currency"];?></b></p>
</div>
<div class="print">
<?php echo __("LBL_INCOMES"); ?> <span><?php echo __("LBL_PRINTED_ON"); ?> <?php echo date("d/m/Y - H:i");?></span>
</div>
<table class="printTable">
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
<?php
foreach($incomeList as $key=>$value){
?>
<tr>
<td><?php echo $value["expenseName"];?></td>
<td><?php echo $value["expenseCategory"];?></td>
<td><?php echo $value["expenseDate"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$expense["currency"];?></td>
</tr>
<?php
}
?>
<tr>
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $totalIncome." ".$expense["currency"];?></b></td>
</tr>
</table>
<br/>
<div class="print">
<?php echo __("LBL_EXPENSE"); ?>
</div>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
</thead>
<tbody>
<?php
foreach($expenseList as $key=>$value){
?>
<tr>
<td><?php echo $value["expenseName"];?></td>
<td><?php echo $value["expenseCategory"];?></td>
<td><?php echo $value["expenseDate"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$expense["currency"];?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: #fff;">
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $totalExpense." ".$expense["currency"];?></b></td>
</tr>
</tfoot>
</table>
<div class="footerText"><?php echo __('LBL_ADD_MODIFY_DELETE_MEAL_NECESSARY'); ?><br/>
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div>
<div class="footer-pdf-print-link hidden-print">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generatePdfBtn").on('click', function () {
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
})
});
</script>

View File

@@ -0,0 +1,543 @@
<?php
$showPieChart = false;
if(isset($data['FamilyExpense']) && !empty($data['FamilyExpense'])){
$showPieChart = true;
}
?>
<script>
function printPage(){
window.print();
}
</script>
<style type="text/css">
.showHideSpan{
font-size: 14px;
}
input[type="checkbox"]{
width: 20px;height: 18px;
}
.displaynone{
display: none;
}
.floatRight{
float: left;
}
#generateCSVBtn{
padding:10px 50px;
margin-right: 40px;
cursor: pointer;
}
#generatePdfBtn{
padding:10px 50px;
margin-right: 20px;
cursor: pointer;
}
#emailBtn{
margin-right: 20px;
cursor: pointer;
}
#topExportTable{
margin-bottom: 10px !important;
}
form#expenseorincomelistForm {
display: inline-flex;
}
select#expenseorincomelist {
margin-top: 4px;
}
@media print{
.showHideSpan{
display: none;
}
}
</style>
<div class="wrapper" id="printWrapper">
<div class="print" style="overflow: hidden;">
<form action="<?php echo $this->webroot . 'Expense/printReport/' . $data['Expense']['unique_url']; ?>" class="form-inline hidden-print" id="expenseorincomelistForm" method="post">
<div class="form-group">
<!-- <label for="participantId"><?php echo __("LBL_SELECT_PARTICIPANT"); ?> </label> -->
<input type="hidden" name="unique_url" value="<?php echo $data['Expense']['unique_url']; ?>">
<select name="current_perticipants" class="form-control" id="expenseorincomelist" style="width: 50%;height: 35px;min-width: 100px;">
<option value="">All</option>
<option value="Incomes" <?php echo ($current_perticipants == 'Incomes')? 'selected="selected"':''?>>Incomes</option>
<option value="Expenses" <?php echo ($current_perticipants == 'Expenses')? 'selected="selected"':''?>>Expenses</option>
</select>
</div>
</form>
<!-- <button type="submit" class="btn btn-info floatRight hidden-print" id="generateCSVBtn"><b>--><?php //echo __("LBL_CSV"); ?><!--</b> <img src="--><?php //echo HTTP_SITE_URL; ?><!--/images/download.png" style="height: 18px;width: 18px;"/></button>-->
<div class="float-right">
<button type="submit" class="btn btn-info floatRight hidden-print" id="generatePdfBtn"><b><?php echo __("LBL_PDF"); ?></b> <img src="<?php echo HTTP_SITE_URL; ?>/images/download.png" style="height: 18px;width: 18px;"/></button>
<!-- <span><?php //echo date("d/m/Y - H:i"); ?></span> -->
<!-- EMIAL BUTTON BEGIN -->
<?php if ($issetParam) { ?>
<button type="button" class="btn btn-info floatRight hidden-print generate" id="emailBtn" data-toggle="modal" data-target="#myExpenseModal"><b>Send Email</b></button>
<?php } ?>
</div>
<div class="modal fade" id="myExpenseModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-inner">
<h5 class="modal-title" id="exampleModalLabel">Send Email</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body my-expenses" style="min-height: auto;">
<?php //echo $this->Form->create(null, array('id' => 'sendEmailForm'));
?>
<form action="<?php echo $this->Html->url(array('controller' => 'Expense', 'action' => 'sendEmailPdf')); ?>" class="form-inline" method="post" id="sendEmailForm">
<input type="hidden" name="whole_content_email" id="wholeContentEmail">
<div class="form-group" style="width: 100%;margin-bottom: 5px;">
<?php if($isPaid){ ?>
<label for="email"><?php echo __("LBL_INVITE_EMAIL_ADDRESS"); ?>:</label>
<?php
echo $this->Form->input('email', array('label' => false, 'email' => __('LBL_PLEASE_PROVIDE_EMAIL'), 'length' => '200px', 'required' => 'true', 'style' => 'width:240px; height:30px;', 'id' => 'email'));
}else{
echo "This function is for paid user only!";
}
?>
</div>
<?php if($isPaid){
echo $this->Form->end('Send Email', array('class' => 'myExpenseSend','style'=>'margin-top:1rem;'));
}else{
?>
<div class="submit" style="margin-top: 3rem;"></div>
<?php
echo "</form>";
}
?>
<img id="loadImg1" style="display:none;float: right" src="<?php echo CDN_URL; ?>images/loading.gif" />
<button type="button" class="btn btn-secondary modal-footer-close" data-dismiss="modal" style="height: 35px; bottom:2rem;">Close</button>
<?php //} ?>
</div>
</div>
</div>
</div>
<!-- email button End-->
</div>
<div id="exportPrintTable">
<div class="wrapper2">
<div style="width: 100%; overflow: hidden;">
<div style="width: 40%;float: left; ">
<!-- <p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p> -->
<div class="description">
<p><strong style="font-size: 20px;"><?php echo $data['Expense']["title"];?></strong><br/><?php if(!empty($data['Expense']["description"])){ ?><?php echo $data['Expense']["description"];?><br/>
<?php }
$create_date = strtotime($data['Expense']["create_date"]); ?>
<?php echo __("LBL_CREATED_ON"); ?> <?php echo date('d-M-Y', $create_date);?><br />
<?php echo __("LBL_BALANCE"); ?>: <b><?php echo ($total_family_income - $total_family_expense)." ".$data['Expense']["currency"];?></b></p>
</div>
</div>
<?php if ($showPieChart) { ?>
<div style="width: 60%;float: left; margin-bottom: 10px;">
<!-- <span class="showHideSpan" style=""> (<label for="isChartShow">--><?php //echo __("LBL_HIDE_SHOW"); ?><!-- <input type="checkbox" value="1" id="isChartShow" checked="checked"></label>)</span>-->
<div style="border: 1px solid #bbb; margin: 5px 0; " id="chartDiv" class="hidden-print">
<script src="<?php echo CDN_URL;?>js/highcharts/highcharts.js"></script>
<!-- <script src="https://code.highcharts.com/modules/exporting.js"></script> -->
<!-- <script src="https://code.highcharts.com/modules/export-data.js"></script> -->
<div id="containerLine" ></div>
<script type="text/javascript">
Highcharts.chart('containerLine', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'line'
},
title: {
text: '<?php echo __("LBL_INCOME_EXPENSE_BALANCE_COMPARISON"); ?>'
},
subtitle: {
text: ''
},
yAxis: {
title: {
text: 'Amount'
}
},
legend: {
backgroundColor: '',
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
floating: false,
symbolHeight:10,
symbolWidth:10,
squareSymbol:true
},
colors: ['#1FA809', '#7E0202', '#0E9FD5', '#910000', '#1aadce', '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a'],
credits: {
enabled:false
},
exporting: {
type: 'image/jpeg',
enabled:true
},
series: [
<?php if($current_perticipants != 'Expenses' ) : ?>
{
name: '<?php echo __("LBL_INCOMES"); ?>',
data: [<?php echo $total_income_str; ?>/*43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175*/]
},
<?php endif; ?>
<?php if($current_perticipants != 'Incomes' ) : ?>
{
name: '<?php echo __("LBL_EXPENSE"); ?>',
data: [<?php echo $total_expense_str; ?>/*24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434*/]
},
<?php endif; ?>
{
name: '<?php echo __("LBL_BALANCE"); ?>',
data: [<?php echo $total_balance_str; ?>/*11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387*/]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});
</script>
</div>
</div>
<?php } ?>
</div>
<!-- <div class="print">
<?php echo __("LBL_INCOMES"); ?> <span><?php echo __("LBL_PRINTED_ON"); ?> <?php echo date("d/m/Y - H:i");?></span>
</div> -->
<?php if($current_perticipants != 'Expenses' ) : ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_INCOMES"); ?>
<!--<span class="showHideSpan" style="width: 100%; "> (<?php /*echo __("LBL_HIDE_SHOW"); */?>:
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isWhatReasonShowIncome"><?php /*echo __("LBL_FOR_WHAT_REASONS"); */?>
<input type="checkbox" value="1" id="isWhatReasonShowIncome" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isCategoryShowIncome"><?php /*echo __("LBL_CATEGORY"); */?>
<input type="checkbox" value="1" id="isCategoryShowIncome" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isWhenShowIncome"><?php /*echo __("LBL_WHEN"); */?>
<input type="checkbox" value="1" id="isWhenShowIncome" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isHowMuchShowIncome"><?php /*echo __("LBL_HOW_MUCH"); */?>
<input type="checkbox" value="1" id="isHowMuchShowIncome" checked="checked"></label>
)
</span>--></h5>
<table class="printTable table" id="topExportTable">
<thead>
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?>?</th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
</thead>
<tbody>
<?php
$finalIncomeList = array();
$finalIncomeHeadingList = array();
$finalIncomeHeadingList['nameHeading'] = __("LBL_FOR_WHAT_REASONS");
$finalIncomeHeadingList['categoryHeading'] = __("LBL_CATEGORY");
$finalIncomeHeadingList['dateHeading'] = __("LBL_WHEN");
$finalIncomeHeadingList['amountHeading'] = __("LBL_HOW_MUCH");
foreach($data['FamilyExpense'] as $key=>$value){
if($value['record_type'] == 2) {
$finalIncomeList[$key]['expenseName'] = $value['what'];
$finalIncomeList[$key]['expenseCategory'] = $value['category'];
$finalIncomeList[$key]['expenseDate'] = $value['expense_date_new'];
$finalIncomeList[$key]['amount'] = $value['amount'];
$finalIncomeList[$key]['currency'] = $data['Expense']["currency"];
?>
<tr>
<td><?php echo $value["what"];?></td>
<td><?php echo $value["category"];?></td>
<td><?php echo $value["expense_date_new"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$data['Expense']["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $total_family_income." ".$data['Expense']["currency"];?></b></td>
</tr>
</tfoot>
</table>
<?php endif; ?>
<!-- <br/>
<div class="print">
<?php echo __("LBL_EXPENSE"); ?>
</div> -->
<?php if($current_perticipants != 'Incomes' ) : ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_EXPENSES"); ?>
<!--<span class="showHideSpan" style="width: 100%; "> (<?php /*echo __("LBL_HIDE_SHOW"); */?>:
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isWhatReasonShowExpense"><?php /*echo __("LBL_FOR_WHAT_REASONS"); */?>
<input type="checkbox" value="1" id="isWhatReasonShowExpense" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isCategoryShowExpense"><?php /*echo __("LBL_CATEGORY"); */?>
<input type="checkbox" value="1" id="isCategoryShowExpense" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isWhenShowExpense"><?php /*echo __("LBL_WHEN"); */?>
<input type="checkbox" value="1" id="isWhenShowExpense" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isHowMuchShowExpense"><?php /*echo __("LBL_HOW_MUCH"); */?>
<input type="checkbox" value="1" id="isHowMuchShowExpense" checked="checked"></label>
)
</span>--></h5>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
</thead>
<tbody>
<?php
$finalExpenseList = array();
$finalExpenseHeadingList = array();
$finalExpenseHeadingList['nameHeading'] = __("LBL_FOR_WHAT_REASONS");
$finalExpenseHeadingList['categoryHeading'] = __("LBL_CATEGORY");
$finalExpenseHeadingList['dateHeading'] = __("LBL_WHEN");
$finalExpenseHeadingList['amountHeading'] = __("LBL_HOW_MUCH");
foreach($data['FamilyExpense'] as $key=>$value){
if($value['record_type'] == 1) {
$finalExpenseList[$key]['expenseName'] = $value['what'];
$finalExpenseList[$key]['expenseCategory'] = $value['category'];
$finalExpenseList[$key]['expenseDate'] = $value['expense_date_new'];
$finalExpenseList[$key]['amount'] = $value['amount'];
$finalExpenseList[$key]['currency'] = $data['Expense']["currency"];
?>
<tr>
<td><?php echo $value["what"];?></td>
<td><?php echo $value["category"];?></td>
<td><?php echo $value["expense_date_new"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$data['Expense']["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr style="background: #fff;">
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $total_family_expense." ".$data['Expense']["currency"];?></b></td>
</tr>
</tfoot>
</table>
<?php endif; ?>
<div style="width: 100%; overflow: hidden;margin-top: 50px;">
<div class="hidden-print" style="width: 30%;float:left;">
<a href="#" id="previewBtn" class="btn btn-info"><?php echo __('LBL_PREVIEW_BTN'); ?></a>
</div>
<div style="width: 40%;float: right; text-align: right;margin-right: 20px;">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo $this->webroot; ?><?php echo __('LBL_FAMILY_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
</div>
</div>
<!-- <div class="footerText">
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div> -->
<div class="footer-pdf-print-link hidden-print displaynone">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn2"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generateFamilyCSV'));?>" class="form-inline" method="post" id="generateCSV" style="display: inline-flex;">
<input type="hidden" name="csv_income_content" value='<?php echo serialize($finalIncomeList); ?>'>
<input type="hidden" name="csv_income_heading" value='<?php echo serialize($finalIncomeHeadingList); ?>'>
<input type="hidden" name="csv_expense_content" value='<?php echo serialize($finalExpenseList); ?>'>
<input type="hidden" name="csv_expense_heading" value='<?php echo serialize($finalExpenseHeadingList); ?>'>
<div class="form-group">
<button type="submit" class="btn btn-info" id="generateCSVBtn2"><?php echo __("LBL_CSV"); ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#topExportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generateCSVBtn").on('click', function () {
$("form#generateCSV").submit();
});
$("#generatePdfBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').remove();
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
});
$("#emailBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').remove();
var Content = $('#exportPrintTable').html();
var ContentWrap = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>'+Content+'</body></html>';
var currentHtml = $("#wholeContentEmail").val(ContentWrap);
// alert($("#wholeContent").val());
//$("form#sendEmail").submit();
});
$("#previewBtn").on('click', function () {
$('.showHideSpan').hide();
$('#expenseorincomelist').hide();
$('#chartDiv').hide();
// $('.hidden-print').hide();
// $('.hidden-print.generate').show();
$(this).hide();
});
$("#isWhatReasonShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(1)').show();
$('table#topExportTable td:nth-child(1)').show();
} else {
$('table#topExportTable th:nth-child(1)').hide();
$('table#topExportTable td:nth-child(1)').hide();
}
});
$("#isCategoryShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(2)').show();
$('table#topExportTable td:nth-child(2)').show();
} else {
$('table#topExportTable th:nth-child(2)').hide();
$('table#topExportTable td:nth-child(2)').hide();
}
});
$("#isWhenShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(3)').show();
$('table#topExportTable td:nth-child(3)').show();
} else {
$('table#topExportTable th:nth-child(3)').hide();
$('table#topExportTable td:nth-child(3)').hide();
}
});
$("#isHowMuchShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(4)').show();
$('table#topExportTable td:nth-child(4)').show();
} else {
$('table#topExportTable th:nth-child(4)').hide();
$('table#topExportTable td:nth-child(4)').hide();
}
});
$("#isWhatReasonShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(1)').show();
$('table#exportTable td:nth-child(1)').show();
} else {
$('table#exportTable th:nth-child(1)').hide();
$('table#exportTable td:nth-child(1)').hide();
}
});
$("#isCategoryShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(2)').show();
$('table#exportTable td:nth-child(2)').show();
} else {
$('table#exportTable th:nth-child(2)').hide();
$('table#exportTable td:nth-child(2)').hide();
}
});
$("#isWhenShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(3)').show();
$('table#exportTable td:nth-child(3)').show();
} else {
$('table#exportTable th:nth-child(3)').hide();
$('table#exportTable td:nth-child(3)').hide();
}
});
$("#isHowMuchShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(4)').show();
$('table#exportTable td:nth-child(4)').show();
} else {
$('table#exportTable th:nth-child(4)').hide();
$('table#exportTable td:nth-child(4)').hide();
}
});
$("#isChartShow").on('click', function () {
if(this.checked) {
$('#chartDiv').show();
} else {
$('#chartDiv').hide();
}
});
$("#expenseorincomelist").on('change', function () {
// var Content = $('#exportPrintTable').html();
// var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
// var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#expenseorincomelistForm").submit();
// dashBoard.printExpense();
});
});
</script>

View File

@@ -0,0 +1,446 @@
<script>
function printPage(){
window.print();
}
</script>
<style type="text/css">
.showHideSpan{
font-size: 14px;
}
input[type="checkbox"]{
width: 20px;height: 18px;
}
.displaynone{
display: none;
}
.floatRight{
float: right;
}
#generateCSVBtn,
#generatePdfBtn{
padding:5px 50px;
margin-right: 40px;
}
form#expenseorincomelistForm {
display: inline-flex;
}
@media print{
.showHideSpan{
display: none;
}
}
</style>
<div class="wrapper" id="printWrapper">
<div class="print" style="overflow: hidden;">
<form action="<?php echo $this->webroot . 'Expense/printReport/' . $data['Expense']['unique_url']; ?>" class="form-inline hidden-print" id="expenseorincomelistForm" method="post">
<div class="form-group">
<!-- <label for="participantId"><?php echo __("LBL_SELECT_PARTICIPANT"); ?> </label> -->
<input type="hidden" name="unique_url" value="<?php echo $data['Expense']['unique_url']; ?>">
<select name="current_perticipants" id="expenseorincomelist" style="width: 50%;height: 35px;min-width: 100px;">
<option value="">All</option>
<option value="Incomes" <?php echo ($current_perticipants == 'Incomes')? 'selected="selected"':''?>>Incomes</option>
<option value="Expenses" <?php echo ($current_perticipants == 'Expenses')? 'selected="selected"':''?>>Expenses</option>
</select>
</div>
</form>
<button type="submit" class="btn btn-info floatRight hidden-print" id="generateCSVBtn"><?php echo __("LBL_CSV"); ?> <img src="<?php echo HTTP_SITE_URL; ?>images/download.png" style="height: 18px;width: 18px;"/></button>
<button type="submit" class="btn btn-info floatRight hidden-print" id="generatePdfBtn"><?php echo __("LBL_PDF"); ?> <img src="<?php echo HTTP_SITE_URL; ?>images/download.png" style="height: 18px;width: 18px;"/></button>
<!-- <span><?php //echo date("d/m/Y - H:i"); ?></span> -->
</div>
<div id="exportPrintTable">
<div class="wrapper2">
<div style="width: 100%; overflow: hidden;">
<div style="width: 40%;float: left; ">
<!-- <p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p> -->
<div class="description">
<p><strong> ExpenseCount "<?php echo $data['Expense']["title"];?>"</strong></p>
<?php if(isset($data['Expense']["description"])){ ?>
<p><?php echo $data['Expense']["description"];?></p>
<?php }
$create_date = strtotime($data['Expense']["create_date"]); ?>
<p><?php echo __("LBL_CREATED_ON"); ?> <?php echo date('d-M-Y', $create_date);?></p>
<p><?php echo __("LBL_BALANCE"); ?>: <b><?php echo ($total_family_income - $total_family_expense)." ".$data['Expense']["currency"];?></b></p>
</div>
</div>
<div style="width: 60%;float: left; ">
<span class="showHideSpan" style=""> (<?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" id="isChartShow" checked="checked">)</span>
<div style="border: 1px solid #bbb; margin: 5px 0; " id="chartDiv">
<script src="<?php echo CDN_URL;?>js/highcharts/highcharts.js"></script>
<!-- <script src="https://code.highcharts.com/modules/exporting.js"></script> -->
<!-- <script src="https://code.highcharts.com/modules/export-data.js"></script> -->
<div id="containerLine" style=""></div>
<script type="text/javascript">
Highcharts.chart('containerLine', {
title: {
text: '<?php echo __("LBL_INCOME_EXPENSE_BALANCE_COMPARISON"); ?>'
},
subtitle: {
text: ''
},
yAxis: {
title: {
text: 'Amount'
}
},
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
},
colors: ['#1FA809', '#7E0202', '#0E9FD5', '#910000', '#1aadce', '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a'],
plotOptions: {
series: {
label: {
connectorAllowed: false
},
// pointStart: 2010
}
},
credits: {
enabled:false
},
exporting: {
enabled:false
},
series: [
<?php if($current_perticipants != 'Expenses' ) : ?>
{
name: '<?php echo __("LBL_INCOMES"); ?>',
data: [<?php echo $total_income_str; ?>/*43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175*/]
},
<?php endif; ?>
<?php if($current_perticipants != 'Incomes' ) : ?>
{
name: '<?php echo __("LBL_EXPENSE"); ?>',
data: [<?php echo $total_expense_str; ?>/*24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434*/]
},
<?php endif; ?>
{
name: '<?php echo __("LBL_BALANCE"); ?>',
data: [<?php echo $total_balance_str; ?>/*11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387*/]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});
</script>
</div>
</div>
</div>
<!-- <div class="print">
<?php echo __("LBL_INCOMES"); ?> <span><?php echo __("LBL_PRINTED_ON"); ?> <?php echo date("d/m/Y - H:i");?></span>
</div> -->
<?php if($current_perticipants != 'Expenses' ) : ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_INCOMES"); ?>
<span class="showHideSpan" style="width: 100%; "> (<?php echo __("LBL_HIDE_SHOW"); ?>:
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_FOR_WHAT_REASONS"); ?>
<input type="checkbox" value="1" id="isWhatReasonShowIncome" checked="checked">
<?php echo __("LBL_CATEGORY"); ?>
<input type="checkbox" value="1" id="isCategoryShowIncome" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_WHEN"); ?>
<input type="checkbox" value="1" id="isWhenShowIncome" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_HOW_MUCH"); ?>
<input type="checkbox" value="1" id="isHowMuchShowIncome" checked="checked">
)
</span></h5>
<table class="printTable table" id="topExportTable">
<thead>
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?>?</th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
</thead>
<tbody>
<?php
$finalIncomeList = array();
$finalIncomeHeadingList = array();
$finalIncomeHeadingList['nameHeading'] = __("LBL_FOR_WHAT_REASONS");
$finalIncomeHeadingList['categoryHeading'] = __("LBL_CATEGORY");
$finalIncomeHeadingList['dateHeading'] = __("LBL_WHEN");
$finalIncomeHeadingList['amountHeading'] = __("LBL_HOW_MUCH");
foreach($data['FamilyExpense'] as $key=>$value){
if($value['record_type'] == 2) {
$finalIncomeList[$key]['expenseName'] = $value['what'];
$finalIncomeList[$key]['expenseCategory'] = $value['category'];
$finalIncomeList[$key]['expenseDate'] = $value['expense_date_new'];
$finalIncomeList[$key]['amount'] = $value['amount'];
$finalIncomeList[$key]['currency'] = $data['Expense']["currency"];
?>
<tr>
<td><?php echo $value["what"];?></td>
<td><?php echo $value["category"];?></td>
<td><?php echo $value["expense_date_new"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$data['Expense']["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $total_family_income." ".$data['Expense']["currency"];?></b></td>
</tr>
</tfoot>
</table>
<?php endif; ?>
<!-- <br/>
<div class="print">
<?php echo __("LBL_EXPENSE"); ?>
</div> -->
<?php if($current_perticipants != 'Incomes' ) : ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_EXPENSES"); ?>
<span class="showHideSpan" style="width: 100%; "> (<?php echo __("LBL_HIDE_SHOW"); ?>:
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_FOR_WHAT_REASONS"); ?>
<input type="checkbox" value="1" id="isWhatReasonShowExpense" checked="checked">
<?php echo __("LBL_CATEGORY"); ?>
<input type="checkbox" value="1" id="isCategoryShowExpense" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_WHEN"); ?>
<input type="checkbox" value="1" id="isWhenShowExpense" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_HOW_MUCH"); ?>
<input type="checkbox" value="1" id="isHowMuchShowExpense" checked="checked">
)
</span></h5>
<table class="printTable table" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_CATEGORY"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
</tr>
</thead>
<tbody>
<?php
$finalExpenseList = array();
$finalExpenseHeadingList = array();
$finalExpenseHeadingList['nameHeading'] = __("LBL_FOR_WHAT_REASONS");
$finalExpenseHeadingList['categoryHeading'] = __("LBL_CATEGORY");
$finalExpenseHeadingList['dateHeading'] = __("LBL_WHEN");
$finalExpenseHeadingList['amountHeading'] = __("LBL_HOW_MUCH");
foreach($data['FamilyExpense'] as $key=>$value){
if($value['record_type'] == 1) {
$finalExpenseList[$key]['expenseName'] = $value['what'];
$finalExpenseList[$key]['expenseCategory'] = $value['category'];
$finalExpenseList[$key]['expenseDate'] = $value['expense_date_new'];
$finalExpenseList[$key]['amount'] = $value['amount'];
$finalExpenseList[$key]['currency'] = $data['Expense']["currency"];
?>
<tr>
<td><?php echo $value["what"];?></td>
<td><?php echo $value["category"];?></td>
<td><?php echo $value["expense_date_new"];?></td>
<td><?php echo $value["amount"];?><?php echo " ".$data['Expense']["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr style="background: #fff;">
<td style="border:0px"> </td>
<td style="border:0px"> </td>
<td style="border:0px;text-align:right"><?php echo __("LBL_TOTAL"); ?>:</td>
<td style="border:0px"><b><?php echo $total_family_expense." ".$data['Expense']["currency"];?></b></td>
</tr>
</tfoot>
</table>
<?php endif; ?>
<div style="width: 100%; overflow: hidden;margin-top: 50px;">
<div style="width: 40%;float: right; text-align: right;margin-right: 20px;">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo HTTP_SITE_URL; ?><?php echo __('LBL_FAMILY_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
</div>
</div>
<!-- <div class="footerText">
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div> -->
<div class="footer-pdf-print-link hidden-print displaynone">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn2"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generateFamilyCSV'));?>" class="form-inline" method="post" id="generateCSV" style="display: inline-flex;">
<input type="hidden" name="csv_income_content" value='<?php echo serialize($finalIncomeList); ?>'>
<input type="hidden" name="csv_income_heading" value='<?php echo serialize($finalIncomeHeadingList); ?>'>
<input type="hidden" name="csv_expense_content" value='<?php echo serialize($finalExpenseList); ?>'>
<input type="hidden" name="csv_expense_heading" value='<?php echo serialize($finalExpenseHeadingList); ?>'>
<div class="form-group">
<button type="submit" class="btn btn-info" id="generateCSVBtn2"><?php echo __("LBL_CSV"); ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#topExportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generateCSVBtn").on('click', function () {
$("form#generateCSV").submit();
});
$("#generatePdfBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').hide();
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
});
$("#isWhatReasonShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(1)').show();
$('table#topExportTable td:nth-child(1)').show();
} else {
$('table#topExportTable th:nth-child(1)').hide();
$('table#topExportTable td:nth-child(1)').hide();
}
});
$("#isCategoryShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(2)').show();
$('table#topExportTable td:nth-child(2)').show();
} else {
$('table#topExportTable th:nth-child(2)').hide();
$('table#topExportTable td:nth-child(2)').hide();
}
});
$("#isWhenShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(3)').show();
$('table#topExportTable td:nth-child(3)').show();
} else {
$('table#topExportTable th:nth-child(3)').hide();
$('table#topExportTable td:nth-child(3)').hide();
}
});
$("#isHowMuchShowIncome").on('click', function () {
if(this.checked) {
$('table#topExportTable th:nth-child(4)').show();
$('table#topExportTable td:nth-child(4)').show();
} else {
$('table#topExportTable th:nth-child(4)').hide();
$('table#topExportTable td:nth-child(4)').hide();
}
});
$("#isWhatReasonShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(1)').show();
$('table#exportTable td:nth-child(1)').show();
} else {
$('table#exportTable th:nth-child(1)').hide();
$('table#exportTable td:nth-child(1)').hide();
}
});
$("#isCategoryShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(2)').show();
$('table#exportTable td:nth-child(2)').show();
} else {
$('table#exportTable th:nth-child(2)').hide();
$('table#exportTable td:nth-child(2)').hide();
}
});
$("#isWhenShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(3)').show();
$('table#exportTable td:nth-child(3)').show();
} else {
$('table#exportTable th:nth-child(3)').hide();
$('table#exportTable td:nth-child(3)').hide();
}
});
$("#isHowMuchShowExpense").on('click', function () {
if(this.checked) {
$('table#exportTable th:nth-child(4)').show();
$('table#exportTable td:nth-child(4)').show();
} else {
$('table#exportTable th:nth-child(4)').hide();
$('table#exportTable td:nth-child(4)').hide();
}
});
$("#isChartShow").on('click', function () {
if(this.checked) {
$('#chartDiv').show();
} else {
$('#chartDiv').hide();
}
});
$("#expenseorincomelist").on('change', function () {
// var Content = $('#exportPrintTable').html();
// var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
// var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#expenseorincomelistForm").submit();
// dashBoard.printExpense();
});
});
</script>

View File

@@ -0,0 +1,114 @@
<script>
function printPage(){
window.print();
}
</script>
<div id="exportPrintTable">
<div class="wrapper">
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF');?>" width="270" height="72" alt=""/></a> </p>
<div class="description">
<p><strong> ExpenseCount "<?php echo $expense["title"];?>"</strong></p>
<?php if(isset($expense["description"])){ ?>
<p><?php echo $expense["description"];?></p>
<?php } ?>
<p><?php echo __("LBL_CREATED_BY"); ?> <?php echo $createdBy;?>, <?php echo __('LBL_ON'); ?> <?php echo $createdDate;?></p>
</div>
<div class="print">
<?php echo __("LBL_PRINTED_BY"); ?> <?php echo $printedBy;?> <span><?php echo date("d/m/Y - H:i");?></span>
</div>
<p><?php echo $printedBy;?> <?php echo __("LBL_SHOULD_VERIFY"); ?></p>
<table class="table printTable" id="exportTable">
<thead>
<tr>
<th><?php echo __("LBL_WHO_PAID"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_INVOLVES"); ?></th>
<th ><?php echo __("LBL_FOR"); ?> <?php echo $printedBy;?>?</th>
</tr>
</thead>
<tbody>
<?php
$total_expense = 0;
$personal_total_expense = 0;
foreach($expenseList as $key=>$value){
?>
<tr>
<td><?php echo $value["paidBy"];?></td>
<td><?php
$total_expense = $total_expense + $value["amount"];
echo $value["amount"];?><?php echo " ".$expense["currency"];?></td>
<td><?php echo $value["expenseName"];?></td>
<td><?php echo $value["expenseDate"];?></td>
<td><?php echo $value["involves"];?></td>
<td><?php
$personal_total_expense = $personal_total_expense + $value["forYou"];
echo $value["forYou"];?><?php if($value["forYou"] > 0) { echo " ".$expense["currency"];}?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: #fff;">
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo $total_expense." ".$expense["currency"]; ?></td>
<td style="border: 0px;"></td>
<td style="border: 0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo number_format($personal_total_expense, 2)." ".$expense["currency"]; ?></td>
</tr>
</tfoot>
</table>
<div class="description">
<p><strong><u>ExpenseCount <?php echo __("LBL_SOLUTION"); ?>:</u></strong></p>
<table style="font-size:12px;">
<?php
foreach($balanceArray as $key=>$value){
if(trim($value) != ""){
$valueArray = explode("|",$value);
?>
<tr><td><b><?php echo $valueArray[0];?></b> <?php echo __("LBL_SHOULD_PAY"); ?> <b><?php echo $valueArray[1];?></b></td><td>&nbsp;&nbsp;&nbsp; <?php echo $valueArray[2];?><?php echo " ".$expense["currency"];?></td></p></tr>
<?php
}
}
?>
</table>
</div>
<div class="footerText"><?php echo __('LBL_ADD_MODIFY_DELETE_MEAL_NECESSARY'); ?><br/>
<?php echo __("LBL_CLICK"); ?> <a href="#" style="cursor:pointer" onclick="printPage()"> <?php echo __("LBL_HERE"); ?></a> <?php echo __("LBL_TO_PRINT_THE_PAGE"); ?>.</div>
<div class="footer-pdf-print-link hidden-print">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generatePdf'));?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generatePdfBtn").on('click', function () {
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
})
});
</script>

View File

@@ -0,0 +1,747 @@
<?php
$showPieChart = false;
if(isset($data['Meal']) && !empty($data['Meal']) && !empty($data['GroupExpense'])){
$showPieChart = true;
} elseif(!isset($data['Meal']) && isset($data['GroupExpense']) && !empty($data['GroupExpense'])) {
$showPieChart = true;
}
?>
<script>
function printPage(){
window.print();
}
</script>
<style type="text/css">
.showHideSpan{
font-size: 14px;
}
input[type="checkbox"]{
width: 20px;height: 18px;
}
.displaynone{
display: none;
}
.floatRight{
float: right;
}
#generateCSVBtn{
padding:10px 50px;
margin-right: 40px;
cursor: pointer;
}
#generatePdfBtn{
/* padding:10px 50px; */
margin-right: 20px;
cursor: pointer;
}
#emailBtn{
margin-right: 20px;
cursor: pointer;
}
.hideCell{
display: none;
}
table.perticipantTable{
margin-bottom: 10px !important;
}
.print #participantData .participant{
padding-top:6px;
padding-left:10px;
}
.print #participantData .participant label{
font-size:15px;
font-weight: 600;
}
.print #participantData .participant select{
font-size:15px;
}
#previewBtn{
margin:20px 0 0 10px;
}
.hideCell{
display: none !important;
}
.description p
{
line-height:22px;
margin-bottom::0;
padding-bottom:0
}
@media print{
.hideCell{
display: none !important;
}
.showHideSpan{
display: none !important;
}
.description p
{
line-height:22px;
margin-bottom::0;
padding-bottom:0
}
}
.my-expenses{
min-height: auto;
}
.my-expenses .submit {
text-align: right;
margin-right: 6rem;
margin-bottom: 1rem;
margin-top: 1rem;
}
</style>
<div class="wrapper" id="printWrapper">
<div class="print" style="overflow: hidden;">
<form action="<?php echo $this->webroot . 'Expense/printReport/' . $data['Expense']['unique_url']; ?>" class="form-inline hidden-print" id="participantData" method="post">
<div class="form-group participant">
<label for="participantId"><?php echo __("LBL_SELECT_PARTICIPANT"); ?> </label>
<input type="hidden" name="unique_url" value="<?php echo $data['Expense']['unique_url']; ?>">
<select class="form-control" id="participantId" name="participant_id" placeholder="Select any">
<option value="" ><?php echo __("LBL_ALL"); ?></option>
<?php foreach ($data['Participant'] as $participant) { ?>
<option
value="<?php echo $participant['participant_id']; ?>"
<?php if (!empty($participant_id) && $participant_id == $participant['participant_id']) {
echo "Selected";
$participant_name = $participant['name'];
} ?>
><?php echo $participant['name']; ?></option>
<?php
} ?>
</select>
</div>
</form>
<!-- <button type="submit" class="btn btn-info floatRight hidden-print generate" id="generateCSVBtn"><b>--><?php //echo __("LBL_CSV"); ?><!--</b> <img src="--><?php //echo HTTP_SITE_URL; ?><!--/images/download.png" style="height: 18px;width: 18px;"/></button>-->
<div class="float-right">
<button type="submit" class="btn btn-info hidden-print generate" id="generatePdfBtn"><b><?php echo __("LBL_PDF"); ?></b> <img src="<?php echo HTTP_SITE_URL; ?>/images/download.png" style="height: 18px;width: 18px; display: inline;"/></button>
<!-- <span><?php //echo date("d/m/Y - H:i"); ?></span> -->
<!-- EMIAL BUTTON BEGIN -->
<?php if ($issetParam) { ?>
<button type="button" class="btn btn-info floatRight hidden-print generate" id="emailBtn" data-toggle="modal" data-target="#myExpenseModal"><b>Send Email</b></button>
<?php } ?>
</div>
<div class="modal fade" id="myExpenseModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-inner">
<h5 class="modal-title" id="exampleModalLabel">Send Email</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body my-expenses">
<?php //echo $this->Form->create(null, array('id' => 'sendEmailForm'));
?>
<form action="<?php echo $this->Html->url(array('controller' => 'Expense', 'action' => 'sendEmailPdf')); ?>" class="form-inline" method="post" id="sendEmailForm">
<input type="hidden" name="whole_content_email" id="wholeContentEmail">
<div class="form-group" style="width: 100%;">
<?php if($isPaid){ ?>
<label for="email"><?php echo __("LBL_INVITE_EMAIL_ADDRESS"); ?>:</label>
<?php
echo $this->Form->input('email', array('label' => false, 'email' => __('LBL_PLEASE_PROVIDE_EMAIL'), 'length' => '200px', 'required' => 'true', 'style' => 'width:240px; height:30px;', 'id' => 'email'));
}else{
echo "This function is for paid user only!";
}
?>
</div>
<?php if($isPaid){
echo $this->Form->end('Send Email', array('class' => 'myExpenseSend','style'=>'margin-top:1rem;'));
}else{
?>
<div class="submit" style="margin-top: 3rem;"></div>
<?php
echo "</form>";
}
?>
<img id="loadImg1" style="display:none;float: right" src="<?php echo CDN_URL; ?>images/loading.gif" />
<button type="button" class="btn btn-secondary modal-footer-close" data-dismiss="modal" style="height: 35px; bottom:2rem;">Close</button>
<?php //} ?>
</div>
</div>
</div>
</div>
<!-- email button End-->
</div>
<div id="exportPrintTable">
<div class="exportPrintTable-inner">
<div style="width: 100%; overflow: hidden;">
<div style="width: 40%;float: left; ">
<!-- <p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF'); ?>" width="270" height="72" alt=""/></a> </p> -->
<div class="description">
<p><strong style="font-size: 20px;"> <?php echo $data['Expense']["title"]; ?></strong><?php if (!empty($data['Expense']["description"])) { echo "<br/>".$data['Expense']["description"]; ?><br/>
<?php
}
$create_date = strtotime($data['Expense']["create_date"]);
?></p>
<p><?php echo __("LBL_CREATED_AT"). __("LBL_ON"); ?> <?php echo date('d-M-Y', $create_date); ?></p>
</div>
</div>
<?php if($showPieChart) { ?>
<div style="width: 60%;float: left; margin-bottom: 10px;">
<span class="showHideSpan" style=""> (<label for="isChartShow"><?php echo __("LBL_HIDE_SHOW"); ?></label> <input type="checkbox" value="1" id="isChartShow" checked="checked">)</span>
<div style="border: 1px solid #bbb; margin: 5px 0; " id="chartDiv">
<script src="<?php echo CDN_URL;?>js/highcharts/highcharts.js"></script>
<div id="containerPie" style=""></div>
<script type="text/javascript">
// Build the chart
Highcharts.chart('containerPie', {
chart: {
height:280,
width:540,
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Participant wise expense ratio'
},
tooltip: {
pointFormat: '<b>{point.percentage:.1f}%</b>'//{series.name}:
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format:'<b>{point.percentage:.1f}%</b>'
},
showInLegend: true
}
},
series: [{
name: 'Brands',
colorByPoint: true,
data: <?php echo $pieChartDataFinal; ?>
/*[{
name: 'Chrome',
y: 31.41
}, {
name: 'Internet Explorer',
y: 11.84
}, {
name: 'Firefox',
y: 10.85
}, {
name: 'Edge',
y: 4.67
}, {
name: 'Safari',
y: 4.18
}, {
name: 'Other',
y: 7.05
}]*/
}],
legend: {
// layout: 'vertical',
backgroundColor: '',
align: 'right',
verticalAlign: 'middle',
// alignColumns:false,
floating: false,
itemWidth:100,
width:200,
x: 0,
y: 0,
symbolHeight:10,
symbolWidth:10,
squareSymbol:true
},
credits: {
enabled:false
},
exporting: {
type: 'image/jpeg',
enabled:true
}
});
</script></div>
</div>
<?php } ?>
</div>
<?php
// total meal calculation
$totalMeal = 0;
if (isset($data['Meal']) && !empty($data['Meal'])) {
foreach ($data['Meal'] as $zz => $value) {
$subtotal = 0;
$breakfast = 0;
$lunch = 0;
$dinner = 0;
$meal_participants = explode(',', $value['meal_amount']);
if(!empty($meal_participants)){
foreach ($meal_participants as $meal_participant) {
$meal_amounts = explode('|', $meal_participant);
if((($current_perticipants != '') && ($current_perticipants == $meal_amounts[0])) || ($current_perticipants == '')){
$breakfast += $meal_amounts[1];
$lunch += $meal_amounts[2];
$dinner += $meal_amounts[3];
}
}
}
$subtotal = $breakfast + $lunch + $dinner;
$totalMeal += $subtotal;
?>
<?php
}
}
?>
<span class="showHideSpan" style="width: 100%; "> (<?php echo __("LBL_HIDE_SHOW"); ?>:
&nbsp;&nbsp;<label for="isWhoPaidShow"><?php echo __("LBL_WHO_PAID"); ?>
<input type="checkbox" value="1" id="isWhoPaidShow" checked="checked"></label>
<!-- <label for="isWhatReasonShow">--><?php //echo __("LBL_FOR_WHAT_REASONS"); ?>
<!-- <input type="checkbox" value="1" id="isWhatReasonShow" checked="checked"></label>-->
<!-- <label for="isHowMuchShow">--><?php //echo __("LBL_HOW_MUCH"); ?>
<!-- <input type="checkbox" value="1" id="isHowMuchShow" checked="checked"></label>-->
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isWhenShow"><?php echo __("LBL_WHEN"); ?>
<input type="checkbox" value="1" id="isWhenShow" checked="checked"></label>
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="isInvolvesShow"><?php echo __("LBL_INVOLVES"); ?>
<input type="checkbox" value="1" id="isInvolvesShow" checked="checked"></label>
)
</span>
<table class="table printTable perticipantTable" id="exportTable" width="100%">
<thead>
<tr>
<th><?php echo __("LBL_WHO_PAID"); ?></th>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_INVOLVES"); ?></th>
<?php if (!empty($participant_id)) { ?>
<th><?php echo __("LBL_FOR"); ?> <?php echo $participant_name; ?>?</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
$personal_total_expense = 0;
$total_expense = 0;
$settled = 0;
$advanced = 0;
$finalExpenseList = array();
foreach ($data['GroupExpense'] as $key => $value) {
$extras_value = 0;
if (isset($value['extras']) && !empty($value['extras'])) {
$extrasArray = explode('|', $value['extras']);
$extras_value = $extrasArray[0];
}
if ($extras_value == 1 || $value['what'] == 'Balance Expense') {
$settled++;
$extras_value = 1;
} elseif ($extras_value == 2) {
$advanced++;
}
if (!in_array($extras_value, [1,2]) ) {
//if ( (isset($data['Meal']) && !empty($data['Meal']) && ($totalMeal > 0)) || (!isset($data['Meal']) && empty($data['Meal'])) ) {
$finalExpenseList[$key]['participent_name'] = $value["participent_name"];
$finalExpenseList[$key]['amount'] = $value["amount"];
$finalExpenseList[$key]['what'] = $value["what"];
$finalExpenseList[$key]['expense_date_new'] = $value["expense_date_new"];
$finalExpenseList[$key]['involve_list'] = $value["involve_list"];
$finalExpenseList[$key]['my_expense'] = 0;
$finalExpenseList[$key]['currency'] = $data['Expense']["currency"];
if (!empty($participant_id)) {
if (!isset($data['Meal']) && empty($data['Meal'])) {
$finalExpenseList[$key]['my_expense'] = number_format($value["my_expense"], 2);
}
}
?>
<tr>
<td><?php echo $value["participent_name"]; ?></td>
<td><?php echo $value["what"]; ?></td>
<td data-sort="<?php echo $value["amount"]; ?>"><?php
$total_expense = $total_expense + $value["amount"];
echo number_format($value["amount"], 2) . " " . $data['Expense']["currency"]; ?></td>
<td data-sort="<?php echo strtotime($value["expense_date_new"]); ?>"><?php echo $value["expense_date_new"]; ?></td>
<td><?php echo $value["involve_list"]; ?></td>
<?php if (!empty($participant_id)) { ?>
<td><?php
if (is_numeric ($value["my_expense"])) {
$personal_total_expense = $personal_total_expense + $value["my_expense"];
echo number_format($value["my_expense"], 2) . " " . $data['Expense']["currency"];
} else {
echo $value["my_expense"];
}
?></td>
<?php
} ?>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<?php //if ( (isset($data['Meal']) && !empty($data['Meal']) && ($totalMeal > 0)) || (!isset($data['Meal']) && empty($data['Meal'])) ) { ?>
<tr style="background: transparent;">
<?php if (!empty($participant_id)) { ?>
<td style="border: 0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo number_format($total_expense, 2) . " " . $data['Expense']["currency"]; ?></td>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo number_format($personal_total_expense, 2) . " " . $data['Expense']["currency"]; ?></td>
<?php
} else { ?>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold; border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border:0px;"><?php echo number_format($total_expense, 2) . " " . $data['Expense']["currency"]; ?></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<?php } ?>
</tr>
<?php
/* }
if($totalMeal == 0){
if (!empty($participant_id)) {
echo '<tr style="background: transparent;">
<td colspan="6" style="text-align:center;">No expense found for '.$allParticipant[$participant_id]['name'].'</td></tr>';
} else {
echo '<tr style="background: transparent;"><td colspan="5">No expense found for '.$allParticipant[$participant_id]['name'].'</td></tr>';
}
}*/
?>
</tfoot>
</table> <!--expense table end-->
<!--Advanced table start-->
<?php if ($advanced > 0) {
$check_extras = 2;
echo $this->element('reports/settled_table', array('check_extras'=>$check_extras)); }
?><!--Advanced table end -->
<!--settled table start-->
<?php if ($settled > 0) {
$check_extras = 1;
echo $this->element('reports/settled_table', array('check_extras'=>$check_extras));
} ?><!--settled table end -->
<?php $finalMealList = array();
if (isset($data['Meal']) ) { ?>
<h5 id="summaryHeader" style="text-align: left;" class="meal-report"><?php echo __("LBL_MEALS"); ?>
<span class="showHideSpan" style=""> (<label for="isMealReportShow"><?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" name="isMealReportShow" id="isMealReportShow" checked="checked"></label>)</span>
</h5>
<table class="table printTable mealTable" id="exportTable" width="100%">
<thead>
<tr>
<th><?php echo __("LBL_DATE"); ?></th>
<th><?php echo __("LBL_DAY"); ?></th>
<th><?php echo __("LBL_BREAKFAST"); ?></th>
<th><?php echo __("LBL_LUNCH"); ?></th>
<th><?php echo __("LBL_DINNER"); ?></th>
<th><?php echo __("LBL_TOTAL"); ?></th>
</tr>
</thead>
<tbody>
<?php
$total = 0; $tempParticipantMeal = array();
foreach ($data['Meal'] as $zz => $value) {
if($totalMeal > 0){
$subtotal = 0;
$breakfast = 0;
$lunch = 0;
$dinner = 0;
$meal_participants = explode(',', $value['meal_amount']);
if(!empty($meal_participants)){
foreach ($meal_participants as $meal_participant) {
$meal_amounts = explode('|', $meal_participant);
if((($current_perticipants != '') && ($current_perticipants == $meal_amounts[0])) || ($current_perticipants == '')){
$breakfast += $meal_amounts[1];
$lunch += $meal_amounts[2];
$dinner += $meal_amounts[3];
if(!isset($tempParticipantMeal[$meal_amounts[0]]['meal'])){
$tempParticipantMeal[$meal_amounts[0]]['meal'] = 0;
}
$tempParticipantMeal[$meal_amounts[0]]['meal'] += $meal_amounts[1] + $meal_amounts[2] + $meal_amounts[3];
}
}
}
$subtotal = $breakfast + $lunch + $dinner;
$total += $subtotal;
$finalMealList[$zz]['create_date'] = date('d-M-Y', strtotime($value["date_new"]));
$finalMealList[$zz]['day'] = date('D', strtotime($value["date_new"]));
$finalMealList[$zz]['breakfast'] = $breakfast;
$finalMealList[$zz]['lunch'] = $lunch;
$finalMealList[$zz]['dinner'] = $dinner;
$finalMealList[$zz]['subtotal'] = $subtotal;
?>
<tr>
<td><?php echo date('d-M-Y', strtotime($value["date_new"])); ?></td>
<td><?php echo date('D', strtotime($value["date_new"])); ?></td>
<td><?php echo $breakfast; ?></td>
<td><?php echo $lunch; ?></td>
<td><?php echo $dinner; ?></td>
<td><?php echo $subtotal; ?></td>
</tr>
<?php
}
}
$meal_total = $total;
?>
</tbody>
<tfoot>
<?php if($totalMeal > 0){ ?>
<tr style="background: transparent;">
<td style="border: 0px;"></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td style="border:0px;"><?php echo number_format($total, 2); ?></td>
</tr>
<?php } else { ?>
<tr><td style="text-align: center;" colspan="6"><?php echo __("LBL_NO_MEAL_AVAILABLE"); ?></td></tr>
<?php } ?>
</tfoot>
</table>
<?php } ?>
<h5 id="summaryHeader" style="text-align: left;" class="summary-report"><?php echo __("LBL_SUMMARY_REPORT"); ?>
<span class="showHideSpan" style=""> (<label for="isSummaryReportShow"><?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" name="isSummaryReportShow" id="isSummaryReportShow" checked="checked"></label>)</span>
</h5>
<table class="printTable table" id="exportTableBalance" style="text-align: center;">
<thead>
<th style="text-align: center;"><?php echo __("LBL_PARTICIPANTS"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_CHARGED"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_PAID"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_DUE"); ?></th>
</tr>
</thead>
<tbody>
<?php
$due = 0;
$count = 1;
$finalSummaryList = array();
foreach($allParticipant as $key=>$value) {
$due = $value["total_paid"] - $value["total_charge"];
if( (($current_perticipants != '') && ($value['participant_id'] == $current_perticipants)) || ($current_perticipants == '') && !empty($key)) {
$finalSummaryList[$key]['name'] = $value['name'];
$finalSummaryList[$key]['total_charge'] = number_format($value['total_charge'], 2, '.', '');
$finalSummaryList[$key]['total_paid'] = number_format($value['total_paid'], 2, '.', '');
$finalSummaryList[$key]['currency'] = $value['currency'];
$finalSummaryList[$key]['due'] = number_format($value["total_paid"] - $value["total_charge"], 2, '.', '');
?>
<tr>
<td><?php echo $value["name"];?></td>
<td><?php echo number_format($value["total_charge"], 2, '.', '').' '.$value["currency"];?></td>
<td><?php echo number_format($value["total_paid"], 2, '.', '').' '.$value["currency"];?></td>
<td><?php echo number_format($due, 2, '.', '').' '.$value["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<!--summary of meal and expense start-->
<?php if (isset($data['Meal']) && !empty($data['Meal']) ) {
echo $this->element('reports/balance_expense', array('meal_total'=>$meal_total)); }
?><!--summary of meal and expense end -->
<div style="width: 100%; overflow: hidden;margin-top: 50px;">
<div class="hidden-print" style="width: 30%;float:left;">
<a href="#" id="previewBtn" class="btn btn-info"><?php echo __('LBL_PREVIEW_BTN'); ?></a>
</div>
<div style="width: 40%;float: right; text-align: right;margin-right: 20px;">
<?php if (isset($data['Meal'])) : ?>
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo HTTP_SITE_URL; ?>/<?php echo __('LBL_MESS_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
<?php else : ?>
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo HTTP_SITE_URL; ?>/<?php echo __('LBL_GROUP_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!-- <div class="footerText">To add, delete or comment on the expenses, balance an ExpenseCount or print this page, it is necessary to access the ExpenseCount.com via a traditional browser.<br/>
click <a href="#" style="cursor:pointer" onclick="printPage()"> here</a> to print the page.</div>-->
<div class="footer-pdf-print-link hidden-print displaynone">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller' => 'Expense', 'action' => 'generatePdf')); ?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn2"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
<!-- <form action="<?php echo $this->Html->url(array('controller' => 'Expense', 'action' => 'sendEmailPdf')); ?>" class="form-inline" method="post" id="sendEmail">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="sendEmail"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form> -->
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generateCSV'));?>" class="form-inline" method="post" id="generateCSV" style="display: inline-flex;">
<input type="hidden" name="csv_content" value='<?php echo serialize($finalExpenseList); ?>'>
<input type="hidden" name="csv_summary_content" value='<?php echo serialize($finalSummaryList); ?>'>
<input type="hidden" name="csv_meal_content" value='<?php echo serialize($finalMealList); ?>'>
<input type="hidden" name="hasMeal" value='<?php echo $hasMeal; ?>'>
<div class="form-group">
<button type="submit" class="btn btn-info" id="generateCSVBtn2"><?php echo __("LBL_CSV"); ?></button>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function(){
$("#participantId").on('change', function () {
//alert("selection changed");
$("form#participantData").submit();
});
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generateCSVBtn").on('click', function () {
$("form#generateCSV").submit();
});
$("#generatePdfBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').hide().css('visibility','hidden');
$('.showHideSpan').remove();
$('.hideCell').remove();
var Content = $('#exportPrintTable').html();
var ContentWrap = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>'+Content+'</body></html>';
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
});
$("#emailBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').hide().css('visibility','hidden');
$('.showHideSpan').remove();
$('.hideCell').remove();
var Content = $('#exportPrintTable').html();
var ContentWrap = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>'+Content+'</body></html>';
var currentHtml = $("#wholeContentEmail").val(ContentWrap);
// alert($("#wholeContent").val());
//$("form#sendEmail").submit();
});
$("#previewBtn").on('click', function () {
$('.showHideSpan').hide();
$('#participantData').hide();
$('.hidden-print').hide();
$('.hidden-print.generate').show();
$(this).hide();
});
$("#isSummaryReportShow").on('click', function () {
if(this.checked) {
$('#exportTableBalance').show().removeClass('hideCell');
$(".summary-report").removeClass('hidden-print');
} else {
$('#exportTableBalance').hide().addClass('hideCell');
$(".summary-report").addClass('hidden-print');
}
});
$("#isMealReportShow").on('click', function () {
if(this.checked) {
$('.mealTable').show().removeClass('hideCell');
$(".meal-report").removeClass('hidden-print');
} else {
$('.mealTable').hide().addClass('hideCell');
$(".meal-report").addClass('hidden-print');
}
});
$("#isWhoPaidShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(1)').show().removeClass('hideCell');
$('table.perticipantTable td:nth-child(1)').show().removeClass('hideCell');
} else {
$('table.perticipantTable th:nth-child(1)').hide().addClass('hideCell');
$('table.perticipantTable td:nth-child(1)').hide().addClass('hideCell');
}
});
$("#isHowMuchShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(3)').show().removeClass('hideCell');
$('table.perticipantTable td:nth-child(3)').show().removeClass('hideCell');
} else {
$('table.perticipantTable th:nth-child(3)').hide().addClass('hideCell');
$('table.perticipantTable td:nth-child(3)').hide().addClass('hideCell');
}
});
$("#isWhatReasonShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(2)').show().removeClass('hideCell');
$('table.perticipantTable td:nth-child(2)').show().removeClass('hideCell');
} else {
$('table.perticipantTable th:nth-child(2)').hide().addClass('hideCell');
$('table.perticipantTable td:nth-child(2)').hide().addClass('hideCell');
}
});
$("#isWhenShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(4)').show().removeClass('hideCell');
$('table.perticipantTable td:nth-child(4)').show().removeClass('hideCell');
} else {
$('table.perticipantTable th:nth-child(4)').hide().addClass('hideCell');
$('table.perticipantTable td:nth-child(4)').hide().addClass('hideCell');
}
});
$("#isInvolvesShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(5)').show().removeClass('hideCell');
$('table.perticipantTable td:nth-child(5)').show().removeClass('hideCell');
} else {
$('table.perticipantTable th:nth-child(5)').hide().addClass('hideCell');
$('table.perticipantTable td:nth-child(5)').hide().addClass('hideCell');
}
});
$("#isChartShow").on('click', function () {
if(this.checked) {
$('#chartDiv').show().removeClass('hideCell');
} else {
$('#chartDiv').hide().addClass('hideCell');
}
});
});
</script>

View File

@@ -0,0 +1,504 @@
<script>
function printPage(){
window.print();
}
</script>
<style type="text/css">
.showHideSpan{
font-size: 14px;
}
input[type="checkbox"]{
width: 20px;height: 18px;
}
.displaynone{
display: none;
}
.floatRight{
float: right;
}
#generateCSVBtn,
#generatePdfBtn{
padding:5px 50px;
margin-right: 40px;
}
@media print{
.showHideSpan{
display: none;
}
}
</style>
<div class="wrapper" id="printWrapper">
<div class="print" style="overflow: hidden;">
<form action="<?php echo $this->webroot . 'Expense/printReport/' . $data['Expense']['unique_url']; ?>" class="form-inline hidden-print" id="participantData" method="post">
<div class="form-group">
<label for="participantId"><?php echo __("LBL_SELECT_PARTICIPANT"); ?> </label>
<input type="hidden" name="unique_url" value="<?php echo $data['Expense']['unique_url']; ?>">
<select class="form-control" id="participantId" name="participant_id" placeholder="Select any">
<option value="" ><?php echo __("LBL_ALL"); ?></option>
<?php foreach ($data['Participant'] as $participant) { ?>
<option
value="<?php echo $participant['participant_id']; ?>"
<?php if (!empty($participant_id) && $participant_id == $participant['participant_id']) {
echo "Selected";
$participant_name = $participant['name'];
} ?>
><?php echo $participant['name']; ?></option>
<?php
} ?>
</select>
</div>
</form>
<button type="submit" class="btn btn-info floatRight hidden-print" id="generateCSVBtn"><?php echo __("LBL_CSV"); ?> <img src="<?php echo HTTP_SITE_URL; ?>images/download.png" style="height: 18px;width: 18px;"/></button>
<button type="submit" class="btn btn-info floatRight hidden-print" id="generatePdfBtn"><?php echo __("LBL_PDF"); ?> <img src="<?php echo HTTP_SITE_URL; ?>images/download.png" style="height: 18px;width: 18px;"/></button>
<!-- <span><?php //echo date("d/m/Y - H:i"); ?></span> -->
</div>
<div id="exportPrintTable">
<div class="exportPrintTable-inner">
<div style="width: 100%; overflow: hidden;">
<div style="width: 40%;float: left; ">
<!-- <p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?><?php echo __('LBL_LOGO_PDF'); ?>" width="270" height="72" alt=""/></a> </p> -->
<div class="description">
<p><strong> ExpenseCount "<?php echo $data['Expense']["title"]; ?>"</strong></p>
<?php if (isset($data['Expense']["description"])) { ?>
<p><?php echo $data['Expense']["description"]; ?></p>
<?php
}
$create_date = strtotime($data['Expense']["create_date"]);
?>
<p><?php echo __("LBL_CREATED_BY"); ?> <?php echo $data['Participant'][0]['name']; ?>, <?php echo __("LBL_ON"); ?> <?php echo date('d-M-Y', $create_date); ?></p>
</div>
</div>
<div style="width: 60%;float: left;">
<span class="showHideSpan" style=""> (<?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" id="isChartShow" checked="checked">)</span>
<div style="border: 1px solid #bbb; margin: 5px 0; " id="chartDiv">
<!-- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> -->
<script src="<?php echo CDN_URL;?>js/highcharts/highcharts.js"></script>
<!-- <script src="https://code.highcharts.com/modules/exporting.js"></script> -->
<!-- <script src="https://code.highcharts.com/modules/export-data.js"></script> -->
<div id="containerPie" style=""></div>
<script type="text/javascript">
// Build the chart
Highcharts.chart('containerPie', {
chart: {
height:280,
width:540,
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Participant wise expense ratio'
},
tooltip: {
pointFormat: '<b>{point.percentage:.1f}%</b>'//{series.name}:
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format:'<b>{point.percentage:.1f}%</b>'
},
showInLegend: true
}
},
series: [{
name: 'Brands',
colorByPoint: true,
data: <?php echo $pieChartDataFinal; ?>
/*[{
name: 'Chrome',
y: 31.41
}, {
name: 'Internet Explorer',
y: 11.84
}, {
name: 'Firefox',
y: 10.85
}, {
name: 'Edge',
y: 4.67
}, {
name: 'Safari',
y: 4.18
}, {
name: 'Other',
y: 7.05
}]*/
}],
legend: {
// layout: 'vertical',
backgroundColor: '',
align: 'right',
verticalAlign: 'middle',
// alignColumns:false,
floating: false,
itemWidth:100,
width:200,
x: 0,
y: 0,
// maxHeight:200,
// navigation:{
// enabled:true
// }
symbolHeight:10,
symbolWidth:10,
squareSymbol:true
},
credits: {
enabled:false
},
exporting: {
enabled:false
}
});
</script></div>
</div>
</div>
<span class="showHideSpan" style="width: 100%; "> (<?php echo __("LBL_HIDE_SHOW"); ?>:
<?php echo __("LBL_WHO_PAID"); ?>
<input type="checkbox" value="1" id="isWhoPaidShow" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_FOR_WHAT_REASONS"); ?>
<input type="checkbox" value="1" id="isWhatReasonShow" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_HOW_MUCH"); ?>
<input type="checkbox" value="1" id="isHowMuchShow" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_WHEN"); ?>
<input type="checkbox" value="1" id="isWhenShow" checked="checked">
&nbsp;&nbsp;&nbsp;&nbsp;<?php echo __("LBL_INVOLVES"); ?>
<input type="checkbox" value="1" id="isInvolvesShow" checked="checked">
)
</span>
<table class="table printTable perticipantTable" id="exportTable" width="100%">
<thead>
<tr>
<th><?php echo __("LBL_WHO_PAID"); ?></th>
<th><?php echo __("LBL_FOR_WHAT_REASONS"); ?></th>
<th><?php echo __("LBL_HOW_MUCH"); ?>?</th>
<th><?php echo __("LBL_WHEN"); ?></th>
<th><?php echo __("LBL_INVOLVES"); ?></th>
<?php if (!empty($participant_id)) { ?>
<th><?php echo __("LBL_FOR"); ?> <?php echo $participant_name; ?>?</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
$personal_total_expense = 0;
$total_expense = 0;
$finalExpenseList = array();
foreach ($data['GroupExpense'] as $key => $value) {
$finalExpenseList[$key]['participent_name'] = $value["participent_name"];
$finalExpenseList[$key]['amount'] = $value["amount"];
$finalExpenseList[$key]['what'] = $value["what"];
$finalExpenseList[$key]['expense_date_new'] = $value["expense_date_new"];
$finalExpenseList[$key]['involve_list'] = $value["involve_list"];
$finalExpenseList[$key]['my_expense'] = '';
$finalExpenseList[$key]['currency'] = $data['Expense']["currency"];
if (!empty($participant_id)) {
if (!isset($data['Meal']) && empty($data['Meal'])) {
$finalExpenseList[$key]['my_expense'] = number_format($value["my_expense"], 2);
}
}
?>
<tr>
<td><?php echo $value["participent_name"]; ?></td>
<td><?php echo $value["what"]; ?></td>
<td><?php
$total_expense = $total_expense + $value["amount"];
echo $value["amount"] . " " . $data['Expense']["currency"]; ?></td>
<td><?php echo $value["expense_date_new"]; ?></td>
<td><?php echo $value["involve_list"]; ?></td>
<?php if (!empty($participant_id)) { ?>
<td><?php
if (!isset($data['Meal']) && empty($data['Meal'])) {
$personal_total_expense = $personal_total_expense + $value["my_expense"];
echo number_format($value["my_expense"], 2) . " " . $data['Expense']["currency"];
}
?></td>
<?php
} ?>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<?php if (!empty($participant_id)) { ?>
<td style="border: 0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo $total_expense . " " . $data['Expense']["currency"]; ?></td>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border: 0px;"><?php echo number_format($personal_total_expense, 2) . " " . $data['Expense']["currency"]; ?></td>
<?php
} else { ?>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold; border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td align="left" style="border:0px;"><?php echo $total_expense . " " . $data['Expense']["currency"]; ?></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<?php } ?>
</tr>
</tfoot>
</table>
<?php $finalMealList = array();
if (isset($data['Meal']) && !empty($data['Meal'])) { ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_MEAL"); ?>
<span class="showHideSpan" style=""> (<?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" name="isMealReportShow" id="isMealReportShow" checked="checked">)</span>
</h5>
<table class="table printTable mealTable" id="exportTable" width="100%">
<thead>
<tr>
<th><?php echo __("LBL_DATE"); ?></th>
<th><?php echo __("LBL_DAY"); ?></th>
<th><?php echo __("LBL_BREAKFAST"); ?></th>
<th><?php echo __("LBL_LUNCH"); ?></th>
<th><?php echo __("LBL_DINNER"); ?></th>
<th><?php echo __("LBL_TOTAL"); ?></th>
</tr>
</thead>
<tbody>
<?php
$total = 0; $tempParticipantMeal = array();
foreach ($data['Meal'] as $zz => $value) {
$subtotal = 0;
$breakfast = 0;
$lunch = 0;
$dinner = 0;
$meal_participants = explode(',', $value['meal_amount']);
foreach ($meal_participants as $meal_participant) {
$meal_amounts = explode('|', $meal_participant);
$breakfast += $meal_amounts[1];
$lunch += $meal_amounts[2];
$dinner += $meal_amounts[3];
if(!isset($tempParticipantMeal[$meal_amounts[0]]['meal'])){
$tempParticipantMeal[$meal_amounts[0]]['meal'] = 0;
}
$tempParticipantMeal[$meal_amounts[0]]['meal'] += $meal_amounts[1] + $meal_amounts[2] + $meal_amounts[3];
}
$subtotal = $breakfast + $lunch + $dinner;
$total += $subtotal;
$finalMealList[$zz]['create_date'] = date('d-M-Y', strtotime($value["create_date"]));
$finalMealList[$zz]['day'] = date('D', strtotime($value["create_date"]));
$finalMealList[$zz]['breakfast'] = $breakfast;
$finalMealList[$zz]['lunch'] = $lunch;
$finalMealList[$zz]['dinner'] = $dinner;
$finalMealList[$zz]['subtotal'] = $subtotal;
?>
<tr>
<td><?php echo date('d-M-Y', strtotime($value["create_date"])); ?></td>
<td><?php echo date('D', strtotime($value["create_date"])); ?></td>
<td><?php echo $breakfast; ?></td>
<td><?php echo $lunch; ?></td>
<td><?php echo $dinner; ?></td>
<td><?php echo $subtotal; ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr style="background: transparent;">
<td style="border: 0px;"></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<td style="border:0px;"></td>
<td align="right" style="font-weight: bold;border: 0px;"><?php echo __("LBL_TOTAL"); ?> : </td>
<td style="border:0px;"><?php echo $total; ?></td>
</tr>
</tfoot>
</table>
<?php } ?>
<h5 id="summaryHeader" style="text-align: left;"><?php echo __("LBL_SUMMARY_REPORT"); ?>
<span class="showHideSpan" style=""> (<?php echo __("LBL_HIDE_SHOW"); ?> <input type="checkbox" value="1" name="isSummaryReportShow" id="isSummaryReportShow" checked="checked">)</span>
</h5>
<table class="printTable table" id="exportTableBalance" style="text-align: center;">
<thead>
<th style="text-align: center;"><?php echo __("LBL_PARTICIPANTS"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_CHARGED"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_PAID"); ?></th>
<th style="text-align: center;"><?php echo __("LBL_DUE"); ?></th>
</tr>
</thead>
<tbody>
<?php
$due = 0;
$count = 1;
$finalSummaryList = array();
foreach($allParticipant as $key=>$value) {
$due = $value["total_paid"] - $value["total_charge"];
if( (($current_perticipants != '') && ($value['participant_id'] == $current_perticipants)) || ($current_perticipants == '') ) {
$finalSummaryList[$key]['name'] = $value['name'];
$finalSummaryList[$key]['total_charge'] = $value['total_charge'];
$finalSummaryList[$key]['total_paid'] = $value['total_paid'];
$finalSummaryList[$key]['currency'] = $value['currency'];
$finalSummaryList[$key]['due'] = $value["total_paid"] - $value["total_charge"];
?>
<tr>
<td><?php echo $value["name"];?></td>
<td><?php echo $value["total_charge"].' '.$value["currency"];?></td>
<td><?php echo $value["total_paid"].' '.$value["currency"];?></td>
<td><?php echo $due.' '.$value["currency"];?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div style="width: 100%; overflow: hidden;margin-top: 50px;">
<div style="width: 40%;float: right; text-align: right;margin-right: 20px;">
<?php if (isset($data['Meal']) && !empty($data['Meal'])) : ?>
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo HTTP_SITE_URL; ?><?php echo __('LBL_MESS_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
<?php else : ?>
<p><a href="<?php echo $this->webroot; ?>"><img src="<?php echo HTTP_SITE_URL; ?><?php echo __('LBL_GROUP_EXPENSE_LOGO'); ?>" width="270" height="72" alt=""/></a> </p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!-- <div class="footerText">To add, delete or comment on the expenses, balance an ExpenseCount or print this page, it is necessary to access the ExpenseCount.com via a traditional browser.<br/>
click <a href="#" style="cursor:pointer" onclick="printPage()"> here</a> to print the page.</div>-->
<div class="footer-pdf-print-link hidden-print displaynone">
<a href="#" onclick="printPage()" class="btn btn-info"><?php echo __("LBL_PRINT"); ?></a>
<form action="<?php echo $this->Html->url(array('controller' => 'Expense', 'action' => 'generatePdf')); ?>" class="form-inline" method="post" id="generatePdf">
<input type="hidden" name="whole_content" id="wholeContent">
<div class="form-group">
<button type="submit" class="btn btn-info" id="generatePdfBtn2"><?php echo __("LBL_DOWNLOAD"); ?></button>
</div>
</form>
<form action="<?php echo $this->Html->url(array('controller'=>'Expense','action'=>'generateCSV'));?>" class="form-inline" method="post" id="generateCSV" style="display: inline-flex;">
<input type="hidden" name="csv_content" value='<?php echo serialize($finalExpenseList); ?>'>
<input type="hidden" name="csv_summary_content" value='<?php echo serialize($finalSummaryList); ?>'>
<input type="hidden" name="csv_meal_content" value='<?php echo serialize($finalMealList); ?>'>
<div class="form-group">
<button type="submit" class="btn btn-info" id="generateCSVBtn2"><?php echo __("LBL_CSV"); ?></button>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function(){
$("#participantId").on('change', function () {
//alert("selection changed");
$("form#participantData").submit();
});
$('#exportTable').DataTable({
"paging": false,
"searching": false,
"info": false
});
$("#generateCSVBtn").on('click', function () {
$("form#generateCSV").submit();
});
$("#generatePdfBtn").on('click', function () {
$('.showHideSpan').hide();
$('input[type="checkbox"]').hide().css('visibility','hidden');
var Content = $('#exportPrintTable').html();
var ContentWrap = "<!doctype html><html><body>"+Content+"</body></html>";
var currentHtml = $("#wholeContent").val(ContentWrap);
// alert($("#wholeContent").val());
$("form#generatePdf").submit();
});
$("#isSummaryReportShow").on('click', function () {
if(this.checked) {
$('#exportTableBalance').show();
} else {
$('#exportTableBalance').hide();
}
});
$("#isMealReportShow").on('click', function () {
if(this.checked) {
$('.mealTable').show();
} else {
$('.mealTable').hide();
}
});
$("#isWhoPaidShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(1)').show();
$('table.perticipantTable td:nth-child(1)').show();
} else {
$('table.perticipantTable th:nth-child(1)').hide();
$('table.perticipantTable td:nth-child(1)').hide();
}
});
$("#isHowMuchShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(3)').show();
$('table.perticipantTable td:nth-child(3)').show();
} else {
$('table.perticipantTable th:nth-child(3)').hide();
$('table.perticipantTable td:nth-child(3)').hide();
}
});
$("#isWhatReasonShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(2)').show();
$('table.perticipantTable td:nth-child(2)').show();
} else {
$('table.perticipantTable th:nth-child(2)').hide();
$('table.perticipantTable td:nth-child(2)').hide();
}
});
$("#isWhenShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(4)').show();
$('table.perticipantTable td:nth-child(4)').show();
} else {
$('table.perticipantTable th:nth-child(4)').hide();
$('table.perticipantTable td:nth-child(4)').hide();
}
});
$("#isInvolvesShow").on('click', function () {
if(this.checked) {
$('table.perticipantTable th:nth-child(5)').show();
$('table.perticipantTable td:nth-child(5)').show();
} else {
$('table.perticipantTable th:nth-child(5)').hide();
$('table.perticipantTable td:nth-child(5)').hide();
}
});
$("#isChartShow").on('click', function () {
if(this.checked) {
$('#chartDiv').show();
} else {
$('#chartDiv').hide();
}
});
});
</script>

View File

@@ -0,0 +1 @@
<h1> Record not found!</h1>

View File

@@ -0,0 +1,99 @@
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-1.10.2.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-ui.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<?php
echo $this->Session->flash();
echo $this->Form->create(null, array('url' => array('controller' => 'Home', 'action' => 'createGroupExpense')));
?>
<span id="error_title"></span><br/>
<span id="error_YourName"></span><br/>
<span id="error_participants"></span><br/>
<span id="error_currency"></span><br/>
<span id="error_captcha"></span><br/>
<table>
<tr><td>Title(*) </td> <td><?php echo $this->Form->input('title',array('title' => 'Please provide title','label'=>false,'length'=>'200px','required'=>'false'));?> </td></tr>
<tr> <td>Your Name(*) </td> <td><?php echo $this->Form->input('YourName',array('YourName' => 'Please provide Your Name','label'=>false,'length'=>'200px','required'=>'false'));?> </td></tr>
<tr><td> Participants </td> <td><?php echo $this->Form->input('participants',array('title' => 'Please provide comma separator value','label'=>false,'length'=>'200px','required'=>'false'));?> </td></tr>
<tr><td>Currency(*) </td> <td><?php echo $this->Form->input('currency',array('label'=>false)) ;?> </td></tr>
<tr><td>Description </td> <td><?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45'));?> </td></tr>
<tr><td> </td> <td><?php echo $this->Html->image(array('controller' => 'Home', 'action' => 'get_captcha'),array('id' => 'captcha_image'));
echo $this->Html->link('Reload Captcha', 'javascript:void(0);',array('id' => 'reload')); ?> </td></tr>
<tr><td> Captcha(*) </td> <td><?php echo $this->Form->input('captcha',array('label'=>false));?> </td></tr>
<tr> <td colspan="2" style="text-align:center" ><?php echo $this->Form->end('Submit');?> </td></tr>
</table>
<script type="text/javascript">
$(document).ready(function(){
$('#reload').click(function() {
var captcha = $("#captcha_image");
captcha.attr('src', captcha.attr('src')+'?'+Math.random());
return false;
});
});
$(document).ready(function () {
$('#ExpenseCreateGroupExpenseForm').submit(function(){
//serialize form data
var formData = $(this).serialize();
//get form action
var formUrl = $(this).attr('action');
// $('#error_title').text("");
// $('#error_participants').text("");
$('#ExpenseCreateGroupExpenseForm').find('span').text("");
$.ajax({
type: 'POST',
url: formUrl,
data: formData,
success: function(data,textStatus,xhr){
// alert(data);
if(data == "+000"){
document.getElementById("ExpenseCreateGroupExpenseForm").submit();
} else{
var lineArray = data.split("#");
var totalLine = lineArray.length-1;
for(var i=0;i<totalLine;i++){
var msgArray = lineArray[i].split("|");
$('#error_'+msgArray[0]).text(msgArray[1]);
//alert(msgArray[0]);
//alert(msgArray[1]);
}
}
},
error: function(xhr,textStatus,error){
// alert(error);
}
});
return false;
});
});
</script>

128
app/View/Facebook/index.ctp Normal file
View File

@@ -0,0 +1,128 @@
<!-- header section -->
<div class="header2">
<div class="fixedWidth760">
<div class="bannerEx shadow bannerHeight">
<div class="">
<div class="row">
<div class="col-xs-6">
<div class="logo-area">
<a href="#">
<img src="<?php echo $this->webroot;?>images/logo.png" alt="" />
</a>
</div>
<div class="bannerSlogun2">
<p>The Solution for organizing group,</p>
<p class="padding-left-100">mess and personal expenses</p>
</div>
</div>
<div class="col-xs-6">
<div class="ex-menu">
<a href="#">Blog</a> | <a href="#">FAQ</a> | <a href="#">Feed</a> | <a href="#">Web</a> | <a href="#">Terms</a>
</div>
<div class="flasg-icon-area">
<a style="cursor:pointer" onClick="changeLanguage('may')" >
<img alt="" src="<?php echo $this->webroot;?>images/may-icon.png" title="Malay" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('chi')">
<img src="<?php echo $this->webroot;?>images/chi-icon.png" title="Chinese(中國)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('rus')">
<img src="<?php echo $this->webroot;?>images/rus-icon.png" title="Russian(руÑ<C692>Ñ<EFBFBD>кий)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('urd')">
<img src="<?php echo $this->webroot;?>images/urd-icon.png" title="Urdu(اردو)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('spa')">
<img src="<?php echo $this->webroot;?>images/spa-icon.png" title="Spanish(español)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('ben')">
<img src="<?php echo $this->webroot;?>images/ben-icon.png" title="Bangla(বাংলা)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('hin')">
<img src="<?php echo $this->webroot;?>images/hin-icon.png" title="Hindi(नॉट)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('jpn')">
<img src="<?php echo $this->webroot;?>images/jpn-icon.png" title="Japanese(日本人)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('eng')">
<img src="<?php echo $this->webroot;?>images/eng-icon.png" title="English" />
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /End header section -->
<!--Start Content area -->
<div class="fixedWidth760">
<div class="bodyContent shadow" style="padding-top: 5px;">
<div class="btnArea">
<a href="#" class="customBtn"><span class="plusIcon">+</span> Create Group</a>
<a href="#" class="customBtn"><span class="plusIcon">+</span> Create Mess</a>
<a href="#" class="customBtn"><span class="plusIcon">+</span> Create Group</a>
<a href="#"><img src="<?php echo $this->webroot;?>images/app-mob.png" alt="" /></a>
</div>
<div class="round expenseTableContent">
<table class="gridTable2">
<tr>
<th>Description</th>
<th>Type</th>
<th>URL</th>
<th>Delete</th>
</tr>
<tr>
<td>
<h3>Title Text</h3>
<p>This is a Fimaliy trip This is a Fimaliy trip This is a Fimaliy trip</p>
<p><strong>Created by Razib on 20/01/2015</strong></p>
</td>
<td><p>Group Expenses</p></td>
<td><a href="#">www.expcount.com</a></td>
<td><a href="#"><img src="<?php echo $this->webroot;?>images/delete-icon.png" alt="" /></a></td>
</tr>
<tr>
<td>
<h3>Title Text</h3>
<p>This is a Fimaliy trip This is a Fimaliy trip This is a Fimaliy trip</p>
<p><strong>Created by Razib on 20/01/2015</strong></p>
</td>
<td><p>WeXpense</p></td>
<td><a href="#">www.expcount.com</a></td>
<td><a href="#"><img src="<?php echo $this->webroot;?>images/delete-icon.png" alt="" /></a></td>
</tr>
<tr>
<td>
<h3>Title Text</h3>
<p>This is a Fimaliy trip This is a Fimaliy trip This is a Fimaliy trip</p>
<p><strong>Created by Razib on 20/01/2015</strong></p>
</td>
<td><p>MessXpense</p></td>
<td><a href="#">www.expcount.com</a></td>
<td><a href="#"><img src="<?php echo $this->webroot;?>images/delete-icon.png" alt="" /></a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="copyrightArea">
<div class="fixedWidth760">
<div class="shadow">
<div class="copyright">
Copy right &copy; 2014 Expcount, All Rights Reserved.
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/**
* Application level View Helper
*
* This file is application-wide helper file. You can put all
* application-wide helper-related methods here.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Helper
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('Helper', 'View');
/**
* Application helper
*
* Add your application-wide methods in the class below, your helpers
* will inherit them.
*
* @package app.View.Helper
*/
class AppHelper extends Helper {
}

View File

@@ -0,0 +1,434 @@
<?php
App::uses('AppHelper', 'View/Helper');
class JqueryValidationHelper extends AppHelper {
public $helpers = array('Form', 'Html');
#-- Map to replace constants with jquery and class info
#-- Pass as $options['jquery-validation']
public $options = array(
'map' => array(
'__formSelector__' => '.jquery-validation',
'__errorElement__' => 'span',
'__errorClass__' => 'help-block',
'__hilightClass__' => 'form-error',
'__closestSelector__' => '.control-group',
'__closestErrorClass__' => 'error'
)
);
private $js = "
$(document).ready(function(){
$('__formSelector__').each( function(index) {
$.metadata.setType('attr','data-validate');
$(this).validate({
'errorElement': '__errorElement__',
'errorClass': '__errorClass__',
'highlight': function(element,errorClass) {
$(element)
.siblings('__errorClass__').remove();
$(element)
.addClass('__hilightClass__')
.closest('__closestSelector__').addClass('__closestErrorClass__');
},
'unhighlight': function(element,errorClass) {
$(element)
.siblings('__errorClass__').remove();
$(element)
.removeClass('__hilightClass__')
.closest('__closestSelector__').removeClass('__closestErrorClass__')
}
})
})
})";
/**
* createHorizontal
*
* Routine to mimic form helper with horizontal messages
*
* @param type $model
* @param type $options
*/
public function createHorizontal($model = null, $options = array()) {
if (!empty($options['class'])) {
$options['class'] .= ' form-horizontal jquery-validation';
} else {
$options['class'] = 'form-horizontal jquery-validation';
}
$this->options['map']['__errorClass__'] = 'help-inline';
return $this->Form->create($model, $options);
}
/**
* createVertical
*
* Routine to mimic form helper with vertical messages
*
* @param type $model
* @param type $options
*/
public function createVertical($model = null, $options = array()) {
if (!empty($options['class'])) {
$options['class'] .= ' form-vertical jquery-validation';
} else {
$options['class'] = 'form-vertical jquery-validation';
}
$this->options['map']['__errorClass__'] = 'help-block';
return $this->Form->create($model, $options);
}
/**
* input
*
* Routine to mimic form helper in order to get needed info.
*
* @param type $fieldName
* @param type $options
*/
public function input($fieldName, $options = array()) {
if (!isset($options['error']['attributes']['class'])) {
$options['error']['attributes']['class'] = $this->map['error-class'];
}
$map = $this->options['map'];
if (isset($options['jquery-validation'])) {
if (isset($options['jquery-validation']['map'])) {
$map = array_merge($map, $options['jquery-validation']['map']);
}
unset($options['jquery-validation']);
}
// Thx2 Olivier Rocques - Field names can be in the form User.name or User.0.name
$vals = explode('.', $fieldName);
if (count($vals) > 1) {
$model = $vals[0];
$fieldName = $vals[count($vals) - 1];
} else {
$model = $this->Form->defaultModel;
}
$meta = $this->meta($model, $fieldName);
$formatted_js = strtr($this->js, $map);
$boolean_fix_map = array(
'"true"' => 'true',
'"false"' => 'false',
);
$options['data-validate'] = strtr(json_encode($meta, JSON_NUMERIC_CHECK), $boolean_fix_map);
$response = $this->_addJs($map);
$response .= $this->Form->input($fieldName, $options);
return $response;
}
/**
* meta
*
* Returns a meta string to be added to the class of a dialog input
*
* @param type $model
* @param type $field
* @return string
*/
public function meta($model, $field) {
App::import('Model', $model);
$model_object = new $model();
$meta = array();
foreach ($model_object->validate as $validateField => $validateItem) {
//CakeLog::write('debug', 'JqueryValidation->meta: validateField=' . $validateField);
if ($field == $validateField) {
if (is_array($validateItem)) {
//CakeLog::write('debug', 'JqueryValidation->meta: validateItem=' . print_r($validateItem, true));
foreach ($validateItem as $validateName => $validateParams) {
if (!empty($validateParams['rule'])) {
$rule = $validateParams['rule'];
//CakeLog::write('debug', 'JqueryValidation->meta: $rule=' . print_r($rule, true));
if (is_array($rule)) {
$msg = $rule[0];
$ruleName = $rule[0];
} else {
$msg = $rule;
$ruleName = $rule;
}
if (!empty($validateParams['message'])) {
$msg = $validateParams['message'];
}
$ruleName = $rule[0];
//CakeLog::write('debug', 'JqueryValidation->meta: ruleName=' . $ruleName);
$methodName = 'jquery_validate_' . $ruleName;
if (method_exists($this, $methodName)) {
$meta = array_merge($meta, $this->$methodName($model, $field, $rule, $msg));
//CakeLog::write('debug', 'JqueryValidation->meta: $meta=' . $meta);
} else {
//CakeLog::write('debug', 'JqueryValidation->meta: function $ruleName not found');
}
}
}
}
}
}
return $meta;
}
/**
* Various functions to convert a CakePHP validation to a Jquery Validate meta tag
*/
private function jquery_validate_alphaNumeric($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->date: params=' . print_r($params, true));
$response['messages']['alphanumeric'] = $msg;
$response['alphanumeric'] = 'true';
return $response;
}
private function jquery_validate_between($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->between: params=' . print_r($params, true));
$response['messages']['min'] = $msg;
$response['messages']['max'] = $msg;
$response['min'] = $params[1];
$response['max'] = $params[2];
return $response;
}
private function jquery_validate_blank($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->blank: params=' . print_r($params, true));
$response['messages']['rangelength'] = $msg;
$response['rangelength'] = "[0, 0]";
return $response;
}
private function jquery_validate_boolean($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->boolean: params=' . print_r($params, true));
return '';
$response['messages']['boolean'] = $msg;
$response['boolean'] = "true";
return $response;
}
private function jquery_validate_cc($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->cc: params=' . print_r($params, true));
$response['messages']['creditcard'] = $msg;
$response['creditcard'] = "true";
return $response;
}
private function jquery_validate_comparison($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->comparison: params=' . print_r($params, true));
$response = array();
$op = $params[1];
$value = $params[2];
switch ($op) {
case '>':
$value++;
$response['messages']['min'] = $msg;
$response['min'] = $value;
break;
case '>=':
$response['messages']['min'] = $msg;
$response['min'] = $value;
break;
case '<':
$value--;
$response['messages']['max'] = $msg;
$response['max'] = $value;
break;
case '<=':
$response['messages']['max'] = $msg;
$response['max'] = $value;
break;
case '!=':
$value++;
$response['messages']['min'] = $msg;
$response['min'] = $value;
$value = $value - 2;
$response['messages']['max'] = $msg;
$response['max'] = $value;
break;
default:
return '';
}
return $response;
}
private function jquery_validate_date($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->date: params=' . print_r($params, true));
$response['messages']['date'] = $msg;
$response['date'] = "true";
return $response;
}
private function jquery_validate_datetime($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->datetime: params=' . print_r($params, true));
return '';
$response['messages']['datetime'] = $msg;
$response['datetime'] = "true";
return $response;
}
private function jquery_validate_decimal($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->decimal: params=' . print_r($params, true));
$response['messages']['decimal'] = $msg;
$response['number'] = "true";
return $response;
}
private function jquery_validate_email($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->email: params=' . print_r($params, true));
$response['messages']['email'] = $msg;
$response['email'] = "true";
return $response;
}
private function jquery_validate_equalTo($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->equalTo: params=' . print_r($params, true));
$response['messages']['equalTo'] = $msg;
$response['equalTo'] = "'" . Inflector::camelize($model) . Inflector::camelize($params[1]) . "'";
return $response;
}
private function jquery_validate_extension($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->extension: params=' . print_r($params, true));
$response['messages']['accept'] = $msg;
$response['accept'] = "'" . implode($params[1], "|") . "'";
return $response;
}
private function jquery_validate_inList($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->inList: params=' . print_r($params, true));
return '';
$response['messages']['inList'] = $msg;
$response['inList'] = "true";
return $response;
}
private function jquery_validate_ip($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->ip: params=' . print_r($params, true));
$response['messages']['ipv4'] = $msg;
$response['ipv4'] = "true";
return $response;
}
private function jquery_validate_luhn($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->luhn: params=' . print_r($params, true));
return '';
$response['messages']['luhn'] = $msg;
$response['luhn'] = "true";
return $response;
}
private function jquery_validate_maxLength($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->maxLength: params=' . print_r($params, true));
$response['messages']['maxlength'] = $msg;
$response['maxlength'] = $params[1];
return $response;
}
private function jquery_validate_minLength($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->minLength: params=' . print_r($params, true));
$response['messages']['minlength'] = $msg;
$response['minlength'] = $params[1];
return $response;
}
private function jquery_validate_money($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->money: params=' . print_r($params, true));
return '';
$response['messages']['money'] = $msg;
$response['money'] = "true";
return $response;
}
private function jquery_validate_notEmpty($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->notEmpty: params=' . print_r($params, true));
$response['messages']['required'] = $msg;
$response['required'] = "true";
return $response;
}
private function jquery_validate_numeric($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->numeric: params=' . print_r($params, true));
$response['messages']['number'] = $msg;
$response['number'] = 'true';
return $response;
}
private function jquery_validate_naturalNumber($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->naturalNumber: params=' . print_r($params, true));
$response['messages']['digits'] = $msg;
$response['digits'] = "true";
return $response;
}
private function jquery_validate_required($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->required: params=' . print_r($params, true));
$response['messages']['required'] = $msg;
$response['required'] = "true";
return $response;
}
private function jquery_validate_phone($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->phone: params=' . print_r($params, true));
$response['messages']['phoneUS'] = $msg;
$response['phoneUS'] = "true";
return $response;
}
private function jquery_validate_postal($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->postal: params=' . print_r($params, true));
$response['messages']['minlength'] = $msg;
$response['messages']['maxlength'] = $msg;
$response['minlength'] = 5;
$response['maxlength'] = 5;
return $response;
}
private function jquery_validate_range($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->range: params=' . print_r($params, true));
$response['messages']['min'] = $msg;
$response['messages']['max'] = $msg;
$response['min'] = $params[1];
$response['max'] = $params[2];
return $response;
}
private function jquery_validate_ssn($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->ssn: params=' . print_r($params, true));
$response['messages']['minlength'] = $msg;
$response['messages']['maxlength'] = $msg;
$response['minlength'] = 9;
$response['maxlength'] = 9;
return $response;
}
private function jquery_validate_time($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->time: params=' . print_r($params, true));
$response['messages']['time'] = $msg;
$response['time'] = "true";
return $response;
}
private function jquery_validate_url($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->url: params=' . print_r($params, true));
$response['messages']['url'] = $msg;
$response['url'] = "true";
return $response;
}
private function jquery_validate_uuid($model, $field, $params, $msg) {
//CakeLog::write('debug', 'JqueryValidation->uuid: params=' . print_r($params, true));
return '';
$response['messages']['uuid'] = $msg;
$response['uuid'] = "true";
return $response;
}
private function _addJs($map) {
$response = '';
#-- Inlcude the js if needed
if (!empty($this->js)) {
$formatted_js = strtr($this->js, $map);
$response .= "<script type=\"text/javascript\">" . $formatted_js . "</script>";
$this->js = '';
//CakeLog::write('debug','JqueryValidation->_addJs: injecting js '.$response);
}
return $response;
}
}
?>

View File

@@ -0,0 +1,98 @@
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=179508332152";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="bodyContent shadow">
<div class="row">
<div class="col-md-7">
<blockquote class="slogun">
"It is possible to manage your expenses without login!!!"
</blockquote>
</div>
<div class="col-md-5">
<div class="apps">
<div class="fb-like" data-href="https://www.facebook.com/expensecount/" data-layout="button_count" data-action="like" data-size="large" data-show-faces="true" data-share="true"></div>
&nbsp;&nbsp;
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'mobileApps'));?>">
<img src="<?php echo $this->webroot;?>images/<?php echo $current_lang;?>_expocount-mobile.png" alt="" />
</a>
<!-- <a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'facebookApp'));?>">
<img src="<?php echo $this->webroot;?>images/<?php echo $current_lang;?>_expocount-facebook.png" alt="" />
</a> -->
</div>
</div>
</div>
<!--box area-->
<div class="boxArea">
<div class="row">
<div class="col-md-4">
<div class="box">
<div class="box-title">WeXpense</div>
<div class="box-content">
<div class="img">
<img src="<?php echo $this->webroot;?>images/pic1.jpg" alt="" />
</div>
<p><b>How to split and balance group expenses?</b> ExpenseCount provides solution for any kind of shared or group expenses. It has ...(<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'groupExpense'));?>">more</a>)</p>
</div>
<div class="box-footer">
<a class="plusIcon" href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createGroupExpense'));?>">+</a>
<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createGroupExpense'));?>">Create New</a> |
<a target="blank" href="<?php echo $this->Html->url();?>6pbPNva1">Demo</a> |
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'mobileApps/1'));?>">Download App</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="box">
<div class="box-title">MessXpense</div>
<div class="box-content">
<div class="img">
<img src="<?php echo $this->webroot;?>images/pic2.jpg" alt="" />
</div>
<p><b>Sharing meals with others in mess or hostel?</b> ExpenseCount provides detailed report at the end of a mess period or month...(<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'messExpense'));?>">more</a>)</p>
</div>
<div class="box-footer">
<a class="plusIcon" href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createMessExpense'));?>">+</a>
<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createMessExpense'));?>">Create New</a> |
<a target="blank" href="<?php echo $this->Html->url();?>7qbMRgPO">Demo</a> |
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'mobileApps/2'));?>">Download App</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="box">
<div class="box-title">MyXpense</div>
<div class="box-content">
<div class="img">
<img src="<?php echo $this->webroot;?>images/pic3.jpg" alt="" />
</div>
<p><b>Want to track monthly personal expenses?</b> ExpenseCount helps you to figure out and track your monthly expenses...(<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'familyExpense'));?>">more</a>)</p>
</div>
<div class="box-footer">
<a class="plusIcon" href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createFamilyExpense'));?>">+</a>
<a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'createFamilyExpense'));?>">Create New</a> |
<a target="blank" href="<?php echo $this->Html->url();?>8nbRbGcc">Demo</a> |
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'mobileApps/3'));?>">Download App</a>
</div>
</div>
</div>
</div>
</div>
<!--/Endbox area-->
</div>

View File

@@ -0,0 +1,173 @@
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-1.10.2.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-ui.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<style>
.switch-container{
margin-left: 140px !important;
}
.switch{
width: 50px !important;
}
input[type="submit"] {
background: #0757a4;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 7px 15px;
color: #fff;
font-weight: 700;
font-size: 14px;
border: none;
margin-top: 10px;
cursor: pointer;
}
input[type="submit"]:hover{
background: #104374;
}
.loginBox label, .regBox label {
display: inline-block;
padding-top: 5px;
vertical-align: top;
width: 120px;
padding-right: 5px;
font-weight: normal;
}
.comments input[type="text"], .comments textarea, .loginBox input[type="text"], .loginBox textarea, .loginBox input[type="password"] {
width: 320px;
padding: 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #b6b6b6;
margin-bottom: 8px;
}
</style>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_CREATE_FAMILY_BUDGET"); ?></h1>
<p><?php echo __("LBL_FILLUP_THE_FORM_AND_CLICK"); ?> </p>
<div class="pageDivider"></div>
<?php echo $this->Form->create(null, array('class'=>'loginBox','url' => array('controller' => 'Home', 'action' => 'createFamilyExpense'))); ?>
<label for="loginTitle"><span>*</span><?php echo __("LBL_TITLE"); ?></label>
<?php echo $this->Form->input('title',array('Placeholder'=>'Expenses of January,2017','div'=>false,'title' => __("TITLE_NOT_EMPTY_MAX_CHAR"),'label'=>false, 'required'=>'false'));?>
<p id="error_title" class="formError"></p>
<p>
<label for="loginEmail"><?php echo __("LBL_EMAIL"); ?></label>
<?php echo $this->Form->input('emails',array('Placeholder'=>'youremail@gmail.com','title' => __("LBL_PLEASE_PROVIDE_EMAIL"),'label'=>false,'div'=>false,'required'=>'false'));?> <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-primary" title="<?php echo __("LBL_EXPENSECOUNT_LINK_SENT_EMAIL"); ?>">?</button>
</p>
<p id="error_emails" class="formError"></p>
<p>
<label for="loginName"><span>*</span><?php echo __("LBL_CURRENCY"); ?></label>
<?php echo $this->Form->input('currency',array('label'=>false,'div'=>false,'value'=>'USD')) ;?> (USD,AUD,EUR etc.)
</p>
<p id="error_currency" class="formError"></p>
<p>
<label><?php echo __("LBL_DESCRIPTION"); ?></label>
<?php echo $this->Form->textarea('description',array('div'=>false));?>
<?php echo $this->Form->input('captcha',array('label'=>false,'div'=>false,'type' => 'hidden','value'=>$captcha));?>
</p>
<p id="error_captcha" class="formError"></p>
<?php if(RESTRICTION_MODE_HIDE){ ?>
<div class="row">
<div class="switch-container">
<label class="switch">
<?php echo $this->Form->checkbox('restrictedMode', array('div' => false,'onchange'=>'toggleRestrictedMode(this)')); ?>
<span class="slider"></span>
</label>
<span id="restrictedLabel">Restricted Mode: OFF</span>
</div>
</div>
<?php } ?>
<p class="captcha" >
<label> </label>
<input type="submit" name="data[Expense][loginBoxSubmit]" id="loginBoxSubmit" value="<?php echo __('LBL_CREATE');?>" />
<img id="loadingGif" style="display: none;" src="<?php echo CDN_URL; ?>images/loading.gif" alt="">
</p>
<input type=hidden name="data[Expense][createDate]" id="expense_create_date" >
</form>
</div>
<script src="<?php echo CDN_URL; ?>js/expense.js?v=1.0.1"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#ExpenseTitle").val("");
$("#ExpenseEmails").val("");
$("#ExpenseDescription").val("");
$('#ExpenseCreateFamilyExpenseForm').submit(function(){
$("#error_title").text("");
$("#error_emails").text("");
$("#error_participants").text("");
$("#error_currency").text("");
$("#error_captcha").text("");
//set javascript date
document.getElementById("expense_create_date").value = getFormattedDate();
//serialize form data
var formData = $(this).serialize();
//get form action
var formUrl = $(this).attr('action');
$("#loadingGif").css("display","inline-block");
$('#error_title').text("");
$('#error_participants').text("");
$('#ExpenseCreateGroupExpenseForm').find('error_').text("");
$('[id^=error_]').text("");
$.ajax({
type: 'POST',
url: formUrl,
data: formData,
success: function(data,textStatus,xhr){
// alert(data);
if(data.trim() == "+000"){
document.getElementById("ExpenseCreateFamilyExpenseForm").submit();
} else{
data = data.trim() ;
var lineArray = data.split("#");
var totalLine = lineArray.length-1;
for(var i=0;i<totalLine;i++){
var msgArray = lineArray[i].split("|");
$('#error_'+msgArray[0]).text(msgArray[1]);
}
}
$("#loadingGif").css("display","none");
},
error: function(xhr,textStatus,error){
// alert(error);
}
});
return false;
});
});
</script>

View File

@@ -0,0 +1,211 @@
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-1.10.2.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-ui.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<style>
.switch-container{
margin-left: 140px !important;
}
.switch{
width: 50px !important;
}
input[type="submit"] {
background: #0757a4;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 7px 15px;
color: #fff;
font-weight: 700;
font-size: 14px;
border: none;
margin-top: 10px;
cursor: pointer;
}
input[type="submit"]:hover{
background: #104374;
}
.loginBox label, .regBox label {
display: inline-block;
padding-top: 5px;
vertical-align: top;
width: 120px;
padding-right: 5px;
font-weight: normal;
}
.comments input[type="text"], .comments textarea, .loginBox input[type="text"], .loginBox textarea, .loginBox input[type="password"] {
width: 320px;
padding: 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #b6b6b6;
margin-bottom: 8px;
}
</style>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_CREATE_GROUP_EXPENSE"); ?></h1>
<p><?php echo __("LBL_FILLUP_THE_FORM_AND_CLICK"); ?> </p>
<div class="pageDivider"></div>
<?php echo $this->Form->create(null, array('class'=>'loginBox','url' => array('controller' => 'Home', 'action' => 'createGroupExpense'))); ?>
<div>
<label for="loginTitle"><span>*</span><?php echo __("LBL_TITLE"); ?></label>
<?php echo $this->Form->input('title',array('Placeholder'=>'Tour to Niagara Falls','div'=>false,'title' => __("TITLE_NOT_EMPTY_MAX_CHAR"),'label'=>false, 'required'=>'false'));?>
</div>
<p id="error_title" class="formError"></p>
<div>
<label for="loginName"><span>*</span><?php echo __("LBL_YOUR_NAME"); ?></label>
<?php echo $this->Form->input('YourName',array('Placeholder'=>'Jhon','YourName' => __("LBL_PLEASE_PROVIDE_EMAIL"), 'id' => 'YourName','label'=>false,'div'=>false,'required'=>'false')); ?>
</div>
<p id="error_YourName" class="formError"></p>
<p>
<label for="loginParticipants"><?php echo __("LBL_PARTICIPANTS"); ?></label>
<?php echo $this->Form->input('participants',array('Placeholder'=>'David,Sophia,Frank,Nigel','title' => __("LBL_PLEASE_PROVIDE_COMMA_SEPARATOR_VALUE"),'label'=>false,'div'=>false,'required'=>'false'));?> <button type="button" class="btn btn-primary" data-toggle="tooltip" data-placement="right" title="<?php echo __("LBL_COMMA_SEPARATOR_NAME_OF_MEMBERS_INVOLVED"); ?>">?</button>
</p>
<p id="error_participants" class="formError"></p>
<p>
<label for="loginEmail"><?php echo __("LBL_EMAIL"); ?></label>
<?php echo $this->Form->input('emails',array('Placeholder'=>'youremail@gmail.com','title' => __("LBL_PLEASE_PROVIDE_EMAIL"),'label'=>false,'div'=>false,'required'=>'false'));?> <button type="button" class="btn btn-primary" data-toggle="tooltip" data-placement="right" title="<?php echo __("LBL_EXPENSECOUNT_LINK_SENT_EMAIL"); ?>">?</button>
</p>
<p id="error_emails" class="formError"></p>
<div>
<label for="loginName"><span>*</span><?php echo __("LBL_CURRENCY"); ?></label>
<?php echo $this->Form->input('currency',array('label'=>false,'div'=>false,'value'=>'USD')) ;?> (USD,AUD,EUR etc.)
</div>
<p id="error_currency" class="formError"></p>
<p>
<label><?php echo __("LBL_DESCRIPTION"); ?></label>
<?php echo $this->Form->textarea('description',array('div'=>false));?>
<?php echo $this->Form->input('captcha',array('label'=>false,'div'=>false,'type' => 'hidden','value'=>$captcha));?>
</p>
<p id="error_captcha" class="formError"></p>
<?php if(RESTRICTION_MODE_HIDE){ ?>
<div class="row">
<div class="switch-container">
<label class="switch">
<?php echo $this->Form->checkbox('restrictedMode', array('div' => false, 'onchange' => 'toggleRestrictedMode(this)')); ?>
<span class="slider"></span>
</label>
<span id="restrictedLabel">Restricted Mode: OFF</span>
</div>
</div>
<?php } ?>
<p class="captcha" >
<label> </label>
<input type="submit" name="data[Expense][loginBoxSubmit]" id="loginBoxSubmit" value="<?php echo __('LBL_CREATE');?>" />
<img id="loadingGif" style="display: none;" src="<?php echo CDN_URL; ?>images/loading.gif" alt="">
</p>
<input type=hidden name="data[Expense][createDate]" id="expense_create_date" >
</form>
</div>
<script src="<?php echo CDN_URL; ?>js/expense.js?v=1.0.1"></script>
<script type="text/javascript">
var nameLength = "<?php echo PARTICIPENT_NAME_LENGTH?>";
var nameErrorMessage = "<?php echo __("YOUR_NAME_NOT_EMPTY_MAX_CHAR"); ?>";
var participantNameErrorMessage = "<?php echo __("LBL_PARTICIPENT_NAME_ERROR"); ?>";
$(document).ready(function () {
$("#ExpenseTitle").val("");
$("#ExpenseYourName").val("");
$("#ExpenseParticipants").val("");
$("#ExpenseEmails").val("");
$("#ExpenseDescription").val("");
$('#ExpenseCreateGroupExpenseForm').submit(function(){
$("#error_title").text("");
$("#error_participants").text("");
$("#error_emails").text("");
$("#error_currency").text("");
$("#error_captcha").text("");
//set javascript date
document.getElementById("expense_create_date").value = getFormattedDate();
//serialize form data
var formData = $(this).serialize();
//get form action
var formUrl = $(this).attr('action');
$('#error_title').text("");
$('#error_participants').text("");
$('#ExpenseCreateGroupExpenseForm').find('error_').text("");
$('[id^=error_]').text("");
$("#loadingGif").css("display","inline-block");
$.ajax({
type: 'POST',
url: formUrl,
data: formData,
success: function(data,textStatus,xhr){
if(data.trim() == "+000"){
document.getElementById("ExpenseCreateGroupExpenseForm").submit();
} else{
data = data.trim() ;
var lineArray = data.split("#");
var totalLine = lineArray.length-1;
for(var i=0;i<totalLine;i++){
var msgArray = lineArray[i].split("|");
$('#error_'+msgArray[0]).text(msgArray[1]);
}
}
$("#loadingGif").css("display","none");
},
error: function(xhr,textStatus,error){
// alert(error);
}
});
return false;
});
});
$('#YourName').on('keyup', function(){
var forbiddenChars = /[,\|]/;
var name = $(this).val();
var length = name.length;
if (forbiddenChars.test(name)) {
$('#error_YourName').text(participantNameErrorMessage).show();
}else if(length>nameLength){
$('#error_YourName').text(nameErrorMessage).show();
} else {
$('#error_YourName').hide();
}
});
</script>

View File

@@ -0,0 +1,200 @@
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-1.10.2.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>js/jquery-ui.js" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL;?>css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo CDN_URL; ?>css/expense.css"/>
<style>
.switch-container{
margin-left: 140px !important;
}
.switch{
width: 50px !important;
}
input[type="submit"] {
background: #0757a4;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 7px 15px;
color: #fff;
font-weight: 700;
font-size: 14px;
border: none;
margin-top: 10px;
cursor: pointer;
}
input[type="submit"]:hover{
background: #104374;
}
.loginBox label, .regBox label {
display: inline-block;
padding-top: 5px;
vertical-align: top;
width: 120px;
padding-right: 5px;
font-weight: normal;
}
.comments input[type="text"], .comments textarea, .loginBox input[type="text"], .loginBox textarea, .loginBox input[type="password"] {
width: 320px;
padding: 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #b6b6b6;
margin-bottom: 8px;
}
</style>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_CREATE_MESS"); ?></h1>
<p><?php echo __("LBL_FILLUP_THE_FORM_AND_CLICK"); ?> </p>
<div class="pageDivider"></div>
<?php echo $this->Form->create(null, array('class'=>'loginBox','url' => array('controller' => 'Home', 'action' => 'createMessExpense'))); ?>
<div>
<label for="loginTitle"><span>*</span><?php echo __("LBL_TITLE"); ?></label>
<?php echo $this->Form->input('title',array('Placeholder'=>__("LBL_EXPENSE_OF").' January,2017','div'=>false,'title' => __("TITLE_NOT_EMPTY_MAX_CHAR"),'label'=>false, 'required'=>'false'));?>
</div>
<p id="error_title" class="formError"></p>
<div>
<label for="loginName"><span>*</span><?php echo __("LBL_YOUR_NAME"); ?></label>
<?php echo $this->Form->input('YourName',array('Placeholder'=>'Jhon','YourName' => __("LBL_PLEASE_PROVIDE_YOUR_NAME"), 'id'=>'YourName', 'label'=>false,'div'=>false,'required'=>'false')); ?>
</div>
<p id="error_YourName" class="formError"></p>
<p>
<label for="loginParticipants"><?php echo __("LBL_PARTICIPANTS"); ?></label>
<?php echo $this->Form->input('participants',array('Placeholder'=>'David,Sophia,Frank,Nigel','title' => __("LBL_PLEASE_PROVIDE_COMMA_SEPARATOR_VALUE"),'label'=>false,'div'=>false,'required'=>'false'));?> <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-primary" title="<?php echo __("LBL_COMMA_SEPARATOR_NAME_OF_MEMBERS_INVOLVED"); ?>">?</button>
</p>
<p id="error_participants" class="formError"></p>
<p>
<label for="loginEmail"><?php echo __("LBL_EMAIL"); ?></label>
<?php echo $this->Form->input('emails',array('Placeholder'=>'youremail@gmail.com','title' => __("LBL_PLEASE_PROVIDE_EMAIL"),'label'=>false,'div'=>false,'required'=>'false'));?> <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-primary" title="<?php echo __("LBL_EXPENSECOUNT_LINK_SENT_EMAIL"); ?>">?</button>
</p>
<p id="error_emails" class="formError"></p>
<div>
<label for="loginName"><span>*</span><?php echo __("LBL_CURRENCY"); ?></label>
<?php echo $this->Form->input('currency',array('label'=>false,'div'=>false,'value'=>'USD')) ;?> (USD,AUD,EUR etc.)
</div>
<p id="error_currency" class="formError"></p>
<p>
<label><?php echo __("LBL_DESCRIPTION"); ?></label>
<?php echo $this->Form->textarea('description',array('rows' => '5', 'cols' => '45','div'=>false));?>
<?php echo $this->Form->input('captcha',array('label'=>false,'div'=>false,'type' => 'hidden','value'=>$captcha));?>
</p>
<p id="error_captcha" class="formError"></p>
<?php if(RESTRICTION_MODE_HIDE){ ?>
<div class="row">
<div class="switch-container">
<label class="switch">
<?php echo $this->Form->checkbox('restrictedMode', array('div' => false,'onchange'=>'toggleRestrictedMode(this)')); ?>
<span class="slider"></span>
</label>
<span id="restrictedLabel">Restricted Mode: OFF</span>
</div>
</div>
<?php } ?>
<p class="captcha">
<label> </label>
<input type="submit" name="data[Expense][loginBoxSubmit]" id="loginBoxSubmit" value="<?php echo __('LBL_CREATE');?>" />
<img id="loadingGif" style="display: none;" src="<?php echo CDN_URL; ?>images/loading.gif" alt="">
</p>
<input type=hidden name="data[Expense][createDate]" id="expense_create_date" >
</form>
</div>
<script src="<?php echo CDN_URL; ?>js/expense.js?v=1.0.1"></script>
<script type="text/javascript">
var nameLength = "<?php echo PARTICIPENT_NAME_LENGTH?>";
var nameErrorMessage = "<?php echo __("YOUR_NAME_NOT_EMPTY_MAX_CHAR"); ?>";
var participantNameErrorMessage = "<?php echo __("LBL_PARTICIPENT_NAME_ERROR"); ?>";
$(document).ready(function () {
$("#ExpenseTitle").val("");
$("#ExpenseYourName").val("");
$("#ExpenseParticipants").val("");
$("#ExpenseEmails").val("");
$("#ExpenseDescription").val("");
$('#ExpenseCreateMessExpenseForm').submit(function(){
$("#error_title").text("");
$("#error_participants").text("");
$("#error_emails").text("");
$("#error_currency").text("");
$("#error_captcha").text("");
//set javascript date
document.getElementById("expense_create_date").value = getFormattedDate();
//serialize form data
var formData = $(this).serialize();
//get form action
var formUrl = $(this).attr('action');
$("#loadingGif").css("display","inline-block");
$('#error_title').text("");
$('#error_participants').text("");
$('#ExpenseCreateGroupExpenseForm').find('error_').text("");
$('[id^=error_]').text("");
$.ajax({
type: 'POST',
url: formUrl,
data: formData,
success: function(data,textStatus,xhr){
// alert(data);
if(data.trim() == "+000"){
document.getElementById("ExpenseCreateMessExpenseForm").submit();
} else{
data = data.trim() ;
var lineArray = data.split("#");
var totalLine = lineArray.length-1;
for(var i=0;i<totalLine;i++){
var msgArray = lineArray[i].split("|");
$('#error_'+msgArray[0]).text(msgArray[1]);
}
}
$("#loadingGif").css("display","none");
},
error: function(xhr,textStatus,error){
// alert(error);
}
});
return false;
});
});
$('#YourName').on('keyup', function(){
var forbiddenChars = /[,\|]/;
var name = $(this).val();
var length = name.length;
if (forbiddenChars.test(name)) {
$('#error_YourName').text(participantNameErrorMessage).show();
}else if(length>nameLength){
$('#error_YourName').text(nameErrorMessage).show();
} else {
$('#error_YourName').hide();
}
});
</script>

14
app/View/Homes/index.ctp Normal file
View File

@@ -0,0 +1,14 @@
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=179508332152";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<?php echo $this->element('maintenance'); ?>
<?php echo $this->element('slider'); ?>
<?php echo $this->element('all_expense'); ?>
<?php echo $this->element('downloads'); ?>
<?php //echo $this->element('faqs'); ?>
<?php echo $this->element('testimonials'); ?>

17
app/View/Layouts/ajax.ctp Normal file
View File

@@ -0,0 +1,17 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<?php echo $this->fetch('content'); ?>

139
app/View/Layouts/auth.ctp Normal file
View File

@@ -0,0 +1,139 @@
<?php
$lang = $this->Session->read('Config.language');
if(isset($_COOKIE['blog_lang']) && $_COOKIE['blog_lang'] != $lang) {
setcookie('blog_lang', $lang, time()+3600*24);
} else if(!isset($_COOKIE['blog_lang']) && empty($_COOKIE['blog_lang'])) {
setcookie('blog_lang', $lang, time()+3600*24);
}
?>
<!doctype html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if(IS_GOOGLE_ANALYTIC == 1){ ?>
<title>
ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE"); ?>
</title>
<meta name="description" content="<?php echo __('LBL_SITE_META_DESCRIPTION'); ?>" />
<meta name="keywords" content="<?php echo __('LBL_SITE_META_KEYWORD'); ?>" />
<?php } ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php echo CDN_URL; ?>images/favicon.ico">
<link href="<?php echo CDN_URL; ?>css/bootstrap.css" rel="stylesheet" type="text/css">
<script src="<?php echo CDN_URL; ?>js/jquery-3.3.1.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/popper.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/bootstrap.min.js"></script>
<!--<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>-->
<script src="<?php echo CDN_URL; ?>js/nav.js"></script>
<script src="<?php echo CDN_URL; ?>owlcarousel/owl.carousel.js"></script>
<link href="<?php echo CDN_URL; ?>css/style.css" rel="stylesheet" type="text/css">
<link href="<?php echo CDN_URL; ?>css/nav.css" rel="stylesheet" type="text/css">
<link href="<?php echo CDN_URL; ?>owlcarousel/assets/owl.carousel.min.css" rel="stylesheet" type="text/css">
<style type="text/css">
#cssmenu .signinText{
font-weight: bold;
}
@media screen and (max-width: 576px){
#cssmenu .signinText{
padding-right: 20px;
}
}
@media screen and (max-width: 767px){
.googlebtn img{
margin: 0px;
}
}
@media screen and (max-width: 1000px){
.auth #cssmenu {
background: none;
}
}
</style>
</head>
<body>
<!---->
<div class="header auth">
<div class="container pt-0 pb-0">
<div class="row">
<div class="col-sm-3 logo"><a href="<?php echo HTTP_SITE_URL;?>"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_MAIN_LOGO");?>" alt=""/></a>
</div>
<div class="col-sm-9 no-padding">
<div id="cssmenu">
<div class="mt-3 text-right signinText" style="font-weight:bold;">
<?php if ($this->request->controller == 'Users' && $this->request->action == 'login'): ?>Don't have an account? <a style="text-decoration:underline;" href="<?php echo HTTP_SITE_URL; ?>/users/register"><?php echo "Sign Up";?></a><?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- main body -->
<?php if ($this->request->here != $this->base.'/' && $this->request->here != $this->base.'/pages/myExpenses'): ?>
<div class="block-2" style="background:#E3E3E3;">
<div class="container">
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
</div>
</div>
<?php else: ?>
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
<?php endif; ?>
<!-- end of main body -->
<?php //echo $this->element('footer'); ?>
<?php
echo $this->Form->create("Home", array('id'=> 'languageSelectionForm','url' => array('controller' => 'Home', 'action' => 'changeLanguage')));
echo $this->Form->input('global_selected_language', array('type' => 'hidden','id'=>'global_selected_language'));
echo $this->Form->input('global_current_url', array('type' => 'hidden','id'=>'global_current_url'));
echo $this->Form->end();
?>
<script>
function changeLanguage(language){
document.getElementById("global_selected_language").value = language;
document.getElementById("global_current_url").value = "<?php echo $this->Html->url();?>";
document.forms["languageSelectionForm"].submit();
}
$(document).on('change','#languageList',function(){
var lang = $(this).val();
changeLanguage(lang);
});
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<?php if(IS_GOOGLE_ANALYTIC == 1){ ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19803228-4', 'auto');
ga('send', 'pageview');
</script>
<?php } ?>
</body>
</html>

View File

@@ -0,0 +1,303 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
//$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
//$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!--<!DOCTYPE html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<title>
ExpenseCount - The solution for managing we expense, room expense and family expense
</title>
<meta name="description" content="The solution for organizing Group Expenses, after a trip or a group activity... Fast, free and simple. Also available on Facebook, for iPhone and Android.Group Expense Manager,Group Expense Calculator, Track Expense, Manage Expense, expenditure trancking,organizing Group Expenses,Group Activity" />
<meta name="keywords" content="expense count,expcount,expcount.com,Manage we expense, room expense, family expense,Group Expense Manager,Group Expense Calculator, Track Expense, Manage Expense, expenditure trancking,organizing Group Expenses,Group Activity, account, accounting, friends, roomates, share, bill, bills, share a bill, solution, expense, expenses, group, holiday, trip, balance, clubs, balancing, balances, keep the track, skiing, expense sheet, expense report, group expense report, euro, dollar, excel, synchronize, email, money, iphone, facebook, link, links, IOU, activity, activities, ipod touch, group expenses, tally, group expense, transfer, no login, no password, organize, organizing, travel, reembursement, split, cost" />
<link rel="shortcut icon" type="image/x-icon" href="<?php echo $this->webroot;?>images/favicon.ico">
&lt;!&ndash; Bootstrap &ndash;&gt;
<?php echo $this->Html->css('bootstrap.min'); ?>
&lt;!&ndash; Main CSS&ndash;&gt;
<?php echo $this->Html->css('style'); ?>
&lt;!&ndash; HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries &ndash;&gt;
&lt;!&ndash; WARNING: Respond.js doesn't work if you view the page via file:// &ndash;&gt;
&lt;!&ndash;[if lt IE 9]>
<script src="<?php echo CDN_URL; ?>js/html5shiv.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/respond.min.js"></script>
<![endif]&ndash;&gt;
</head>
<body>
&lt;!&ndash; header section &ndash;&gt;
<div class="header">
<div class="container">
<div class="bannerBg shadow">
<div class="banner-calculator-img">
<div class="row">
<div class="col-md-4 col-sm-6">
<div class="logo-area">
<a href="<?php echo $this->webroot;?>">
<img class="img-responsive" src="<?php echo $this->webroot;?>images/<?php echo $current_lang;?>_logo.png" alt="" />
</a>
</div>
</div>
<div class="col-md-4">
<div class="percent-free">
<a >
<img src="<?php echo $this->webroot;?>images/<?php echo $current_lang;?>_100-percent-free.png" alt="" />
</a>
</div>
</div>
<div class="col-md-4">
<div class="flasg-icon-area">
&lt;!&ndash;
<a style="cursor:pointer" onClick="changeLanguage('may')" >
<img alt="" src="<?php echo $this->webroot;?>images/may-icon.png" title="Malay" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('chi')">
<img src="<?php echo $this->webroot;?>images/chi-icon.png" title="Chinese(中國)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('rus')">
<img src="<?php echo $this->webroot;?>images/rus-icon.png" title="Russian(руÑ<C692>Ñ<EFBFBD>кий)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('urd')">
<img src="<?php echo $this->webroot;?>images/urd-icon.png" title="Urdu(اردو)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('spa')">
<img src="<?php echo $this->webroot;?>images/spa-icon.png" title="Spanish(español)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('ben')">
<img src="<?php echo $this->webroot;?>images/ben-icon.png" title="Bangla(বাংলা)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('hin')">
<img src="<?php echo $this->webroot;?>images/hin-icon.png" title="Hindi(नॉट)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('jpn')">
<img src="<?php echo $this->webroot;?>images/jpn-icon.png" title="Japanese(日本人)" />
</a>
<a style="cursor:pointer" onClick="changeLanguage('eng')">
<img src="<?php echo $this->webroot;?>images/eng-icon.png" title="English" />
</a> &ndash;&gt;
</div>
</div>
</div>
<div class="row">
<div class="col-md-11">
<div class="bannerSlogun">
<p>The Solution for organizing group expenses,</p>
<p class="padding-left-225">mess expenses and family expense</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
&lt;!&ndash; /End header section &ndash;&gt;
&lt;!&ndash; start menu area &ndash;&gt;
<nav class="navbar-default menuArea">
<div class="container">
<div class="shadow">
&lt;!&ndash; Brand and toggle get grouped for better mobile display &ndash;&gt;
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#mainMenu">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
&lt;!&ndash; Collect the nav links, forms, and other content for toggling &ndash;&gt;
<div class="collapse navbar-collapse menu" id="mainMenu">
<ul>
<li class="active"><a href="<?php echo $this->webroot;?>">HOME</a>
</li>
<li><a href="#">MOBILE APPS</a>
</li>
<li>
<a href="#">Facebook Apps</a>
</li>
<li><a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'aboutus'));?>">ABOUT US</a>
</li>
<li><a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'faq'));?>">FAQ</a>
</li>
<li><a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'feedback'));?>">FEEDBACK</a>
</li>
<li><a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'termscondition'));?>">TERMS OF USE</a>
</li>
&lt;!&ndash;<li><a href="<?php echo $this->Html->url(array('controller'=>'Home','action'=>'track'));?>">EXPENSES</a>
</li> &ndash;&gt;
</ul>
</div>
&lt;!&ndash; /.navbar-collapse &ndash;&gt;
</div>
</div>
&lt;!&ndash; /.container-fluid &ndash;&gt;
</nav>-->
<!-- /End menu area -->
<!--Start Content area -->
<div class="container text-center">
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
</div>
<!--/Endbox content-->
<!-- Start footer content box area -->
<!-- <div class="footerContentBoxArea">
<div class="container">
<div class="footerContentBox shadow">
<div class="row">
<div class="col-md-3 divider">
<div class="box">
<h2>Did You Know</h2>
<p><strong>Expcount in your language</strong>
</p>
<p>Expocount is not yet available in your language? We are looking for volunteer translators. Interested?</p>
</div>
</div>
<div class="col-md-3 divider">
<div class="box">
<h2>News</h2>
<div class="news dotted">
<p><strong>12.12.2014</strong>
</p>
<p>Expocount Featured in Forbes!</p>
<p><a href="#">http://www.expcount.com</a>
</p>
</div>
<div class="news">
<p><strong>12.12.2014</strong>
</p>
<p>Expocount Featured in Forbes!</p>
<p><a href="#">http://www.expcount.com</a>
</p>
</div>
<div class="newsReadmore"><a href="#">Read more..</a>
</div>
</div>
</div>
<div class="col-md-3 divider">
<div class="box">
<h2>Follow Us</h2>
<div class="searchBox">
<input type="text" name="search" id="search" placeholder="Your E-mail" />
<input type="submit" name="searchBtn" id="searchBtn" value="OK" />
</div>
<div class="followLink">
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexpensecount.com%2F">
<img src="<?php echo $this->webroot;?>images/fb-icon.jpg" alt="" />
</a>
<a href="https://twitter.com/intent/tweet?source=http%3A%2F%2Fexpensecount.com%2F&text=The solution for managing we expense, room expense and family expense:%20http%3A%2F%2Fexpensecount.com%2F
">
<img src="<?php echo $this->webroot;?>images/twitter-icon.jpg" alt="" />
</a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fexpensecount.com%2F&title=ExpenseCount - The solution for managing we expense, room expense and family expense&summary=Manage your expenses better ever!&source=http%3A%2F%2Fexpensecount.com%2F">
<img src="<?php echo $this->webroot;?>images/in-icon.jpg" alt="" />
</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexpensecount.com%2F">
<img src="<?php echo $this->webroot;?>images/g-icon.jpg" alt="" />
</a>
</div>
</div>
</div>
<div class="col-md-3">
<div class="box">
<h2>Watch Tutorial</h2>
<div class="align-center">
<img class="img-responsive" src="<?php echo $this->webroot;?>images/video-img.jpg" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
&lt;!&ndash; /End footer content box area &ndash;&gt;
<div class="copyrightArea">
<div class="container">
<div class="shadow">
<div class="copyright">
Copy right &copy; 2015 ExpenseCount, All Rights Reserved.
</div>
</div>
</div>
</div>
-->
<?php
echo $this->Form->create("Home", array('id'=> 'languageSelectionForm','url' => array('controller' => 'Home', 'action' => 'changeLanguage')));
echo $this->Form->input('global_selected_language', array('type' => 'hidden','id'=>'global_selected_language'));
echo $this->Form->input('global_current_url', array('type' => 'hidden','id'=>'global_current_url'));
echo $this->Form->end();
?>
<script>
function changeLanguage(language){
document.getElementById("global_selected_language").value = language;
document.getElementById("global_current_url").value = "<?php echo $this->Html->url();?>";
document.forms["languageSelectionForm"].submit();
}
</script>
<?php echo $this->element('sql_dump'); ?>
<!--
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19803228-4', 'auto');
ga('send', 'pageview');
</script>
-->
</body>
</html>

View File

@@ -0,0 +1,3 @@
<?php echo $this->fetch('content'); ?>

View File

@@ -0,0 +1,59 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?>
<!DOCTYPE html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<title>
<?php echo $cakeDescription ?>:
<?php echo $title_for_layout; ?>
</title>
<?php
echo $this->Html->meta('icon');
echo $this->Html->css('cake.generic');
echo $this->fetch('meta');
echo $this->fetch('css');
echo $this->fetch('script');
?>
</head>
<body>
<div id="container">
<div id="header">
<h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
</div>
<div id="content">
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
</div>
<div id="footer">
<?php echo $this->Html->link(
$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
'http://www.cakephp.org/',
array('target' => '_blank', 'escape' => false)
);
?>
</div>
</div>
<?php echo $this->element('sql_dump'); ?>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
?>
<!DOCTYPE html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<title><?php echo $page_title; ?></title>
<?php if (Configure::read('debug') == 0): ?>
<meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/>
<?php endif; ?>
<style><!--
P { text-align:center; font:bold 1.1em sans-serif }
A { color:#444; text-decoration:none }
A:HOVER { text-decoration: underline; color:#44E }
--></style>
</head>
<body>
<p><a href="<?php echo $url; ?>"><?php echo $message; ?></a></p>
</body>
</html>

View File

@@ -0,0 +1,2 @@
<?php echo $scripts_for_layout; ?>
<script type="text/javascript"><?php echo $this->fetch('content'); ?></script>

View File

@@ -0,0 +1,78 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
//$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
//$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!DOCTYPE html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<title>
ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?>
</title>
<meta name="description" content="The solution for managing Group, Mess and Personal Expenses" />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
<link rel="shortcut icon" type="image/x-icon" href="<?php echo CDN_URL;?>images/favicon.ico">
<!-- Bootstrap -->
<link rel="stylesheet" href="<?php echo CDN_URL; ?>/css/bootstrap.min.css">
<!-- Main CSS-->
<link rel="stylesheet" href="<?php echo CDN_URL; ?>/css/style.css">
<!-- HTML5 shim and Respond.js for 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="<?php echo CDN_URL; ?>js/html5shiv.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!--Start Content area -->
<div class="container">
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
</div>
<!--/Endbox content-->
<?php echo $this->element('sql_dump'); ?>
<!--
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19803228-4', 'auto');
ga('send', 'pageview');
</script>
-->
</body>
</html>

View File

@@ -0,0 +1,75 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
//$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
//$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!DOCTYPE html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<title>
ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?>
</title>
<meta name="description" content="A complete solution for managing all your expenses. With our three products - WeXpense, MessXpense, and MyXpense — you can easily organize group, shared, and personal expenses based on your needs. Fast, simple, and free. " />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
<link rel="shortcut icon" type="image/x-icon" href="<?php echo CDN_URL; ?>images/favicon.ico">
<link href="<?php echo CDN_URL; ?>css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="<?php echo CDN_URL; ?>css/style.css" rel="stylesheet" type="text/css">
<script src="<?php echo CDN_URL; ?>js/jquery-3.3.1.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/popper.min.js"></script>
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/dataTables.bootstrap4.min.css">
<!--<script src="<?php echo CDN_URL; ?>js/bootstrap.min.js"></script>-->
<!-- Main CSS-->
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/report.css">
<!-- HTML5 shim and Respond.js for 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="<?php echo CDN_URL; ?>js/html5shiv.min.js"></script>
<script src="<?php echo CDN_URL; ?>js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
<script src="<?php echo CDN_URL; ?>js/bootstrap.min.js"></script>
<script src="<?php echo CDN_URL; ?>/js/jquery.dataTables.min.js"></script>
<script src="<?php echo CDN_URL; ?>/js/dataTables.bootstrap4.min.js"></script>
<?php if(IS_GOOGLE_ANALYTIC == 1){ ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19803228-4', 'auto');
ga('send', 'pageview');
</script>
<?php } ?>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<?php
if (!isset($channel)):
$channel = array();
endif;
if (!isset($channel['title'])):
$channel['title'] = $title_for_layout;
endif;
echo $this->Rss->document(
$this->Rss->channel(
array(), $channel, $this->fetch('content')
)
);
?>

View File

@@ -0,0 +1,232 @@
<?php
$lang = $this->Session->read('Config.language');
if(isset($_COOKIE['blog_lang']) && $_COOKIE['blog_lang'] != $lang) {
setcookie('blog_lang', $lang, time()+3600*24);
} else if(!isset($_COOKIE['blog_lang']) && empty($_COOKIE['blog_lang'])) {
setcookie('blog_lang', $lang, time()+3600*24);
}
?>
<!doctype html>
<html>
<head>
<?php echo $this->Html->charset(); ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if(IS_GOOGLE_ANALYTIC == 1){ ?>
<title>
ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE"); ?>
</title>
<meta name="description" content="<?php echo __('LBL_SITE_META_DESCRIPTION'); ?>" />
<meta name="keywords" content="<?php echo __('LBL_SITE_META_KEYWORD'); ?>" />
<?php } ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php echo CDN_URL; ?>images/favicon.ico">
<link href="<?php echo CDN_URL; ?>css/bootstrap.css" rel="stylesheet" type="text/css">
<script src="<?php echo CDN_URL; ?>js/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="<?php echo CDN_URL; ?>js/popper.min.js" type="text/javascript"></script>
<script src="<?php echo CDN_URL; ?>js/bootstrap.min.js" type="text/javascript"></script>
<!--<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>-->
<script src="<?php echo CDN_URL; ?>js/nav.js" type="text/javascript"></script>
<script src="<?php echo CDN_URL; ?>owlcarousel/owl.carousel.js" type="text/javascript"></script>
<!-- <script id="custom-reports-table" type="text/x-handlebars-template">-->
<link href="<?php echo CDN_URL; ?>css/style.css" rel="stylesheet" type="text/css">
<link href="<?php echo CDN_URL; ?>css/nav.css" rel="stylesheet" type="text/css">
<link href="<?php echo CDN_URL; ?>owlcarousel/assets/owl.carousel.min.css" rel="stylesheet" type="text/css">
<style type="text/css">
.loginBtn{
position: absolute;
text-decoration: underline;
}
@media screen and (max-width: 360px){
.loginBtn{
top: 50px;
right: 10px;
}
}
@media screen and (min-width: 361px){
.loginBtn{
top: -18px;
right: 10px;
}
}
@media screen and (min-width: 576px){
.loginBtn{
top: -18px;
right: 2px;
}
}
@media screen and (min-width: 768px){
.loginBtn{
top: -18px;
right: 2px;
}
}
@media screen and (min-width: 992px){
.loginBtn{
top: -18px;
right: 2px;
}
}
@media screen and (min-width: 1260px){
.loginBtn{
top: 15px;
right: -50px;
}
}
@media screen and (min-width: 1300px){
.loginBtn{
top: 15px;
right: -70px;
}
}
</style>
</head>
<body>
<!---->
<div class="header">
<div class="container">
<div class="row">
<div class="col-sm-3 logo"><a href="<?php echo HTTP_SITE_URL;?>"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_MAIN_LOGO");?>" alt=""/></a>
</div>
<div class="col-sm-9 no-padding">
<?php $session_user_id = ($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '' ;
if ($session_user_id != ''): ?>
<a class="loginBtn d-none d-sm-none d-md-block" href="<?php echo HTTP_SITE_URL.'/users/logout';?>"><b><?php echo __("LBL_LOGOUT");?></b></a>
<?php else: ?>
<!-- Hide Login for now -->
<a class="loginBtn d-none d-sm-none d-md-block" href="<?php echo HTTP_SITE_URL.'/users/login';?>"><b><?php echo __("LBL_LOGIN");?></b></a>
<?php endif; ?>
<div id="cssmenu">
<div> </div>
<div class="drop-nav">
<select id="languageList">
<option value="eng" <?php echo ($current_lang == 'eng') ? 'selected="selected"':''; ?>>English (EN)</option>
<option value="spa" <?php echo ($current_lang == 'spa') ? 'selected="selected"':''; ?>>Español (ES)</option>
<option value="ccn" <?php echo ($current_lang == 'ccn') ? 'selected="selected"':''; ?>>简体中文 (CN)</option>
<option value="czh" <?php echo ($current_lang == 'czh') ? 'selected="selected"':''; ?>>中国传统的 (ZH)</option>
<option value="ben" <?php echo ($current_lang == 'ben') ? 'selected="selected"':''; ?>>বাংলা (BN)</option>
<!--
<option value="fr" <?php echo ($current_lang == 'fr') ? 'selected="selected"':''; ?>>Français (FR)</option>
<option value="pl" <?php echo ($current_lang == 'pl') ? 'selected="selected"':''; ?>>Polski (PL)</option>
<option value="it" <?php echo ($current_lang == 'it') ? 'selected="selected"':''; ?>>Italiano (IT)</option
<option value="de" <?php echo ($current_lang == 'de') ? 'selected="selected"':''; ?>>Deutsch (DE)</option>
<option value="nl" <?php echo ($current_lang == 'nl') ? 'selected="selected"':''; ?>>Nederlands (NL)</option>
<option value="pt" <?php echo ($current_lang == 'pt') ? 'selected="selected"':''; ?>>Português (PT)</option>
<option value="hin" <?php echo ($current_lang == 'hin') ? 'selected="selected"':''; ?>>हिन्दी (HI)</option>
<option value="tr" <?php echo ($current_lang == 'tr') ? 'selected="selected"':''; ?>>Türkçe (TR)</option> -->
</select>
</div>
<div id="head-mobile"></div>
<div class="button"></div>
<ul>
<li ><a href="<?php echo HTTP_SITE_URL; ?>/"><?php echo __("LBL_HOME");?></a></li>
<li <?php if($this->params['action'] == "mobileApps"){ ?> class="active" <?php }?>><a href='<?php echo HTTP_SITE_URL; ?>'><?php echo __("LBL_MOBILE_APPS");?></a>
<ul>
<li><a href='<?php echo HTTP_SITE_URL;?>/pages/mobileApps/1'><?php echo __("LBL_GROUP_EXPENSE");?></a></li>
<li><a href='<?php echo HTTP_SITE_URL;?>/pages/mobileApps/2'><?php echo __("LBL_MESS_EXPENSE");?></a></li>
<li><a href='<?php echo HTTP_SITE_URL;?>/pages/mobileApps/3'><?php echo __("LBL_FAMILY_EXPENSE");?></a></li>
</ul>
</li>
<!--<?php if($this->params['controller'] != "Home" || $this->params['action'] != "index"){ ?>
<li <?php if($this->params['action'] == "facebookApp"){ ?> class="active" <?php }?>>
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'facebookApp'));?>"><?php echo __("LBL_FACEBOOK_APPS");?></a>
</li>
<?php } ?>-->
<!-- <li <?php if($this->params['action'] == "aboutus"){ ?> class="active" <?php }?>>
<a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'aboutus'));?>"><?php echo __("LBL_ABOUT_US");?></a>
</li>-->
<li <?php if($this->params['action'] == "faq"){ ?> class="active" <?php }?>>
<a href="<?php echo HTTP_SITE_URL;?>/pages/faq"><?php echo __("LBL_FAQ");?></a>
</li>
<li <?php if($this->params['action'] == "feedback"){ ?> class="active" <?php }?>>
<a href="<?php echo HTTP_SITE_URL;?>/pages/feedback"><?php echo __("LBL_FEEDBACK");?></a>
</li>
<li <?php if($this->params['action'] == "termscondition"){ ?> class="active" <?php }?>>
<a href="<?php echo HTTP_SITE_URL;?>/pages/myExpenses"><?php echo __("LBL_MY_EXPENSES");?></a>
</li>
<li <?php if($this->params['action'] == "logout" || $this->params['action'] == "login"){ ?> class="active d-sm-block d-md-none" <?php }else{ ?> class="d-sm-block d-md-none" <?php } ?>>
<?php $session_user_id = ($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '' ;
if ($session_user_id != ''): ?>
<a class="text-primary" href="<?php echo HTTP_SITE_URL.'/users/logout';?>"><b><u> <?php echo __("LBL_LOGOUT");?></u></b></a>
<?php else: ?>
<!-- Hide Login for now -->
<a class="text-primary" href="<?php echo HTTP_SITE_URL.'/users/login';?>"><b><u><?php echo __("LBL_LOGIN");?></u></b></a>
<?php endif; ?>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- main body -->
<?php if ($this->request->here != $this->base.'/' && $this->request->here != $this->base.'/pages/myExpenses'): ?>
<div class="block-2">
<div class="container">
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
</div>
</div>
<?php else: ?>
<?php echo $this->Session->flash(); ?>
<?php echo $this->fetch('content'); ?>
<?php endif; ?>
<!-- end of main body -->
<?php echo $this->element('footer'); ?>
<?php
echo $this->Form->create("Home", array('id'=> 'languageSelectionForm','url' => array('controller' => 'Home', 'action' => 'changeLanguage')));
echo $this->Form->input('global_selected_language', array('type' => 'hidden','id'=>'global_selected_language'));
echo $this->Form->input('global_current_url', array('type' => 'hidden','id'=>'global_current_url'));
echo $this->Form->end();
?>
<script>
function changeLanguage(language){
document.getElementById("global_selected_language").value = language;
document.getElementById("global_current_url").value = "<?php echo $this->Html->url();?>";
document.forms["languageSelectionForm"].submit();
}
$(document).on('change','#languageList',function(){
var lang = $(this).val();
changeLanguage(lang);
});
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<?php if(IS_GOOGLE_ANALYTIC == 1){ ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19803228-4', 'auto');
ga('send', 'pageview');
</script>
<?php } ?>
</body>
</html>

View File

@@ -0,0 +1 @@
<?php echo $this->fetch('content'); ?>

View File

@@ -0,0 +1,5 @@
<div class="bodyContent shadow">
<center> <img src="<?php echo CDN_URL;?>images/under-maintenance.jpg" alt="" />
</center>
</div>

155
app/View/Mobile/index.ctp Normal file
View File

@@ -0,0 +1,155 @@
<!DOCTYPE html>
<html>
<head>
<style>
.mybutton {
display:inline-block;
min-width: 50px;
width: 180px;
height: 40px;
padding:5px 10px;
}
</style>
</head>
<?php
$linkProtocol = "";
$showText = "Use the App";
$hrefName = "#";
$imageName = "";
if($expenseType == "1"){
$linkProtocol = "expensecountge://";
} else if($expenseType == "2"){
$linkProtocol = "expensecountme://";
} else if($expenseType == "3"){
$linkProtocol = "expensecountfe://";
}
if($device == "android"){
$showText = "Use the Android App";
$alt = "google play";
if($expenseType == "1"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
} else if($expenseType == "2"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
} else if($expenseType == "3"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
}
$imageName = CDN_URL."images/google_play.png";
} else if($device == "iphone"){
$showText = "Use the iOS App";
$alt = "iPhone App";
if($expenseType == "1"){
$hrefName = "https://itunes.apple.com/us/app/groupexpense/id1150902475?mt=8";
} else if($expenseType == "2"){
$hrefName = "https://itunes.apple.com/us/app/messexpense/id1179871989?mt=8";
} else if($expenseType == "3"){
$hrefName = "https://itunes.apple.com/us/app/familyexpense/id1193007779?mt=8";
}
$imageName = CDN_URL."images/iphone.jpg";
} else if($device == "windows"){
$showText = "Use the Windows App";
$alt = "Windows Store";
if($expenseType == "1"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
} else if($expenseType == "2"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
} else if($expenseType == "3"){
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
}
$imageName = CDN_URL."images/Windows-Store.png";
}
?>
<!-- Head -->
<head>
<title>ExpenseCount - <?php echo __("LBL_WEBSITE_TITLE");?></title>
<!-- For-Mobile-Apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="The solution for managing Group, Mess and Personal Expenses" />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //For-Mobile-Apps -->
<!-- Style --> <link rel="stylesheet" href="mobile/css/style.css" type="text/css" media="all">
<!-- Web-Fonts -->
<link href='//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
<!-- //Web-Fonts -->
</head>
<!-- //Head -->
<!-- Body -->
<body>
<div >
<div>
<div>
<br/>
<p>The Solution for organizing group, mess and personal expenses</p>
<br/> <br/>
<p> Want to open as mobile application?</p><br/>
<p><center><a href="<?php echo $linkProtocol;?>expensecount.com/<?php echo $unique_url;?>" style="padding: 10px"><input type="button" class="mybutton" name="useAndroid" value="<?php echo $showText;?>" /></a></center></p>
<br/>
<p> Want to open in mobile browser?</p><br/>
<p style="padding-top:5px"><center><a style="padding: 10px" href="<?php echo $this->webroot;?>Mobile/loadWeb/<?php echo $unique_url;?>"><input type="submit" class="mybutton" style="color:white" name="useAndroid" value="Continue on the website" /></a></center></p>
<?php if(!empty($imageName)){ ?>
<br/><br/><p> Don't have installed yet? Please tap the image below to download the app:</p><br/>
<center><a href="<?php echo $hrefName;?>"> <img src="<?php echo $imageName;?>" alt="<?php echo $alt;?>"></a></center><br/>
<?php } ?>
</div>
</div>
</div>
<!-- Custom-JavaScript-File-Links -->
<!-- Default-JavaScript --> <script src="<?php echo CDN_URL; ?>mobile/js/jquery.min.js"></script>
<!-- Tabs-JavaScript --> <script src="<?php echo CDN_URL; ?>mobile/js/tabs.js"></script>
<!-- //Custom-JavaScript-File-Links -->
</body>
<!-- //Body -->
</html>

View File

@@ -0,0 +1,97 @@
<div class="bodyContent shadow">
<h1>ABOUT US</h1>
<p>We are young entrepreneurs who have more than ten years of work experience on software field. This product we have built as our start-up and will announce few more product soon. Although, we are living in three different countries,it was very successfull teamwork as we managed to launch the product on time. </p>
<div class="pageDivider"></div>
<!-- About us section-->
<div class="row">
<div class="col-md-6">
<div class="abtContentBox">
<p><b>Name1</b></p>
<p>Analyst,Web and facebook application developer</p>
<p>Kuala Lumpur, Malaysia</p>
<p><strong>Contact Information:</strong>
</p>
<p>
<label>
<a href="mailto:Name1@expensecount.com">
<img src="<?php echo $this->webroot;?>images/about-email-icon.jpg" alt="" />
</a>
E-mail</label>: <a href="mailto:Name1@expensecount.com">Name1@expensecount.com</a>
</p>
<p>
<label>
<img src="<?php echo $this->webroot;?>images/about-fb-icon.jpg" alt="" />
Facebook</label>: <a target="blank" href="https://www.facebook.com/expensecount"> ExpenseCount page</a>
</p>
<!-- <p>
<label>
<img src="<?php echo $this->webroot;?>images/about-phone-icon.jpg" alt="" /> Phone</label>: +0088 01712 898714</p> -->
</div>
</div>
<div class="col-md-6">
<div class="abtContentBox">
<p><b>Name2</b></p>
<p>Analyst,Android and iPhone application developer</p>
<p>Somerset,New Jersy,USA</p>
<p><strong>Contact Information:</strong>
</p>
<p>
<label>
<a href="mailto:Name2@expensecount.com"> <img src="<?php echo $this->webroot;?>images/about-email-icon.jpg" alt="" /> </a> E-mail</label>: <a href="mailto:Name2@expensecount.com">Name2@expensecount.com</a></p>
<p>
<label>
<img src="<?php echo $this->webroot;?>images/about-fb-icon.jpg" alt="" />
Facebook</label>: <a target="blank" href="https://www.facebook.com/expensecount"> ExpenseCount page</a>
</p>
<!-- <p>
<label>
<img src="<?php echo $this->webroot;?>images/about-phone-icon.jpg" alt="" /> Phone</label>: +0088 01712 898714</p> -->
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="abtContentBox">
<p><b>Name3</b></p>
<p>Graphics and Web designer</p>
<p>Dhaka,Bangladesh</p>
<p><strong>Contact Information:</strong>
</p>
<p>
<label>
<a href="mailto:Name3@expensecount.com">
<img src="<?php echo $this->webroot;?>images/about-email-icon.jpg" alt="" />
</a> E-mail</label>: <a href="mailto:Name3@expensecount.com"> Name3@expensecount.com</a>
</p>
<p>
<label>
<img src="<?php echo $this->webroot;?>images/about-fb-icon.jpg" alt="" />
Facebook</label>: <a target="blank" href="https://www.facebook.com/expensecount"> ExpenseCount page</a>
</p>
<!--
<p><label><img src="<?php echo $this->webroot;?>images/about-phone-icon.jpg" alt="" /> Phone</label>: +0088 01712 898714</p>
-->
</div>
</div>
</div>
<p> For quick response,please contact our public page <a target="blank" href="https://facebook.com/ExpenseCount">Facebook</a> and <a target="blank" href="https://twitter.com/expensecount">Twitter</a> or leave a message <a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'feedback'));?>">here</a></p>
</div>

View File

@@ -0,0 +1,13 @@
<div class="bodyContent shadow">
<h1><?php echo __("LBL_ABOUT_US"); ?></h1>
<p><?php echo __("LBL_YOUNG_ENTREPRENEURS_HAVING_10_PLUS_EXPERIENCE"); ?> </p>
<div class="pageDivider"></div>
<!-- About us section-->
<p> <?php echo __("LBL_FOR_QUICK_RESPONSE_PLEASE_CONTACT"); ?></p>
</div>

View File

@@ -0,0 +1,32 @@
<div class="bodyContent shadow">
<h1>EXPENSECOUNT FOR FACEBOOK</h1>
<p>ExpenseCount Facebook application is under construction. Hopefully, it will be released soon. </p>
<div class="pageDivider"></div>
<div class="row">
<div class="col-md-5 text-center">
<img src="<?php echo $this->webroot;?>images/facebook_image.jpg" width="270" height="225" alt=""/>
</div>
<div class="col-md-7">
<h3>ExpenseCount for Facebook</h3>
The Facebook application will allow you to manage all of your expense from one place as well as to invite your Facebook friends to those expenses. <br/><br/>
<a style="cursor:pointer" onClick="showMessage()"><img src="<?php echo $this->webroot;?>images/app-fb.png" alt=""/></a>
</div>
</div>
</div>
<script>
function showMessage(){
alert("Coming soon!");
}
</script>

248
app/View/Pages/faq.ctp Normal file
View File

@@ -0,0 +1,248 @@
<style>
h2.faq {
font-size: 1.03rem;
}
</style>
<div class="bodyContent shadow">
<div id="contentbox">
<h1><?php echo __("LBL_FREQUENTLY_ASKED_QUS"); ?></h1>
<div class="row">
<div class="col-md-6">
<div id="box_faq_tt">
<h2 class="faq_categories">
<img width="65" height="65" title="Web" alt="Web" src="<?php echo CDN_URL;?>images/computer_faq.png">
</h2>
<ul class="faq">
<li>
<a href="#faq01"><?php echo __("LBL_WHAT_EXPENSECOUNT_DO"); ?></a>
</li>
<li>
<a href="#faq02"><?php echo __("LBL_HOW_SAVE_EXPENSE_URL"); ?></a>
</li>
<li>
<a href="#faq03"><?php echo __("LBL_HOW_OTHER_PARTICIPANT_KNOW"); ?></a>
</li>
<li>
<a href="#faq04"><?php echo __("LBL_IF_LINK_NOT_WORK"); ?></a>
</li>
<!-- <li>
<a href="#faq05"><?php echo __("LBL_CAN_DELETE_EXPENSECOUNT"); ?></a>
</li> -->
<li>
<a href="#faq06"><?php echo __("LBL_OTHER_PEOPLE_ACCESS_MY_EXPENSECOUNT"); ?></a>
</li>
<li>
<a href="#faq07"><?php echo __("LBL_WHAT_IS_GROUP_EXPENSE_MESS_AND_FAMILY"); ?></a>
</li>
<!-- <li>
<a href="#faq08"><?php echo __("LBL_WHAT_REIMBRUSEMENT"); ?></a>
</li>
<li>
<a href="#faq09"><?php echo __("LBL_HOW_EXPENSECOUNT_FROM_FACEBOOK_MOBILE"); ?></a>
</li> -->
<li>
<a href="#faq10"><?php echo __("LBL_HOW_CHECK_EXPENSE_MODIFICATION_HISTORY"); ?></a>
</li>
<li>
<a href="#faq11"><?php echo __("LBL_HOW_MANY_PARTICIPANTS_CAN_USE_EXPENSECOUNT"); ?></a>
</li>
</ul>
</div>
</div>
<!-- <div class="col-md-6">
<div id="box_faq_fb">
<h2 class="faq_categories">
<img width="65" height="65" title="Facebook" alt="Facebook" src="<?php echo CDN_URL;?>images/facebook_faq.png">
</h2>
<ul class="faq">
<li>
<a href="#faq51"><?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_FACEBOOK"); ?></a>
</li>
<li>
<a href="#faq52"><?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_FACEBOOK"); ?></a>
</li>
<li>
<a href="#faq53"><?php echo __("LBL_IS_EXPENSECOUNT_DATA_AVAILABLE_FOR_FB_FRIEND"); ?></a>
</li>
<li>
<a href="#faq54"><?php echo __("LBL_ADD_PARTICIPANTS_NOT_FACEBOOK_FRIEND"); ?></a>
</li>
<li>
<a href="#faq55"><?php echo __("LBL_HOW_PARTICIPANTS_NOTIFIED"); ?></a>
</li>
</ul>
</div> -->
<div id="box_faq_ip">
<h2 class="faq_categories">
<img width="65" height="65" title="iPhone and Android" alt="iPhone and Android" src="<?php echo CDN_URL;?>images/mob_faq.png">
</h2>
<ul class="faq">
<!-- <li>
<a href="#faq101"><?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_MOBILE_DEVICE"); ?></a>
</li> -->
<li>
<a href="#faq102"><?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_MOBILE"); ?></a>
</li>
<li>
<a href="#faq103"><?php echo __("LBL_CAN_USE_EXPENSECOUNT_ON_MOBILE_WITHOUT_INTERNET_CONNECTION"); ?></a>
</li>
</ul>
</div>
</div>
</div>
<h2 class="faq" id="faq01"><?php echo __('LBL_WHAT_EXPENSECOUNT_DO'); ?></h2>
<p class="line">
<?php echo __('LBL_EXPENSECOUNT_MANAGE_THREE_TYPE_EXPENSE'); ?>
</p>
<h2 class="faq" id="faq02"><?php echo __("LBL_HOW_SAVE_EXPENSE_URL"); ?></h2>
<p class="line"><?php echo __("LBL_CHECK_TRACK_ME_OPTION"); ?>
<br/>
</p>
<h2 class="faq" id="faq03"><?php echo __("LBL_HOW_OTHER_PARTICIPANT_KNOW"); ?></h2>
<p class="line"><?php echo __("LBL_EXPENSE_CREATION_SEND_EMAIL"); ?>
<br>
</p>
<h2 class="faq" id="faq04"><?php echo __("LBL_IF_LINK_NOT_WORK"); ?></h2>
<p class="line">
<?php echo __("LBL_MAKE_SURE_HAVING_CORRECT_URL_OR_EMAIL"); ?>
<br>
</p>
<!-- <h2 class="faq" id="faq05"><?php echo __("LBL_CAN_DELETE_EXPENSECOUNT"); ?></h2>
<p class="line"><?php echo __("LBL_NOT_POSSIBLE_DELETE_EXPENSECOUNT_MANUALLY"); ?>
<br>
</p> -->
<h2 class="faq" id="faq06"><?php echo __("LBL_OTHER_PEOPLE_ACCESS_MY_EXPENSECOUNT"); ?></h2>
<p class="line"><?php echo __("LBL_OTHER_PEOPLE_ACCESS_IF_KNOW_URL"); ?>
<br>
</p>
<h2 class="faq" id="faq07"><?php echo __("LBL_WHAT_IS_GROUP_EXPENSE_MESS_AND_FAMILY"); ?></h2>
<p class="line">
<?php echo __("LBL_GROUP_EXPENSE_DURING_ANY_KIND_OF_GROUP_ACTIVITY"); ?>
<br/><br/>
All the above problems can be resolved by ExpenseCount.
<br>
</p>
<!-- <h2 class="faq" id="faq08"><?php echo __("LBL_WHAT_REIMBRUSEMENT"); ?></h2>
<p class="line"> <?php echo __("LBL_REIMBRURSEMENT_EXPLANATION"); ?>
<br>
</p>
<h2 class="faq" id="faq09"><?php echo __("LBL_HOW_EXPENSECOUNT_FROM_FACEBOOK_MOBILE"); ?></h2>
<p class="line"><?php echo __("LBL_POSSIBLE_TO_USE_EXPENSECOUNT_FROM_FACEBOOK"); ?>
<br>
</p> -->
<h2 class="faq" id="faq10"><?php echo __("LBL_HOW_CHECK_EXPENSE_MODIFICATION_HISTORY"); ?></h2>
<p class="line"><?php echo __("LBL_HOW_CHECK_EXPENSE_MODIFICATION_HISTORY_ANS"); ?>
<br>
</p>
<h2 class="faq" id="faq11"><?php echo __("LBL_HOW_MANY_PARTICIPANTS_CAN_USE_EXPENSECOUNT"); ?></h2>
<p class="line"><?php echo __("LBL_HOW_MANY_PARTICIPANTS_CAN_USE_EXPENSECOUNT_ANS"); ?>
<br>
</p>
<!-- <h2 class="faq" id="faq51"><?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_FACEBOOK"); ?></h2>
<p class="line"><?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_FACEBOOK_ANS"); ?>
<br>
</p>
<h2 class="faq" id="faq52"><?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_FACEBOOK"); ?></h2>
<p class="line"> <?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_FACEBOOK_ANS"); ?>
</p>
<h2 class="faq" id="faq53"><?php echo __("LBL_IS_EXPENSECOUNT_DATA_AVAILABLE_FOR_FB_FRIEND"); ?></h2>
<p class="line"><?php echo __("LBL_IS_EXPENSECOUNT_DATA_AVAILABLE_FOR_FB_FRIEND_ANS"); ?>
<br>
</p>
<h2 class="faq" id="faq54"><?php echo __("LBL_ADD_PARTICIPANTS_NOT_FACEBOOK_FRIEND"); ?></h2>
<p class="line"><?php echo __("LBL_ADD_PARTICIPANTS_NOT_FACEBOOK_FRIEND_ANS"); ?>
<br>
</p>
<h2 class="faq" id="faq55"><?php echo __("LBL_HOW_PARTICIPANTS_NOTIFIED"); ?></h2>
<p class="line">
<?php echo __("LBL_HOW_PARTICIPANTS_NOTIFIED_ANS"); ?>
</p>
<h2 class="faq" id="faq101"> <?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_MOBILE_DEVICE"); ?></h2>
<p class="line">
<?php echo __("LBL_WHY_USE_EXPENSECOUNT_ON_MOBILE_DEVICE_ANS"); ?>
<br>
</p> -->
<h2 class="faq" id="faq102"><?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_MOBILE"); ?></h2>
<p class="line">
<?php echo __("LBL_WHAT_IMPACT_DELETE_EXPENSECOUNT_FROM_MOBILE_ANS"); ?>
<br>
</p>
<h2 class="faq" id="faq103"><?php echo __("LBL_CAN_USE_EXPENSECOUNT_ON_MOBILE_WITHOUT_INTERNET_CONNECTION"); ?></h2>
<p class="line">
<?php echo __("LBL_POSSIBLE_ACCESS_WITHOUT_INTERNET_CONNECTION"); ?>
<br>
</p>
</div>
</div>
<script src="<?php echo CDN_URL; ?>css/bootstrap.min.css"></script>
<script>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>

172
app/View/Pages/feedback.ctp Normal file
View File

@@ -0,0 +1,172 @@
<style>
input[type="submit"] {
background: #0757a4;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 7px 15px;
color: #fff;
font-weight: 700;
font-size: 14px;
border: none;
margin-top: 10px;
cursor: pointer;
}
input[type="submit"]:hover {
background: #104374;
}
.isa_success {
color: #4F8A10;
background-color: #DFF2BF;
}
.isa_error {
color: #D8000C;
background-color: #FFBABA;
}
.comments label {
display: block;
padding-bottom: 5px;
}
.comments input[type="text"],
.comments textarea,
.loginBox input[type="text"],
.loginBox textarea,
.loginBox input[type="password"] {
width: 320px;
padding: 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #b6b6b6;
margin-bottom: 8px;
}
input#btnFeedbackSubmit {
display: inline-block;
}
img#loadingGif {
display: inline-block;
}
pre.cake-error {
display: none;
}
</style>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_FEEDBACK"); ?></h1>
<p><?php echo __("LBL_POSITIVE_EXPERIENCE_REGARDING_EXPENSE_MANAGEMENT"); ?></p>
<div class="pageDivider"></div>
<h4><?php echo __("LBL_ANY_CRITICISM_SUGGESTION_IDEA_GENERAL_FEEDBACK"); ?></h4>
<p><?php echo __("LBL_WANT_TO-WRITE_SOMETHING_USE_THE_FROM_BELOW"); ?></p>
<?php if (isset($captcha_error)) { ?>
<p class="isa_error"><?php echo $captcha_error; ?></p>
<?php } ?>
<div class="pageDivider"></div>
<?php echo $this->Form->create(null, array('class' => 'comments', 'url' => array('controller' => 'pages', 'action' => 'feedback'))); ?>
<?php if (isset($error)) { ?>
<p class="isa_error"><?php echo $error; ?></p>
<?php } ?>
<?php if (isset($success)) { ?>
<p class="isa_success"><?php echo $success; ?></p>
<?php } ?>
<?php echo $this->Session->read('system.message'); ?>
<label for="feedbackemail"><?php echo __("LBL_YOUR_EMAIL"); ?></label>
<?php echo $this->Form->input('feedbackemail', array('label' => false)); ?>
<?php if (isset($email_error)) { ?>
<p class="isa_error"><?php echo $email_error; ?></p>
<?php } ?>
<label><?php echo __("LBL_COMMENT"); ?></label>
<?php echo $this->Form->textarea('comment', array('rows' => '5', 'cols' => '45')); ?><button type="button" class="btn btn-primary tooltipBtn" data-toggle="tooltip" data-placement="right" title="<?php echo __('LBL_WRITE_YOUR_FEEDBACK'); ?>">?</button>
<?php echo $this->Form->input('captcha', array('label' => false, 'div' => false, 'type' => 'hidden', 'value' => $captcha)); ?>
<?php if (isset($comment_error)) { ?>
<p class="isa_error"><?php echo $comment_error; ?></p>
<?php } ?>
<label><strong>Enter Captcha*:</strong></label>
<input type="text" name="captcha" autocomplete="off" required />
<p><img src="<?php echo HTTP_SITE_URL . '/captcha.php?rand=' . rand(); ?>" id='captcha_image'>
<!-- <p><img src="--><?php //echo HTTP_SITE_URL.'/users/captcha/'.rand();
?>
<!--" id='captcha_image'>-->
Can't read the image? <a href='javascript: refreshCaptcha();'>click here</a> to refresh
</p>
<p>
<?php if (isset($success)) { ?>
<?php } else { ?>
<?php echo $this->Form->end(array('label' => 'Submit', 'id' => 'btnFeedbackSubmit')); ?>
<?php } ?>
</p>
</div>
<!--<script src="<?php echo CDN_URL; ?>js/jquery-1.10.2.js"></script>-->
<script type="text/javascript">
$(document).ready(function() {
$(".submit").append('<img id="loadingGif" style="display: none;" src="<?php echo CDN_URL; ?>images/loading.gif" alt="">');
$("form").submit(function() {
$("#loadingGif").css("display", "inline-block");
});
$('#reload').click(function() {
var captcha = $("#captcha_image");
captcha.attr('src', captcha.attr('src') + '?' + Math.random());
return false;
});
});
</script>
<!--<script src='https://www.google.com/recaptcha/api.js?onload=onloadCallback'></script>-->
<script>
function refreshCaptcha() {
var img = document.images['captcha_image'];
img.src = img.src.substring(
0, img.src.lastIndexOf("?")
) + "?rand=" + Math.random() * 1000;
// img.src = img.src.substring(
// 0,img.src.lastIndexOf("/")
// )+"/"+Math.random()*1000;
}
/*var onloadCallback = function() {
grecaptcha.execute();
};
function setResponse(response) {
document.getElementById('captcha-response').value = response;
}*/
</script>

229
app/View/Pages/home.ctp Normal file
View File

@@ -0,0 +1,229 @@
<?php
/**
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076
*/
if (!Configure::read('debug')):
throw new NotFoundException();
endif;
App::uses('Debugger', 'Utility');
?>
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
<p>
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
</p>
<?php
if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys();
endif;
?>
<?php
if (file_exists(WWW_ROOT . 'css' . DS . 'cake.generic.css')):
?>
<p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
<?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
</p>
<?php endif; ?>
<p>
<?php
if (version_compare(PHP_VERSION, '5.2.8', '>=')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.');
echo '</span>';
endif;
?>
</p>
<p>
<?php
if (is_writable(TMP)):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your tmp directory is writable.');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your tmp directory is NOT writable.');
echo '</span>';
endif;
?>
</p>
<p>
<?php
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>'. $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php');
echo '</span>';
endif;
?>
</p>
<p>
<?php
$filePresent = null;
if (file_exists(APP . 'Config' . DS . 'database.php')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo '<br/>';
echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
echo '</span>';
endif;
?>
</p>
<?php
if (isset($filePresent)):
App::uses('ConnectionManager', 'Model');
try {
$connected = ConnectionManager::getDataSource('default');
} catch (Exception $connectionError) {
$connected = false;
$errorMsg = $connectionError->getMessage();
if (method_exists($connectionError, 'getAttributes')):
$attributes = $connectionError->getAttributes();
if (isset($errorMsg['message'])):
$errorMsg .= '<br />' . $attributes['message'];
endif;
endif;
}
?>
<p>
<?php
if ($connected && $connected->isConnected()):
echo '<span class="notice success">';
echo __d('cake_dev', 'CakePHP is able to connect to the database.');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'CakePHP is NOT able to connect to the database.');
echo '<br /><br />';
echo $errorMsg;
echo '</span>';
endif;
?>
</p>
<?php endif; ?>
<?php
App::uses('Validation', 'Utility');
if (!Validation::alphaNumeric('cakephp')):
echo '<p><span class="notice">';
echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
echo '<br/>';
echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
echo '</span></p>';
endif;
?>
<p>
<?php
if (CakePlugin::loaded('DebugKit')):
echo '<span class="notice success">';
echo __d('cake_dev', 'DebugKit plugin is present');
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'DebugKit is not installed. It will help you inspect and debug different aspects of your application.');
echo '<br/>';
echo __d('cake_dev', 'You can install it from %s', $this->Html->link('GitHub', 'https://github.com/cakephp/debug_kit'));
echo '</span>';
endif;
?>
</p>
<h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3>
<p>
<?php
echo __d('cake_dev', 'To change the content of this page, edit: %s.<br />
To change its layout, edit: %s.<br />
You can also add some CSS styles for your pages at: %s.',
'APP/View/Pages/home.ctp', 'APP/View/Layouts/default.ctp', 'APP/webroot/css');
?>
</p>
<h3><?php echo __d('cake_dev', 'Getting Started'); ?></h3>
<p>
<?php
echo $this->Html->link(
sprintf('<strong>%s</strong> %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')),
'http://book.cakephp.org/2.0/en/',
array('target' => '_blank', 'escape' => false)
);
?>
</p>
<p>
<?php
echo $this->Html->link(
__d('cake_dev', 'The 15 min Blog Tutorial'),
'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html',
array('target' => '_blank', 'escape' => false)
);
?>
</p>
<h3><?php echo __d('cake_dev', 'Official Plugins'); ?></h3>
<p>
<ul>
<li>
<?php echo $this->Html->link('DebugKit', 'https://github.com/cakephp/debug_kit') ?>:
<?php echo __d('cake_dev', 'provides a debugging toolbar and enhanced debugging tools for CakePHP applications.'); ?>
</li>
<li>
<?php echo $this->Html->link('Localized', 'https://github.com/cakephp/localized') ?>:
<?php echo __d('cake_dev', 'contains various localized validation classes and translations for specific countries'); ?>
</li>
</ul>
</p>
<h3><?php echo __d('cake_dev', 'More about CakePHP'); ?></h3>
<p>
<?php echo __d('cake_dev', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
</p>
<p>
<?php echo __d('cake_dev', 'Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.'); ?>
</p>
<ul>
<li><a href="http://cakephp.org">CakePHP</a>
<ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>
<li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>
<li><a href="http://api.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Quick API Reference'); ?></li></ul></li>
<li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li>
<li><a href="http://plugins.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Plugins'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'A comprehensive list of all CakePHP plugins created by the community'); ?></li></ul></li>
<li><a href="http://community.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Community Center'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Everything related to the CakePHP community in one place'); ?></li></ul></li>
<li><a href="https://groups.google.com/group/cake-php"><?php echo __d('cake_dev', 'CakePHP Google Group'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Community mailing list'); ?></li></ul></li>
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
<ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li>
<li><a href="https://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Find the CakePHP code on GitHub and contribute to the framework'); ?></li></ul></li>
<li><a href="https://github.com/cakephp/cakephp/issues"><?php echo __d('cake_dev', 'CakePHP Issues'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'CakePHP Issues'); ?></li></ul></li>
<li><a href="https://github.com/cakephp/cakephp/wiki#roadmaps"><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?></li></ul></li>
<li><a href="http://training.cakephp.org"><?php echo __d('cake_dev', 'Training'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Join a live session and get skilled with the framework'); ?></li></ul></li>
<li><a href="http://cakefest.org"><?php echo __d('cake_dev', 'CakeFest'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Don\'t miss our annual CakePHP conference'); ?></li></ul></li>
<li><a href="http://cakefoundation.org"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a>
<ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>
</ul>

View File

@@ -0,0 +1,379 @@
<?php
$device_type = 1;
$linkProtocol = "";
$hrefName = "";
$unique_url = "";
$groupExpenseHrefName = "";
$messExpenseHrefName = "";
$familyExpenseHrefName = "";
$imageName = "";
$alt = "";
$showText = "Use the App";
if ($expenseType == "1") {
$linkProtocol = "expensecountge://";
} else if ($expenseType == "2") {
$linkProtocol = "expensecountme://";
} else if ($expenseType == "3") {
$linkProtocol = "expensecountfe://";
}
if ($device == "android") {
$showText = "Use the Android App";
$alt = "google play";
if ($expenseType == "1") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
} else if ($expenseType == "2") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
} else if ($expenseType == "3") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
}
$device_type = 2;
$groupExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
$messExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
$familyExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
$imageName = CDN_URL . "images/google_play.png";
} else if ($device == "iphone") {
$showText = "Use the iOS App";
$alt = "iPhone App";
if ($expenseType == "1") {
$hrefName = "https://itunes.apple.com/us/app/groupexpense/id1150902475?mt=8";
} else if ($expenseType == "2") {
$hrefName = "https://itunes.apple.com/us/app/messexpense/id1179871989?mt=8";
} else if ($expenseType == "3") {
$hrefName = "https://itunes.apple.com/us/app/familyexpense/id1193007779?mt=8";
}
$imageName = CDN_URL . "images/iphone.jpg";
$groupExpenseHrefName = "https://itunes.apple.com/us/app/groupexpense/id1150902475?mt=8";
$messExpenseHrefName = "https://itunes.apple.com/us/app/messexpense/id1179871989?mt=8";
$familyExpenseHrefName = "https://itunes.apple.com/us/app/familyexpense/id1193007779?mt=8";
$device_type = 2;
} else if ($device == "windows") {
$showText = "Use the Windows App";
$alt = "Windows Store";
if ($expenseType == "1") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
} else if ($expenseType == "2") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
} else if ($expenseType == "3") {
$hrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
}
$groupExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.groupExpense";
$messExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.messExpense";
$familyExpenseHrefName = "https://play.google.com/store/apps/details?id=com.expensecount.familyExpense";
$imageName = CDN_URL . "images/Windows-Store.png";
$device_type = 2;
}
$downloadTitle = __("LBL_DOWNLOAD_WE_XPENSE_IPHONE_ANDROID");
$downloadDesc = __("LBL_CREATE_WE_XPENSE_ON_MOBILE_OFFLINE");
if ($expenseType == "1") {
$downloadTitle = __("LBL_DOWNLOAD_WE_XPENSE_IPHONE_ANDROID");
$downloadDesc = __("LBL_CREATE_WE_XPENSE_ON_MOBILE_OFFLINE");
} else if ($expenseType == "2") {
$downloadTitle = __("LBL_DOWNLOAD_ROOM_XPENSE_IPHONE_ANDROID");
$downloadDesc = __("LBL_CREATE_ROOM_XPENSE_ON_MOBILE_OFFLINE");
} else if ($expenseType == "3") {
$downloadTitle = __("LBL_DOWNLOAD_MY_XPENSE_IPHONE_ANDROID");
$downloadDesc = __("LBL_CREATE_MY_XPENSE_ON_MOBILE_OFFLINE");
}
// for pc
if ($device_type == 1) {
//$expense_type
$group_display = "block";
$mess_display = "block";
$family_display = "block";
if ($expenseType == "1") {
$group_display = "block";
$mess_display = "none";
$family_display = "none";
} else if ($expenseType == "2") {
$mess_display = "block";
$group_display = "none";
$family_display = "none";
} else if ($expenseType == "3") {
$group_display = "none";
$mess_display = "none";
$family_display = "block";
}
?>
<link rel="stylesheet" href="<?php echo CDN_URL; ?>css/bootstrap-select.css">
<script src="<?php echo CDN_URL; ?>js/jquery.min.js_1.11.3.js"></script>
<script src="<?php echo CDN_URL; ?>js/bootstrap.min_3.3.4.js"></script>
<script src="<?php echo CDN_URL; ?>js/bootstrap-select.js"></script>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_EXPENSECOUNT_ON_YOUR_MOBILE"); ?></h1>
<p><?php echo __("LBL_EXPENSECOUNT_AVAILABLE_MOBILE"); ?></p>
<div class="pageDivider"></div>
<div class="row">
<div class="col-md-5 text-center">
<img src="<?php echo CDN_URL; ?>images/mobile-apps-image.jpg" alt="" />
</div>
<div class="col-md-7">
<h3><?php echo $downloadTitle; ?></h3>
<p><?php echo $downloadDesc; ?></p>
<!-- <p> <b>Please select expense type to download mobile app: </b>
<select onChange="showDownloadIcons()" id="expense_type_select_id" class="selectpicker1" style="font-size: 0.85rem !important; padding: 5px 14px;" border=2 placeholder="Please select expense type ...">
<option value="" selected>Please select expense type ...</option>
<option value="1" <?php if ($expenseType == "1") { ?> selected <?php } ?> >Group Expense</option>
<option value="2" <?php if ($expenseType == "2") { ?> selected <?php } ?> >Mess Expense</option>
<option value="3" <?php if ($expenseType == "3") { ?> selected <?php } ?> >Family Expense</option>
</select>
</p>-->
<br />
<?= $this->Form->create(); ?>
<input type="hidden" name="expense_type">
<input type="hidden" name="app_type">
<div class="all-mobile-apps">
<div id="div_group_expense_id" class="margin-top20" style="display:<?php echo $group_display; ?>">
<div class="row single-expense">
<div class="col-sm-4 single-expense-img">
<img src="<?php echo CDN_URL; ?>images/WeXpense.png" alt="" />
<h4 class="text-center"><?php echo __("LBL_GROUP_EXPENSE"); ?></h4>
</div>
<div class="col-sm-8 text-center single-expense-link">
<a data-expense="1" data-apptype="1" onclick="submitAppInfo(this)" style="cursor:pointer">
<img src="<?php echo CDN_URL; ?><?php echo __("LBL_GOOGLE_PLAY_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" />
</a>
<a data-expense="1" data-apptype="2" onclick="submitAppInfo(this)" style="cursor:pointer">
<img src="<?php echo CDN_URL; ?><?php echo __("LBL_APP_STORE_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" />
</a>
</div>
</div>
</div>
<div id="div_mess_expense_id" class="margin-top20" style="display:<?php echo $mess_display; ?>">
<div class="row single-expense">
<div class="col-sm-4 single-expense-img">
<img src="<?php echo CDN_URL; ?>images/MessXpense.png" alt="" />
<h4 class="text-center"><?php echo __("LBL_MESS_EXPENSE"); ?></h4>
</div>
<div class="col-sm-8 text-center single-expense-link">
<a data-expense="2" data-apptype="1" onclick="submitAppInfo(this)" style="cursor:pointer"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_GOOGLE_PLAY_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" /></a>
<a data-expense="2" data-apptype="2" onclick="submitAppInfo(this)" style="cursor:pointer"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_APP_STORE_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" /></a>
</div>
</div>
</div>
<div id="div_family_expense_id" class="margin-top20" style="display:<?php echo $family_display; ?>;">
<div class="row single-expense">
<div class="col-sm-4 single-expense-img">
<img src="<?php echo CDN_URL; ?>images/MyXpense.png" alt="" />
<h4 class="text-center"><?php echo __("LBL_FAMILY_EXPENSE"); ?></h4>
</div>
<div class="col-sm-8 text-center single-expense-link">
<a data-expense="3" data-apptype="1" onclick="submitAppInfo(this)" style="cursor:pointer"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_GOOGLE_PLAY_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" /></a>
<a data-expense="3" data-apptype="2" onclick="submitAppInfo(this)" style="cursor:pointer"><img src="<?php echo CDN_URL; ?><?php echo __("LBL_APP_STORE_IMG"); ?>" alt="" style="display: inline; border-radius: 9px;" /></a>
</div>
</div>
<!-- <a style="cursor:pointer" onClick="showMessage()"><img src="<?php echo $this->webroot; ?>images/windows-store-img.jpg" alt="" style="display: inline; border-radius: 9px;"/></a> -->
</div>
</div>
<?= $this->Form->end(); ?>
</div>
</div>
</div>
<script>
function showMessage() {
alert("Coming soon!");
}
function submitAppInfo(elem) {
var expenseType = $(elem).data('expense');
var appType = $(elem).data('apptype');
$('input[name=expense_type]').val(expenseType);
$('input[name=app_type]').val(appType);
$('#CommentMobileAppsForm').submit();
}
function showDownloadIcons() {
var type = document.getElementById("expense_type_select_id").value;
document.getElementById("div_group_expense_id").style.display = "none";
document.getElementById("div_mess_expense_id").style.display = "none";
document.getElementById("div_family_expense_id").style.display = "none";
if (type == "1") {
document.getElementById("div_group_expense_id").style.display = "block";
} else if (type == "2") {
document.getElementById("div_mess_expense_id").style.display = "block";
} else if (type == "3") {
document.getElementById("div_family_expense_id").style.display = "block";
}
}
</script>
<?php } else {
if ($expenseType == "1") {
ob_start();
header('Location: ' . $groupExpenseHrefName);
ob_end_flush();
die();
} else if ($expenseType == "2") {
ob_start();
header('Location: ' . $messExpenseHrefName);
ob_end_flush();
die();
} else if ($expenseType == "3") {
ob_start();
header('Location: ' . $familyExpenseHrefName);
ob_end_flush();
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Expensecount - The Solution for organizing group, mess and personal expenses</title>
<!-- For-Mobile-Apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="The solution for managing Group, Mess and Personal Expenses" />
<meta name="keywords" content="WeXpense, We Xpense, GroupXpense, Group Xpense, ExpenseCount, expensecount.com, expcount, expense count, split expenses, split bills, SplitWise, Spid, MyXpense, My Xpense, My Expense, personal expense tracker, personal budgeting app, shared room expenses, roommates cost sharing, MessXpense, Mess Xpense, Room Xpense, mess expense app, hostel expense manager, group expense manager, shared expense, group trip organizer, travel expense tracker, friends expenses, roommates expenses, Manage Group Expense, Track Expense, expenditure tracking, group activity expenses, bill splitting app, group budgeting, expense sheet, expense report, group expense report, household expense tracker, finance organizer, daily expense manager, monthly expense tracker, We Expense Manager, We Expense Calculator, organize expenses, accounting, tally expenses, split cost app, shared budgeting, organize travel costs, manage expenses, group activities, expense sharing app" />
<script type="application/x-javascript">
addEventListener("load", function() {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!-- //For-Mobile-Apps -->
<!-- Style -->
<link rel="stylesheet" href="mobile/css/style.css" type="text/css" media="all">
<!-- Web-Fonts -->
<link href='//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
<!-- //Web-Fonts -->
</head>
<!-- //Head -->
<!-- Body -->
<body>
<div class="bodyContent shadow">
<center><a href="<?php echo $this->webroot; ?>"><img src="<?php echo CDN_URL; ?>images/mobile_en_logo.png"></a></center><br /><br />
<div class="row">
<div class="col-md-4">
<div>
<div class="box-content">
<div>
<font size="3">WeXpense</font><br />
Track, split and share group expenses
</div>
<br />
</div>
</div>
<center><a href="<?php echo $groupExpenseHrefName; ?>"> <img src="<?php echo $imageName; ?>" alt="<?php echo $alt; ?>"></a></center>
</div>
<hr />
<div class="col-md-4">
<div>
<div class="box-content">
<div>
<font size="3">MessXpense</font><br />
<p>Manage meals and expenses at shared house </p>
</div>
<br />
</div>
</div>
<center><a href="<?php echo $messExpenseHrefName; ?>"> <img src="<?php echo $imageName; ?>" alt="<?php echo $alt; ?>"></a></center>
</div>
<hr />
<div class="col-md-4">
<div>
<div class="box-content">
<div>
<font size="3">MyXpense</font><br />
<p>Organize your personal income and expenses </p>
</div>
<br />
</div>
<center><a href="<?php echo $familyExpenseHrefName; ?>"> <img src="<?php echo $imageName; ?>" alt="<?php echo $alt; ?>"></a></center><br />
</div>
</div>
</div>
</div>
<!-- Custom-JavaScript-File-Links -->
<!-- Default-JavaScript -->
<script src="mobile/js/jquery.min.js"></script>
<!-- Tabs-JavaScript -->
<script src="mobile/js/tabs.js"></script>
<!-- //Custom-JavaScript-File-Links -->
</body>
<!-- //Body -->
</html>
<?php } ?>

View File

@@ -0,0 +1,385 @@
<style>
.add-head{
padding-left: 50px!important;
}
.img-head{
width: 28px;
height: 25px
}
.btn-clipboard {
border: none !important;
padding: 0 !important;
background: none;
cursor: pointer;
outline: none;
}
.restore-icon img {
display: inline-block;
width: 1.25rem;
}
</style>
<!-- show a warning if user is not signed in -->
<?php $session_user_id = ($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '' ;
if ($session_user_id == ''): ?>
<?php echo $this->element('myexpense_warning'); ?>
<?php endif; ?>
<div class="block-2">
<div class="container">
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-10 text-center">
<div class="row">
<!--Grid column-->
<div class="col-lg-4 col-md-12 mb-4">
<div class="col-lg-12 py-2" style="border: 1px solid #ddd;text-align:center;background:#eee;">
<a href="<?php echo HTTP_SITE_URL ?>/Home/createGroupExpense"> Create Group - WeXpense </a>
</div>
</div>
<div class="col-lg-4 col-md-12 mb-4">
<div class="col-lg-12 py-2" style="border: 1px solid #ddd;text-align:center;background:#eee;">
<a href="<?php echo HTTP_SITE_URL ?>/Home/createMessExpense"> Create Mess - MessXpense</a>
</div>
</div>
<div class="col-lg-4 col-md-12 mb-4">
<div class="col-lg-12 py-2" style="border: 1px solid #ddd;text-align:center;background:#eee;">
<a href="<?php echo HTTP_SITE_URL ?>/Home/createFamilyExpense"> Create Group - MyXpense </a>
</div>
</div>
</div>
</div>
<div class="col-sm-1"></div>
</div>
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-10">
<?php echo $this->Session->read('system.message'); ?>
<?php echo $this->Session->flash(); ?>
</div>
</div>
<div class="row">
<div class="col-sm-1"></div>
<div class="col-sm-10">
<div class="my-expenses">
<ul class="nav nav-tabs" style="text-align: left">
<li class="nav-item" style="margin-left: 0 !important;">
<a class="nav-link active" data-toggle="tab" href="#expenses"><?php echo __("LBL_EXPENSE_GROUPS"); ?></a>
</li>
<?php if(isset($user_id) && $user_id>0){ ?>
<li class="nav-item" style="margin-left: 0 !important;">
<a class="nav-link" data-toggle="tab" href="#archived"><?php echo __("LBL_ARCHIVED_GROUPS"); ?></a>
</li>
<?php } ?>
</ul>
<!-- Tab content -->
<div class="tab-content" style="margin-top: 20px;">
<div id="expenses" class="tab-pane fade show active">
<table class="table table-bordered" style="margin-top: 20px;">
<thead>
<tr>
<th scope="col"><div style="display: flex;align-items: center;"><div><?php echo __("LBL_TITLE"); ?></div>
<?php
if($this->Session->read('userData.id')){
?>
<div style="margin-left: 5px;">
<a href="<?php echo HTTP_SITE_URL;?>/pages/myExpenses/refresh/1"><img width="17px" height="17px" src="<?php echo CDN_URL; ?>images/refresh.png" alt=""></a>
</div>
<?php
}
?>
</div></th>
<th scope="col" width="200"><?php echo __("LBL_CREATED_AT"); ?></th>
<th scope="col" width="100" class="add-head">
<?php if(isset($user_id) && $user_id>0){ ?>
<a href="#" title="<?php echo __('LBL_ADD_GROUP') ?>" class="js-tooltip add-icon" data-toggle="modal" data-target="#myGroupModal">
<img src="<?php echo CDN_URL; ?>images/add.png" alt=""/>
</a>
<?php } ?>
</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($my_expenses) && isset($my_expenses)) {
foreach($my_expenses as $key=>$expense) { ?>
<tr>
<td><a id="unique_url" href="<?php echo $this->webroot.$expense['unique_url']; ?>"><?php echo $expense["title"]; ?></a>
<!--<a href="javascript:;" onclick="copyFunction()">Copy Link</a>-->
</td>
<td><?php
$s = strToTime($expense['create_date']);
echo date('d M, Y', $s); ?></td>
<td width="150">
<button type="button" class="btn-clipboard clipboard-icon btn-copy js-tooltip js-copy" data-toggle="tooltip" data-placement="bottom" data-copy="http://<?php echo $_SERVER['HTTP_HOST'].$this->webroot.$expense['unique_url']; ?>" title="<?php echo __('LBL_COPY_EXPENSE_URL'); ?>"><img src="<?php echo CDN_URL; ?>images/clipboard.png" alt=""> </button>
<a onclick="return confirm('<?php echo __("LBL_ARE_YOU_SURE"); ?>')" href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'removeGroup')).'/'.$expense['unique_url'];?>" data-placement="bottom" title="Remove Expense" class="remove-icon js-tooltip"><img src="<?php echo CDN_URL; ?>images/delete.png" alt=""></a>
<a href="#" title="Send Email" class="email-icon js-tooltip js-open-expense-modal" data-placement="bottom" data-toggle="modal" data-target="#myExpenseModal" data-unique-url="<?php echo htmlspecialchars($expense['unique_url']); ?>" data-expense-title="<?php echo htmlspecialchars($expense['title']); ?>"><img src="<?php echo CDN_URL; ?>images/email.png" alt=""></a>
<?php if($this->Session->check('userData.id')){ ?>
<a onclick="return confirm('<?php echo __("LBL_ARE_YOU_SURE_ARCHIVE"); ?>')" href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'archiveGroup')).'/'.$expense['unique_url'];?>" data-placement="bottom" title="Archive Expense" class="restore-icon js-tooltip"><img src="<?php echo CDN_URL; ?>images/archive.png" alt=""></a>
<?php } ?>
</td>
</tr>
<?php }
} else {
?>
<tr>
<td colspan="3" align="center"><?php echo __("LBL_DONT_HAVE_EXPENSE"); ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php if(isset($user_id) && $user_id>0){ ?>
<div id="archived" class="tab-pane fade">
<table class="table table-bordered" style="margin-top: 20px;">
<thead>
<tr>
<th scope="col">
<div style="display: flex;align-items: center;">
<div><?php echo __("LBL_TITLE"); ?></div>
</div>
</th>
<th scope="col" width="200"><?php echo __("LBL_CREATED_AT"); ?></th>
<th scope="col" width="100" class="add-head"></th>
</tr>
</thead>
<tbody>
<?php
if (!empty($archived_expenses) && isset($archived_expenses)) {
foreach($archived_expenses as $archive) { ?>
<tr>
<td><?php echo $archive["title"]; ?></td>
<td><?php
$s = strToTime($archive['create_date']);
echo date('d M, Y', $s); ?></td>
<td width="150" style="text-align: center;">
<a onclick="return confirm('<?php echo __("LBL_ARE_YOU_SURE"); ?>')" href="<?php
echo $this->Html->url([
'controller' => 'pages',
'action' => 'removeGroup',
$archive['unique_url']
]) . '#archived';
?>" data-placement="bottom" title="<?php echo __("TITLE_REMOVE"); ?>" class="remove-icon js-tooltip"><img src="<?php echo CDN_URL; ?>images/delete.png" alt=""></a>
<?php if($this->Session->check('userData.id')){ ?>
<a onclick="return confirm('<?php echo __("LBL_ARE_YOU_SURE_RESTORE"); ?>')"
href="<?php
echo $this->Html->url([
'controller' => 'pages',
'action' => 'restoreGroup',
$archive['unique_url']
]) . '#archived';
?>"
data-placement="bottom" title="<?php echo __("TITLE_RESTORE"); ?>" class="restore-icon js-tooltip"><img src="<?php echo CDN_URL; ?>images/restore.png" alt=""></a>
<?php } ?>
</td>
</tr>
<?php }
} else {
?>
<tr>
<td colspan="3" align="center"><?php echo __("LBL_DONT_HAVE_EXPENSE"); ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- shared email modal across all expense rows -->
<div class="modal fade" id="myExpenseModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-inner">
<h5 class="modal-title" id="exampleModalLabel"><?php echo __("LBL_INVITE"); ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body">
<?php echo $this->Form->create(null, array('id'=> 'sendEmailForm')); ?>
<?php echo $this->Form->hidden('unique_url', array('label'=>false, 'id'=>'uniqueUrl')); ?>
<div class="form-group">
<label for="email"><?php echo __("LBL_INVITE_EMAIL_ADDRESS"); ?>:</label>
<?php echo $this->Form->hidden('expense_title', array('id'=>'expense_title')); ?>
<?php echo $this->Form->input('email', array('label'=>false,'email' => __('LBL_PLEASE_PROVIDE_EMAIL'),'length'=>'200px','required'=>'true','style'=>'width:240px; height:30px;', 'id'=>'email')); ?>
</div>
<?php echo $this->Form->end('Send Email', array('class'=>'myExpenseSend'));?> <img id="loadImg1" style="display:none;float: right" src="<?php echo CDN_URL;?>images/loading.gif" />
<button type="button" class="btn btn-secondary modal-footer-close" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myGroupModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-inner" style="background: #025aa5 !important;">
<h5 class="modal-title" id="exampleModalLabel"><?php echo __("LBL_ADD_GROUP"); ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body">
<?php echo $this->Form->create(false, array('id'=> 'addGroupForm',
'url' => [
'controller' => 'pages',
'action' => 'addGroup'
]
));?>
<div class="form-group">
<label for="AddURL"><?php echo __("LBL_Add_URL"); ?></label>
<?php echo $this->Form->control('unique_url', array('label'=>false,'unique_url' =>'<?php echo __("LBL_MESSAGE_UNIQUE_URL"); ?>','required' => true,'class'=>'form-control')); ?>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ><?php echo __("LBL_ADD_GROUP"); ?></button>
<?php echo $this->Form->end(); ?>
<button type="button" class="btn btn-secondary modal-footer-close" data-dismiss="modal"><?php echo __("LBL_CLOSE"); ?></button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
// Activate tab from URL hash
var hash = window.location.hash;
if (hash) {
$('.nav-link[href="' + hash + '"]').tab('show');
}
// Update URL when tab is clicked
$('.nav-link').on('click', function () {
history.replaceState(null, null, this.getAttribute('href'));
});
});
// Populate shared email modal with selected expense data
$(document).on('click', '.js-open-expense-modal', function () {
var uniqueUrl = $(this).data('unique-url');
var expenseTitle = $(this).data('expense-title');
$('#uniqueUrl').val(uniqueUrl);
$('#expense_title').val(expenseTitle);
});
$('#sendEmailForm').submit(function(){
document.getElementById('loadImg1').style.display='inline-block';
$(".submit").css("float","right");
var uniqueUrl = $("#uniqueUrl").val();
var email = $("#email").val();
var title = $("#expense_title").val();
console.log(uniqueUrl);
//document.getElementById("dvLoading").style.display = "block";
//serialize form data
var formData = {
unique_url: uniqueUrl,
email : email,
expense_title : title
};
//get form action
var formUrl = '<?php echo $this->Html->url(array("controller"=>"Expense","action"=>"sendMyExpenseEmail"));?>';
console.log(formData);
$.ajax({
type: 'POST',
url: formUrl,
data: formData,
success: function(data,textStatus,xhr){
alert("Email Sent!");
document.getElementById('loadImg1').style.display='none';
$(".submit input[type=submit]").css("opacity","0");
},
error: function(xhr,textStatus,error){
alert("Email Sending Failed!");
document.getElementById('loadImg1').style.display='none';
}
});
return false;
});
$(".modal-footer-close").on('click', function () {
$(".submit input[type=submit]").css("opacity","1");
});
function copyToClipboard(text, el) {
var copyTest = document.queryCommandSupported('copy');
var elOriginalText = el.attr('data-original-title');
if (copyTest === true) {
var copyTextArea = document.createElement("textarea");
copyTextArea.value = text;
document.body.appendChild(copyTextArea);
copyTextArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'Copied!' : 'Whoops, not copied!';
el.attr('data-original-title', msg).tooltip('show');
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(copyTextArea);
el.attr('data-original-title', elOriginalText);
} else {
// Fallback if browser doesn't support .execCommand('copy')
window.prompt("Copy to clipboard: Ctrl+C or Command+C, Enter", text);
}
}
$(document).ready(function() {
window.setTimeout(function() {
$(".alert").fadeTo(500, 0).slideUp(500, function(){
$(this).remove();
});
}, 3000);
// Initialize
// ---------------------------------------------------------------------
// Tooltips
// Requires Bootstrap 3 for functionality
$('.js-tooltip').tooltip();
// Copy to clipboard
// Grab any text in the attribute 'data-copy' and pass it to the
// copy function
$('.js-copy').click(function() {
var text = $(this).attr('data-copy');
var el = $(this);
copyToClipboard(text, el);
});
});
</script>

36
app/View/Pages/news.ctp Normal file
View File

@@ -0,0 +1,36 @@
<div class="bodyContent shadow">
<div id="contentbox">
<h1>News</h1>
<h2 class="faq" id="faq01">14.04.2015</h2>
<p class="line">Finally, we have lauched ExpenseCount beta version.</p>
<p class="line"> <a href="#">https://co.ut345233</a></p>
</div>
</div>
<script src="<?php echo CDN_URL; ?>js/bootstrap.min.js"></script>
<script>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>

View File

@@ -0,0 +1,75 @@
<div class="bodyContent shadow">
<h1><?php echo __("LBL_PRIVACY_POLICY");?></h1>
<h6 style="font-weight: normal;">Last Modified Date: 15th September, 2019</h6>
<br/>
<p>
Protecting your information is so important to us. This privacy statement describes ExpenseCounts collection, protection, disclosure and use of your information. This statement applies to all of ExpenseCounts websites and mobile apps.
<br/><br/>
By using ExpenseCount, you are agreeing to this privacy policy. If you do not agree with any terms in this statement, please do not use our service.
</p>
<div class="pageDivider"></div>
<h5>Website and Applications</h5>
<p>
ExpenseCount use tracking tools (Google analytics, firebase) for usage on the website and in mobile apps. This information is used to understand user behavior, detect problems remotely and streamline the overall user experience.
<br/><br/>
ExpenseCount also uses cookies on the website to provide a better user experience.
</p>
<div class="pageDivider"></div>
<h5>How we use data</h5>
<p>
We will not provide any of your personal information to any third party except as outlined in this policy or with your consent. The data we collect is used for the following purposes:
<br/><br/>
- To record in the databases.
<br/>
- To fulfill the functionalities of the services that intended.
<br/>
- Respond to your inquiries about our services. For example, if you or a group participant contact us for support, or as part of a random account audit, we may go into your account in administrator mode to help provide support to you or a friend.
<br/>
- To pre-fill form fields or store preferences for your convenience.
<br/>
- To share with the participants that you explicitly shared from the website or mobile apps.
<br/>
- To enforce our <b>Terms of Use</b>.
</p>
<div class="pageDivider"></div>
<h5>For legal matters</h5>
<p>We reserve the right to share or disclose your data with law enforcement, government officials, and other third parties:
<br/><br/>
- To respond to subpoenas, court order, or legal process.
<br/>
- in order to investigate, prevent, defend against, or take other action regarding violations of our <b>Terms of Use</b>, illegal activities, suspected fraud, or situations involving potential threats to the legal rights or physical safety of any person or the security of our network, sites or services.
<br/>
- as otherwise required by any applicable law.
</p>
<div class="pageDivider"></div>
<h5>Changes:</h5>
<p>
We may update this privacy policy periodically. Changes are effective immediately upon posting.
</p>
<div class="pageDivider"></div>
<h5>Contact Us:</h5>
<p>
If you have any questions or concerns regarding this privacy policy or our information handling practice please contact us:
</p>
<div class="pageDivider"></div>
<h5 style="display:inline-block">Email:</h5> <p style="display:inline-block">admin@expensecount.com</p>
<div class="pageDivider"></div>
<h5>Address:</h5>
<p>
18 Brownlow Ave, Apt 403, Toronto, M4S2K8 Canada
</p>
<div class="pageDivider"></div>
</div>

337
app/View/Pages/products.ctp Normal file
View File

@@ -0,0 +1,337 @@
<style>
input[type="submit"] {
background: #0757a4;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 7px 15px;
color: #fff;
font-weight: 700;
font-size: 14px;
border: none;
margin-top: 10px;
cursor: pointer;
}
input[type="submit"]:hover {
background: #104374;
}
.isa_success {
color: #4F8A10;
background-color: #DFF2BF;
}
.isa_error {
color: #D8000C;
background-color: #FFBABA;
}
.comments label {
display: block;
padding-bottom: 5px;
}
.comments input[type="text"], .comments textarea, .loginBox input[type="text"], .loginBox textarea, .loginBox input[type="password"] {
width: 320px;
padding: 5px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #b6b6b6;
margin-bottom: 8px;
}
input#btnFeedbackSubmit {
display: inline-block;
}
img#loadingGif {
display: inline-block;
}
pre.cake-error {
display: none;
}
</style>
<div class="bodyContent shadow">
<h1><?php echo __("LBL_PRODUCTS"); ?></h1>
<p><?php echo __("LBL_PRODUCT_PAGE_INFO"); ?></p>
<?php if(!$this->Session->read('userData.id')): ?>
<p class="text-secondary text-center py-1" style="background: #eaeaea; ">To buy Product please <a href="<?php echo HTTP_SITE_URL.'/users/login';?>"><b><?php echo __("LBL_LOGIN");?></b></a> to the system.</p>
<?php endif; ?>
<div class="pageDivider"></div>
<section class="text-center">
<!--Grid row-->
<div class="row">
<?php if (!empty($products)): ?>
<?php foreach ($products as $product): ?>
<!--Grid column-->
<div class="col-lg-4 col-md-12 mb-4">
<div class="col-lg-12 py-3" style="border: 1px solid #ddd;">
<div class="row expense<?php echo $product['expense_type'] ?>">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<h5 class="mb-3 productTitle"><?php echo $product['title'] ?></h5>
</div>
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
<img src="<?php echo CDN_URL; ?><?php echo $product['photo'] ?>"
style="max-height: 100px;max-width: 100%;"
class="img-fluid"
alt="<?php echo $product['title'] ?>">
</div>
<div class="col-lg-8 col-md-6 col-sm-6 col-xs-12 text-left pl-0">
<div class="pr-2 pl-2 py-2" style="background: #eee;">
<b>SKU: <span class="productSku"><?php echo $product['sku'] ?></span></b><br>
<h6>PRICE: <span class="priceTxt"><?php echo $product['price'] ?></span> <?php echo ($product['currency_id'] == 1) ? 'USD' : 'BDT' ?></h6>
<?php if($this->Session->read('userData.id')): ?>
<select name="os0" style="width: 100%; padding: 5px; margin-bottom: 3px;">
<?php if (!empty($productPriceArray[$product['expense_type']])) :
foreach ($productPriceArray[$product['expense_type']] as $productPrice) :
$cycleTxt = ($productPrice['payment_cycle'] == 'M') ? 'Monthly' : 'Yearly';
?>
<option value="<?= $productPrice['payment_cycle'] ?>"
data-recurring="<?= $productPrice['payment_number'] ?>"
data-ex-type="<?= $productPrice['expense_type'] ?>"><?= $cycleTxt ?> <?php echo ($product['currency_id'] == 1) ? '$' : 'BDT'; ?> <?= $productPrice['price'] ?></option>
<?php
endforeach;
endif;
?>
</select>
<form action="<?= PAYPAL_URL ?>" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?= PAYPAL_ID ?>">
<input type="hidden" name="currency_code" value="<?= PAYPAL_CURRENCY_CODE ?>">
<input type="hidden" name="item_name" value="<?php echo 't'.$product['expense_type'].'-d'.$product['id'].'-s'.$product['sku'].'-u'.(($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '').'-'.$product['title']; ?>">
<input type="hidden" name="item_number" value="<?php echo $product['sku'] ?>">
<input type="hidden" name="notify_url" value="<?= PAYPAL_NOTIFY_URL ?>">
<input type='hidden' name='cancel_return' value="<?= PAYPAL_CANCEL_RETURN_URL ?>" />
<input type='hidden' name='return' value="<?= PAYPAL_SUCCESS_RETURN_URL ?>" />
<input type='hidden' name='a3' class="prPrice" value="<?= $product['price'] ?>" />
<input type='hidden' name='p3' class="prInterval" value="<?= $product['payment_interval'] ?>" />
<input type='hidden' name='t3' class="prCycle" value="<?= $product['payment_cycle'] ?>" />
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type='hidden' name='custom' value="<?= ($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '' ?>" />
<input class="buy-btn" type="submit" value="Buy Subscription" />
</form>
<?php endif; ?>
<script>
$(document).on('change', ".expense<?php echo $product["expense_type"] ?> select[name=os0]", function() {
var payment_cycle = $(this).val();
var recurring = $('option:selected', this).attr('data-recurring');
var expense_type = $('option:selected', this).attr('data-ex-type');
fetchProduct(payment_cycle,expense_type);
});
</script>
<?php /* ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="HAFS3HUGY3ZD4">
<table>
<tr><td><input type="hidden" name="on0" value="Price">Price</td></tr>
<tr><td><select name="os0" style="width: 100%; padding: 5px; margin-bottom: 3px;">
<option value="Monthly" data-recurring="36">Monthly $0.99 USD</option>
<option value="Yearly" data-recurring="5">Yearly $9.90 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Payment Interval"></td></tr>
<tr><td><input type="hidden" name="os1" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="<?php echo 't'.$product['expense_type'].'-d'.$product['id'].'-s'.$product['sku'].'-u'.(($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '').'-'.$product['title']; ?>">
<input type="hidden" name="notify_url" value="<?php echo HTTP_SITE_URL; ?>/pages/createGroup">
<input type='hidden' name='cancel_return' value='<?php echo HTTP_SITE_URL; ?>/pages/products' />
<input type='hidden' name='return' value='<?php echo HTTP_SITE_URL; ?>/pages/createGroup' />
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="HAFS3HUGY3ZD4">
<table style="width: 100%;">
<tr><td><input type="hidden" name="on0" value="Price">Price</td></tr>
<tr><td><select name="os0" style="width: 100%; padding: 5px; margin-bottom: 3px;">
<option value="0.99" data-recurring="36">Monthly $0.99</option>
<option value="9.90" data-recurring="5">Yearly $9.90</option>
</select> </td></tr>
</table>
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="payment_interval" readonly value="">
<input type="hidden" name="item_name" value="<?php echo $product['title']; ?>"> <!-- Add Description e.g your room type Required-->
<input type="hidden" name="item_price" value="<?php echo $product['price']; ?>"> <!-- Dynamically add Total Amount Required-->
<input type="hidden" name="amount" value="<?php echo $product['price']; ?>"> <!-- Dynamically add Total Amount Required-->
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="notify_url" value="<?php echo HTTP_SITE_URL; ?>/pages/createGroup"> <!-- Please add IPN URL You can use this service to automate back-office and administrative functions, including fulfilling orders, tracking customers, and providing status and other information related to transactions. -->
<input type='hidden' name='cancel_return' value='<?php echo HTTP_SITE_URL; ?>/pages/products' /> <!-- Take customers to this URL when they cancel their checkout -->
<!-- Take customers to this URL when they finish their checkout -->
<?php if($product['expense_type'] == 1): ?>
<input type='hidden' name='return' value='<?php echo HTTP_SITE_URL; ?>/pages/createGroupExpense' />
<?php elseif($product['expense_type'] == 2): ?>
<input type='hidden' name='return' value='<?php echo HTTP_SITE_URL; ?>/pages/createMessExpense' />
<?php elseif($product['expense_type'] == 3): ?>
<input type='hidden' name='return' value='<?php echo HTTP_SITE_URL; ?>/pages/createFamilyExpense' />
<?php endif; ?>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<?php */ ?>
<?php /* ?>
<!--<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="BEWF4KXQT3HNG">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<br />-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="QN2UXYSVLLYAC">
<table>
<tr><td><input type="hidden" name="on0" value="Payment Cycle">Payment Cycle</td></tr><tr><td>
<select name="os0" style="width: 100%; padding: 5px;">
<option value="Monthly">Monthly </option>
<option value="Yearly">Yearly </option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Payment Interval">Payment Interval</td></tr>
<tr><td><input type="text" name="os1" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on2" value="How many times you want to pay">How many times you want to pay</td></tr>
<tr><td><input type="text" name="os2" maxlength="200"></td></tr>
</table><br>
<input type="hidden" name="item_name" value="<?php echo $product['title']; ?>"> <!-- Add Description e.g your room type Required-->
<input type="hidden" name="item_price" value="<?php echo $product['price']; ?>"> <!-- Dynamically add Total Amount Required-->
<input type="hidden" name="amount" value="<?php echo $product['price']; ?>"> <!-- Dynamically add Total Amount Required-->
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="<?php echo ($product['currency_id'] == 1) ? 'USD' : 'BDT'; ?>"> <!-- Update to your currency -->
<input id="invoice" type="hidden" value="" name="invoice"> <!-- Add Unique invoice for each transaction -->
<input type="hidden" name="notify_url" value="<?php echo HTTP_SITE_URL; ?>/pages/createGroupExpense"> <!-- Please add IPN URL You can use this service to automate back-office and administrative functions, including fulfilling orders, tracking customers, and providing status and other information related to transactions. -->
<input type='hidden' name='cancel_return' value='<?php echo HTTP_SITE_URL; ?>/pages/products' /> <!-- Take customers to this URL when they cancel their checkout -->
<input type='hidden' name='return' value='<?php echo HTTP_SITE_URL; ?>/pages/createGroup' /> <!-- Take customers to this URL when they finish their checkout -->
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<br><br><br>
<?php */ ?>
<?php /* ?>
<div id="paypal-button-container-<?php echo $product['sku'] ?>"></div>
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: "<?php echo $product['price'] ?>"
}
}]
});
},
onApprove: function(data, actions) {
// This function captures the funds from the transaction.
return actions.order.capture().then(function(details) {
// This function shows a transaction success message to your buyer.
var $msg = 'Transaction completed by ' + details.payer.name.given_name + " and <?php echo $product['title'] ?>" + ' has been bought for USD ' + "<?php echo $product['price'] ?>";
alert($msg);
window.location.href = redirectUrlByExpenseType(<?php echo $product['expense_type'] ?>);
});
}
}).render("#paypal-button-container-<?php echo $product['sku'] ?>");
</script>
<?php */ ?>
</div>
</div>
</div>
</div>
</div>
<!--Grid column-->
<?php endforeach; ?>
<?php endif; ?>
</div>
<!--Grid row-->
</section>
</div>
<script>
function redirectUrlByExpenseType(expense_type) {
var redirect_url = '';
switch(expense_type) {
case 1:
redirect_url = '<?php echo HTTP_SITE_URL ?>' + "/Home/createGroupExpense";
break;
case 2:
redirect_url = '<?php echo HTTP_SITE_URL ?>' + "/Home/createMessExpense";
break;
case 3:
redirect_url = '<?php echo HTTP_SITE_URL ?>' + "/Home/createFamilyExpense";
break;
default:
break;
}
return redirect_url;
}
function fetchProduct(payment_cycle,expense_type) {
$.ajax({
type: 'POST',
dataType: "json",
url: "<?=HTTP_SITE_URL ?>/pages/getProduct",
data: {
expense_type : expense_type,
payment_cycle : payment_cycle
},
success: function(result) {
console.log(result);
$('.expense' + result.expense_type + ' .productTitle').text(result.title);
$('.expense' + result.expense_type + ' .productSku').text(result.sku);
$('.expense' + result.expense_type + ' .priceTxt').text(result.price);
$('.expense' + result.expense_type + ' .prPrice').val(result.price);
$('.expense' + result.expense_type + ' .prInterval').val(result.payment_interval);
$('.expense' + result.expense_type + ' .prCycle').val(result.payment_cycle);
item_name = 't'+ result.expense_type + '-d' +result.id + '-s' + result.sku + '-u' + '<?= ($this->Session->read('userData.id')) ? $this->Session->read('userData.id') : '' ?>' + '-' + result.title;
$('.expense' + result.expense_type + ' form input[name=item_name]').val(item_name);
}
});
}
</script>

View File

@@ -0,0 +1,73 @@
<div class="bodyContent shadow">
<h1><?php echo __("LBL_TERMS_OF_USE");?></h1>
<h6 style="font-weight: normal;">Last Modified Date: 4th December, 2021</h6>
<br/>
<div class="pageDivider"></div>
<h5>Disclaimer Exclusions and Limitations</h5>
<p>
It is the user's duty to translate this page to their language and understand the defined points. We will modify our Terms of Use and <a href="<?php echo $this->webroot;?>pages/privacypolicy"><b>Privacy Policy</b></a> periodically and post the most current version on this webpage.
</p>
<div class="pageDivider"></div>
<h5>Who can use</h5>
<p>
You may use our services only if you agree to these Terms of Use and <a href="<?php echo $this->webroot;?>pages/privacypolicy">Privacy Policy</a>. You may not use our service if you are barred from receiving services under the laws of the applicable jurisdiction.
</p>
<div class="pageDivider"></div>
<h5>Description</h5>
<p>
The functionality of these services for both websites and apps are described in our website home page. You agree that the service is provided as is basis and work-in-progress, so some features of our website and apps may not work exactly as planned. We may stop offering or restrict certain services or features at any time. Please be patient with us and we will always do our best to support you.
</p>
<div class="pageDivider"></div>
<h5>Agreement Modification</h5>
<p>
You agree that we may modify this agreement at any time, effective immediately, by posting a new agreement. You agree that even if you have not personally visited the website with the new terms of this agreement, that they may have force immediately.
</p>
<div class="pageDivider"></div>
<h5>No warranties</h5>
<p>
Excludes all representations and warranties relating to this website and its contents or which is or may be provided by any affiliates or any other third party, including in relation to any inaccuracies or omissions in this website and/or the Company's literature;
</p>
<div class="pageDivider"></div>
<h5>Data</h5>
<p>
ExpenseCount is not liable for any kind of data lost, wrong calculation or financial loss in any way. Your expense URL may removed automatically from the ExpenseCount system after four months of inactivity. But, authority has the right to remove any expense if it is found as spam or not created by humans.
</p>
<div class="pageDivider"></div>
<h5>Links to this website</h5>
<p>
If you are interested to display our solution on your website, it is mandatory to get permission before implementation or using it.
</p>
<div class="pageDivider"></div>
<h5>Cookies</h5>
<p>
Like most interactive web sites this Company's website uses cookies to enable us to retrieve user details for each visit. Cookies are used in some areas of our site to enable the functionality of this area and ease of use for those people visiting. Some of our affiliate partners may also use cookies.
</p>
<div class="pageDivider"></div>
<h5>Subscriptions</h5>
<p>
ExpenseCount offer auto-renewable subscription plans. Payment will be charged to your Apple ID account upon confirmation of purchase. Your subscription renews automatically unless it is cancelled at least 24 hours before the end of the current billing period.
You can manage or cancel your subscription through your Apple ID account settings after purchase.
</p>
<div class="pageDivider"></div>
<h5>Copyright Notice</h5>
<p>
Copyright and other relevant intellectual property rights exists on all text relating to the Company's services and the full content of this website. The brand names and specific services of this Company featured on this web site are trademarked.
</p>
<div class="pageDivider"></div>
</div>

0
app/View/Scaffolds/empty Normal file
View File

View File

View File

@@ -0,0 +1,107 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height:40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn, .signinbtn, .orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL;?>/users/forgotpass" style="border:1px solid #ccc;background:#FFFFFF;" method="POST" autocomplete="off">
<div style="padding:15px;">
<h5>Forgot Password ?</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="email" class="label"><b>Enter your Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" name="email" autocomplete="off" required>
<div class="clearfix">
<button type="submit" class="signinbtn btn-primary" name="forgotpassbtn">Send</button>
</div>
</div>
</form>
</div>

242
app/View/Users/login.ctp Normal file
View File

@@ -0,0 +1,242 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<?php
if($verification){
?>
<div class="alert alert-info" role="alert">
<strong> Your account is verified successfully! Please login to access!</strong>
</div>
<?php
}
?>
<form action="<?php echo HTTP_SITE_URL; ?>/users/login" style="border:1px solid #ccc;background:#FFFFFF;" method="POST">
<div style="padding:15px;">
<h5>Sign in to your Account</h5>
<span class="inner"></span>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="email" class="label"><b>Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" name="email" required>
<label for="psw" class="label"><b>Password*</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<label for="remme" class="label"><input type="checkbox" id="remme" name="remme" value="on"> <strong>Remember Me</strong></label>
<div class="clearfix">
<button type="submit" class="signinbtn btn-primary" name="singinbtn">Sign In</button>
<div>
<span class="orspan"> OR </span>
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="<?php echo GOOGLE_CLIENT_ID; ?>.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
<!-- data-onfailure="onSignInFailure"-->
<!-- <a href="#" onclick="signOut();">Sign out</a>-->
<!--button type="button" class="googlebtn"><img style="display:inline-block;height:25px;" src="<?= HTTP_SITE_URL . '/images/g.png' ?>" /><span style="mt-1"> Sign in with Google</span></button-->
</div>
</div>
<br>
<p>
<a style="font-weight:bold;color:dodgerblue" href="<?php echo HTTP_SITE_URL; ?>/users/forgotpass">Forgot Password?</a>
<a style="font-weight:bold;color:dodgerblue;float: right;" href="<?php echo HTTP_SITE_URL; ?>/users/register">Are not Registered?</a>
</p>
</div>
</form>
</div>
<script>
function onSignIn(googleUser) {
if (document.referrer && document.referrer != "") {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {});
auth2.disconnect();
}
// Useful data for your client-side scripts:
var profile = googleUser.getBasicProfile();
var email = profile.getEmail();
var name = profile.getName();
var profileId = profile.getId();
// console.log("ID: " + profile.getId()); // Don't send this directly to your server!
// console.log('Full Name: ' + profile.getName());
// console.log('Given Name: ' + profile.getGivenName());
// console.log('Family Name: ' + profile.getFamilyName());
// console.log("Image URL: " + profile.getImageUrl());
// console.log("Email: " + profile.getEmail());
// The ID token you need to pass to your backend:
var id_token = googleUser.getAuthResponse().id_token;
// console.log("ID Token: " + id_token);
$.ajax({
type: 'POST',
crossDomain: true,
dataType: "json",
url: "https://"+window.location.host+"/users/login",
//url: "<?= HTTP_SITE_URL ?>/users/googlesignin",
// Always include an `X-Requested-With` header in every AJAX request,
// to protect against CSRF attacks.
// headers: {
// 'X-Requested-With': 'XMLHttpRequest'
// },
// contentType: 'application/octet-stream; charset=utf-8',
//
success: function(result) {
// Handle or verify the server response.
if (result == true)
window.location.href = "<?= HTTP_SITE_URL ?>/pages/myExpenses";
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
// $( ".inner" ).append("");
$(".inner").html(XMLHttpRequest.responseText);
//alert(XMLHttpRequest.responseText);
},
// processData: false,
data: {
profileId: profileId,
name: name,
email: email,
id_token: id_token
}
});
}
function onSignInFailure() {
//window.location.href = "<? //=HTTP_SITE_URL ?>///users/login";
//window.location.href = "<? //=HTTP_SITE_URL ?>///pages/products";
}
/*function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {
console.log('User signed out.');
});
}*/
</script>

View File

@@ -0,0 +1,19 @@
<style>
* {box-sizing: border-box}
.contentDiv{
margin:0px auto;border:1px solid #ccc;background:#FFFFFF;
}
.innerDiv{
padding: 50px;font-size: 18px;font-weight: bold;
}
.lginLink{
text-decoration: underline;
}
</style>
<div class="col-md-8 contentDiv">
<div class="innerDiv">
<p>A varification link has been sent to your email account. Please check your inbox and follow the instruction to <a class="lginLink" href="<?php echo HTTP_SITE_URL.'/users/login';?>">LogIn</a></p>
<br><br><br>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<style>
* {box-sizing: border-box}
.contentDiv{
margin:0px auto;border:1px solid #ccc;background:#FFFFFF;
}
.innerDiv{
padding: 50px;font-size: 18px;font-weight: bold;
}
.lginLink{
text-decoration: underline;
}
</style>
<div class="col-md-8 contentDiv">
<div class="innerDiv">
<p>A password reset link has been sent to your email account. Please check your inbox and follow the instruction.</p>
<br><br><br>
</div>
</div>

155
app/View/Users/register.ctp Normal file
View File

@@ -0,0 +1,155 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 45%;
}
.signupbtn {
float: left;
width: 40%;
}
.orspan {
float: left;
text-align: center;
width: 15%;
font-weight: bold;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 991px) {
.googlebtn, .signupbtn, .orspan {
width: 100%;
}
.orspan {
margin-top: 0px !important;
}
}
@media screen and (min-width: 991px) and (max-width: 1200px) {
.googlebtn{
width: 60%;
}
.signupbtn{
width: 30%;
}
.orspan {
width: 10%;
}
}
</style>
<!--<link href='https://fonts.googleapis.com/css?family=Lato:300,400,500' rel='stylesheet' type='text/css'>-->
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL;?>/users/register" style="border:1px solid #ccc;background:#FFFFFF;" method="POST">
<div style="padding:15px;">
<h5>Sign Up with Email</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="name" class="label"><b>Name* </b></label>
<input type="text" placeholder="Enter a Name" id="Name" name="name" autocomplete="off" required />
<label for="email" class="label"><b>Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" id="Email" name="email" autocomplete="off" required />
<label for="password" class="label"><b>Password*</b></label>
<input type="password" placeholder="Enter Password" id="Password" name="password" autocomplete="off" required />
<label><strong>Enter Captcha*:</strong></label><br />
<input type="text" name="captcha" autocomplete="off" required />
<p><img src="<?php echo HTTP_SITE_URL.'/captcha.php?rand='.rand(); ?>" id='captcha_image'>
<!-- <p><img src="--><?php //echo HTTP_SITE_URL.'/users/captcha/'.rand(); ?><!--" id='captcha_image'>-->
Can't read the image? <a href='javascript: refreshCaptcha();'>click here</a> to refresh</p>
<div class="clearfix">
<button type="submit" class="signupbtn btn-primary" name="singupbtn">Sign Up</button>
<!--span class="orspan mt-4"> OR </span>
<button type="button" class="googlebtn"><img style="display:inline-block;height:25px;" src="<?=HTTP_SITE_URL.'/images/g.png'?>" /><span style="mt-1"> Sign in with Google</span></button-->
</div>
<br><p>By signing up you agree to the <a href="<?php echo HTTP_SITE_URL;?>/pages/termscondition" style="color:dodgerblue">Terms of Service</a> and <a href="<?php echo HTTP_SITE_URL;?>/pages/privacypolicy" style="color:dodgerblue">Privacy Policy</a>.</p>
</div>
</form>
</div>
<script>
//Refresh Captcha
function refreshCaptcha(){
var img = document.images['captcha_image'];
img.src = img.src.substring(
0,img.src.lastIndexOf("?")
)+"?rand="+Math.random()*1000;
// img.src = img.src.substring(
// 0,img.src.lastIndexOf("/")
// )+"/"+Math.random()*1000;
}
// refreshCaptcha();
</script>

View File

@@ -0,0 +1,125 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<div style="border:1px solid #ccc;background:#FFFFFF;padding: 15px;">
<?php
echo $status_desc;
?>
</div>
</div>

View File

@@ -0,0 +1,125 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height:40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn, .signinbtn, .orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL.'/users/resetpass/'.$resetPassToken;?>" style="border:1px solid #ccc;background:#FFFFFF;" method="POST" autocomplete="off">
<div style="padding:15px;">
<h5>Set New Password</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="psw" class="label"><b>New Password*</b></label>
<input type="password" placeholder="Enter New Password" name="password" autocomplete="off" required>
<label for="psw" class="label"><b>Confirm Password*</b></label>
<input type="password" placeholder="Enter Confirm Password" name="confirm_password" autocomplete="off" required>
<label class="confirmPassMsg" style="color:red;font-weight: bold;"></label>
<div class="clearfix">
<button type="submit" class="signinbtn" name="resetpassbtn">Submit</button>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$(document).ready(function () {
$(document).on('keyup','input[name=confirm_password]',function () {
$pass = $('input[name=password]').val();
$confirm_pass = $('input[name=confirm_password]').val();
if($pass != $confirm_pass){
$('.confirmPassMsg').text("Password doesn't match");
} else {
$('.confirmPassMsg').text('');
}
});
});
</script>

123
app/View/Users/verify.ctp Normal file
View File

@@ -0,0 +1,123 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<div style="border:1px solid #ccc;background:#FFFFFF;padding: 15px;">
This link is not valid anymore!
</div>
</div>