Example #1
0
 function ProcessCart()
 {
     global $session;
     $_POST = sanitize_custom($_POST);
     $result = $session->ProcessMyCart($session->userid, $_POST['paypal_donation']);
     Logger("ProcessCart PayNow \n" . serialize($result) . "session lender bid success \n" . $_SESSION['lender_bid_success1']);
     if (isset($_SESSION['lender_bid_success1']) && isset($result['borrowerid'])) {
         $loanprurl = getLoanprofileUrl($result['borrowerid'], $result['loanid']);
         header("Location: {$loanprurl}#e5");
     } else {
         if (isset($_SESSION['gifcardids'])) {
             header("Location: index.php?p=28");
         } else {
             header("Location: index.php?p=75");
         }
     }
     exit;
 }
Example #2
0
                    echo $lang['profile']['disp_text'];
                    ?>
");
												//return false;
											});
										});
									</script>
					<?php 
                    $senderid1 = $commns['senderid'];
                    $receiverid = $commns['receiverid'];
                    $level = $database->getUserLevelbyid($senderid1);
                    if ($level == BORROWER_LEVEL || $level == PARTNER_LEVEL) {
                        $name12 = $database->getNameById($senderid1);
                        $borrower_loanid = $database->getCurrentLoanid($senderid1);
                        if (!empty($borrower_loanid)) {
                            $prurl = getLoanprofileUrl($senderid1, $borrower_loanid);
                        } else {
                            $prurl = getUserProfileUrl($senderid1);
                        }
                    } else {
                        $sublevel = $database->getUserSublevelById($senderid1);
                        $prurl = getUserProfileUrl($senderid1);
                        if ($sublevel == LENDER_GROUP_LEVEL) {
                            $name12 = $database->getNameById($senderid1);
                        } else {
                            $name12 = $database->getUserNameById($senderid1);
                        }
                    }
                    ?>
									<table class="zebra-striped">
										<tbody>
Example #3
0
     } else {
         if ($assigned_status == 2) {
             $status = $lang['invite']['app_decline'];
         } elseif ($assigned_status == 0) {
             $status = $lang['invite']['app_pend_review'];
         } else {
             $status = $lang['invite']['no_loan'];
         }
     }
     $brwrrepayratep = '';
     $bonus = 0;
     $deletable = true;
 } else {
     $loan_status = $database->getBorrowerCurrentLoanStatus($borrowerid);
     $ontime = $database->isAllInstallmentOnTime($borrowerid, $last_loan['loanid']);
     $loanurl = getLoanprofileUrl($borrowerid, $last_loan['loanid']);
     $name = "<a href='{$loanurl}'>" . trim($bdetail['FirstName'] . " " . $bdetail['LastName']) . "</a>";
     if ($loan_status == 0) {
         $status = $lang['invite']['fundraising_loan'];
     } elseif ($ontime['missedInst'] == 0 && ($loan_status = 2)) {
         $status = $lang['invite']['ontime_loan'];
     } elseif ($ontime['missedInst'] != 0 && ($loan_status = 2)) {
         $status = $lang['invite']['due_loan'];
     }
     $brwrrepayrate = $session->RepaymentRate($borrowerid);
     $brwrrepayratep = number_format($brwrrepayrate) . "%";
     if ($brwrrepayrate >= $minrepayrate) {
         $bonus = $binvitecredit['loanamt_limit'];
     } else {
         $bonus = 0;
     }
Example #4
0
function RedirectLoanprofileurl()
{
    $RequestUrl = $_SERVER['REQUEST_URI'];
    $parsedurl = parse_url($RequestUrl);
    if (isset($parsedurl['query'])) {
        parse_str($parsedurl['query'], $qryStr);
        if (isset($qryStr['p']) && $qryStr['p'] == 14 && isset($qryStr['u']) && isset($qryStr['l'])) {
            $loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);
            unset($qryStr['p']);
            unset($qryStr['u']);
            unset($qryStr['l']);
            $qrystrToAppnd = http_build_query($qryStr);
            if (!empty($qrystrToAppnd)) {
                $urlMovedto = SITE_URL . $loanprurl . "?" . $qrystrToAppnd;
            } else {
                $urlMovedto = SITE_URL . $loanprurl;
            }
            header("HTTP/1.1 301 Moved Permanently");
            header("Location: " . $urlMovedto);
            exit;
        }
    }
}
<?php

set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname(__FILE__)));
include "library/session.php";
global $database, $session, $form;
$loans = $database->getLoansAboutToExpire();
foreach ($loans as $loan) {
    $totalBid = $database->getTotalBid($loan['borrowerid'], $loan['loanid']);
    $stillNeed = $loan['reqdamt'] - $totalBid;
    if ($stillNeed <= 0) {
        continue;
    }
    $database->updateAboutToExpireNotification($loan['loanid']);
    $borrower = $database->getBorrowerDetails($loan['borrowerid']);
    $params = array('amount_still_needed' => number_format($stillNeed, 2, '.', ','), 'borrower_name' => ucwords(strtolower($borrower['FirstName'] . ' ' . $borrower['LastName'])), 'borrower_link' => SITE_URL . getLoanprofileUrl($loan['borrowerid'], $loan['loanid']), 'invite_link' => SITE_URL . 'invite', 'country' => ucwords(strtolower($database->mysetCountry($borrower['Country']))), 'summary' => $loan['tr_summary'] ?: $loan['summary'], 'image_src' => $database->getProfileImage($loan['borrowerid'], 300));
    $bids = $database->getLoanBids($loan['borrowerid'], $loan['loanid']);
    foreach ($bids as $bid) {
        if ($bid['loan_about_to_expire_notify']) {
            $params['recent_bid_date'] = date('F j', $bid['biddate']);
            $session->sendLoanAboutToExpireMail($bid['email'], $params);
        }
    }
}
Example #6
0
 USD<br /><strong><?php 
        echo $lang['loaners']['interest'];
        ?>
:</strong> <?php 
        echo number_format($interest, 2, '.', ',');
        ?>
%</p>
                                <div style="overflow:hidden;">
                                    <p><?php 
        echo $statusbar;
        ?>
</p>
                                </div>
                                
                                <?php 
        $loanprurl = getLoanprofileUrl($userid, $loanid);
        ?>
                                <p><a class="btn lender_read_more" id="lend_button" href="<?php 
        echo $loanprurl;
        ?>
"><?php 
        echo $statusMsg;
        ?>
</a></p>
                        </div><!-- /listing-info -->
                </div><!-- /browse-listing -->
                <div class="divider">&nbsp;</div>
<?php 
    }
}
?>
Example #7
0
                    echo $lang['profile']['disp_text'];
                    ?>
");
												//return false;
											});
										});
									</script>
					<?php 
                    $senderid1 = $commns['senderid'];
                    $imagesrc_comment = $database->getProfileImage($senderid1);
                    $receiverid = $commns['receiverid'];
                    $level = $database->getUserLevelbyid($senderid1);
                    if ($level == BORROWER_LEVEL) {
                        $name12 = $database->getNameById($senderid1);
                        if (!empty($senderloanid)) {
                            $sender_url = getLoanprofileUrl($senderid1, $senderloanid);
                        } else {
                            $sender_url = '';
                        }
                    } else {
                        $sender_url = getUserProfileUrl($senderid1);
                        $karma_score = number_format($database->getKarmaScore($senderid1));
                        $karma_tooltip = $lang['profile']['karma_tooltip'];
                        $sublevel = $database->getUserSublevelById($senderid1);
                        if ($sublevel == LENDER_GROUP_LEVEL) {
                            $name12 = $database->getNameById($senderid1);
                        } else {
                            $name12 = $database->getUserNameById($senderid1);
                        }
                    }
                    ?>
Example #8
0
 function ProcessCart()
 {
     global $session;
     $_POST = sanitize_custom($_POST);
     if (empty($session->userid)) {
         // We cannot use $_SESSION['value_array'] because $form is global
         // and the login form is already using it
         $_SESSION['lending_cart_values'] = $_POST;
         $_SESSION['lending_cart_login'] = true;
         $_SESSION['login_alert'] = "Please log in to continue.";
         header("Location: index.php?p=116");
         exit;
     }
     $result = $session->ProcessMyCart($session->userid, $_POST['paypal_donation']);
     Logger("ProcessCart PayNow \n" . serialize($result) . "session lender bid success \n" . $_SESSION['lender_bid_success1']);
     if (isset($_SESSION['lender_bid_success1']) && isset($result['borrowerid'])) {
         $loanprurl = getLoanprofileUrl($result['borrowerid'], $result['loanid']);
         header("Location: {$loanprurl}#e5");
     } else {
         if (isset($_SESSION['gifcardids'])) {
             header("Location: index.php?p=28");
         } else {
             header("Location: index.php?p=75");
         }
     }
     exit;
 }
Example #9
0
        <?php 
        unset($_SESSION['flash']);
        ?>
    <?php 
    }
    ?>

    <a href="/outbid_report.php">Back</a>
    
    <h1>
        <?php 
    echo $borrower['FirstName'] . ' ' . $borrower['LastName'];
    ?>
 -
        <a href="<?php 
    echo getLoanprofileUrl($loan['borrowerid'], $loan['loanid']);
    ?>
" target="_blank"><?php 
    echo $loan['loanid'];
    ?>
</a>
    </h1>

    <form action="" method="post">
        <input type="hidden" name="fix"/>
        <input type="submit" value="Fix"/>
    </form>
    
    <?php 
    foreach ($tables as $table => $rows) {
        ?>
Example #10
0
          
          <div style="margin-top:10px">

            <?php 
    if ($session->userlevel == PARTNER_LEVEL) {
        echo "<a href='index.php?p=7'>" . $lang['loginform']['pending_app'] . "</a>";
    } else {
        if ($session->userlevel == LENDER_LEVEL) {
            echo "<a href='index.php?p=75'>Lending Cart</a>";
            echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
            echo "<a href='index.php?p=119'>My Account</a>";
        } else {
            if ($session->userlevel == BORROWER_LEVEL) {
                $lastLoan = $database->getLastloan($session->userid);
                if (isset($lastLoan['loanid'])) {
                    $loanprurl = getLoanprofileUrl($session->userid, $lastLoan['loanid']);
                    echo "<a href='{$loanprurl}'>" . $lang['loginform']['my_profile'] . "</a>";
                }
            }
        }
    }
    ?>

            &nbsp;&nbsp;&nbsp;&nbsp; <a href='process.php'><?php 
    echo $lang['loginform']['Logout'];
    ?>
</a>

          </div> <!-- /margin-top:10px -->
        </div> <!-- /welcome -->
  <?php 
Example #11
0
if ($session->userlevel == LENDER_LEVEL) {
    $isMyLender = $database->isMyLender($id, $session->userid);
}
$b_name = $database->getNameById($ud);
$loanDetail = $database->getLastloan($ud);
?>
<div id="maincontainer" style="padding-top:10px;">
	<div style="float:left">
		<h3 class="subhead" style="border-bottom:none;margin-bottom:0px"><?php 
echo $lang['profile']['endorsement'] . " " . $b_name;
?>
</h3>
	</div>
	<div style="float:right">
		<?php 
$loanprurl = getLoanprofileUrl($ud, $loanDetail['loanid']);
?>
		<a href="<?php 
echo $loanprurl;
?>
"><?php 
echo $lang['profile']['back_loan_page'];
?>
</a>
	</div>
	<div style="clear:both;border-top:1px solid #DFDCDC;height:20px;">&nbsp;</div>
	<div id='feedback_desc'>
<?php 
$feeddetail = $database->getEndorserRecived($ud);
if (!empty($feeddetail)) {
    $i = 0;
Example #12
0
        $table_class = 'table_sorter_co' . $key;
        $Co_section .= "<table style='margin-top: -14px;margin-bottom:0px;' class='detail {$table_class}'>";
        $Co_section .= "<thead><th style='padding:1px;border-bottom:none;border-bottom-width:0px;'><h4>" . $Organizers['name'] . "</h4></th></thead><tbody>";
        if (count($Organizers['co']) > 0) {
            foreach ($Organizers['co'] as $key1 => $co_org) {
                $Co_section .= "<tr>";
                $co_lname = $co_org['lname'];
                if (empty($co_lname)) {
                    $co_lname = end(explode(" ", $co_org['name']));
                }
                $Co_section .= "<td><span style='display:none'>{$co_lname}</span>";
                $userdetail = $database->getUserById($co_org['user_id']);
                if ($userdetail['userlevel'] == BORROWER_LEVEL) {
                    $loanid = $database->getCurrentLoanid($co_org['user_id']);
                    if (!empty($loanid)) {
                        $url = getLoanprofileUrl($co_org['user_id'], $loanid);
                    } else {
                        $url = getUserProfileUrl($co_org['user_id']);
                    }
                } else {
                    $url = getUserProfileUrl($co_org['user_id']);
                }
                $Co_section .= "<a href={$url} target='_blank'> " . $co_org['name'] . "</a>";
                $Co_section .= "</td>";
                $Co_section .= "</tr>";
            }
        }
        $Co_section .= "</tbody></table>";
    }
}
$params['co_organizers_by_cntry'] = $Co_section;
Example #13
0
                                    } else {
                                        if ($activestate == 8) {
                                            $active_state = "LOAN All";
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if ($database->isLenderForgivenThisLoan($loan_id, $session->userid)) {
                $active_state = "Forgiven";
            }
            $loanprurl = getLoanprofileUrl($borrowerid, $loan_id);
            $loanprurl1 = getLoanprofileUrl($session->userid, $loan_id);
            echo '<tr>';
            echo "<td style='text-align:left;padding-left:10px'><a href='{$loanprurl}'>{$firstname} {$lastname}</a> &nbsp;&nbsp; {$city},&nbsp; {$country}</td>";
            echo "<td style='text-align:left;padding-left:10px'>" . number_format($amountgiven, 2, '.', ',') . "</td>";
            echo "<td style='text-align:left;padding-left:10px'><a href='{$loanprurl1}'>{$active_state}</a></td>";
            echo '</tr>';
            $amtgivenTotal += $amountgiven;
        }
        ?>
				</tbody>
				<tfoot>
					<tr>
						<td><strong><?php 
        echo $lang['profile']['tot_amt_lnt'];
        ?>
</strong></td>
Example #14
0
			<a href="microfinance/lend.html">Add another loan</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="microfinance/gift-cards.html">Add a gift card - Your friend chooses a loan!</a>
		</div>
		<table class='zebra-striped' style="width:75%; padding-top:20px;">
			<tbody>
				<?php 
        foreach ($Lendingcart as $cart) {
            if ($cart['type'] == 1) {
                $bname = ucwords(strtolower(trim($cart['FirstName'] . " " . $cart['LastName'])));
                $borrowerid = $cart['borrowerid'];
                $loan_id = $cart['loanid'];
                $city = ucwords(strtolower($cart['City']));
                $country = $database->mysetCountry($cart['Country']);
                $amtincart += $cart['bidamt'];
                $donateamt += $cart['bidamt'];
                $loanprurl = getLoanprofileUrl($cart['borrowerid'], $cart['loanid']);
                $imagesrc = $database->getProfileImage($borrowerid);
                ?>
					<tr style="height:55px">
						<td style="width:60px"><a href='<?php 
                echo $loanprurl;
                ?>
'><img width="60px;" class="my_port_img" src="<?php 
                echo $imagesrc;
                ?>
"/></a></td>
						<td style="width:300px">Loan for <a href='<?php 
                echo $loanprurl;
                ?>
'><?php 
                echo $bname;
Example #15
0
     }
 }
 if ($result == 0) {
     $_SESSION['value_array'] = $_POST;
     $_SESSION['error_array'] = $form->getErrorArray();
     if (!empty($_POST['MessType'])) {
         header("Location: ../index.php?p=12&u={$receiverid}&fdb=2");
     } else {
         header("Location: ../index.php?p=12&u={$senderid}#e4");
     }
 }
 if ($result == 1) {
     $divid = $_POST['divid'];
     $ld = $_REQUEST['loanid'];
     if (!empty($_REQUEST['MessType'])) {
         $loanprurl = getLoanprofileUrl($receiverid, $ld);
         if ($_REQUEST['return'] == "down") {
             header("Location: ../index.php?p=12&u={$receiverid}");
         } else {
             if ($_REQUEST['return'] == "up") {
                 header("Location: ../index.php?p=12&u={$receiverid}&fdb=1");
             } else {
                 if ($_REQUEST['return'] == "down1") {
                     header("Location: ../{$loanprurl}");
                 } else {
                     header("Location: ../index.php?p=12&u={$receiverid}");
                 }
             }
         }
     } else {
         echo "error";
Example #16
0
                        if ($rows['txn_sub_type'] == LOAN_BID_EXPIRED) {
                            $rows['txn_desc'] = "Credit back: expired loan bid for " . $borrower_name;
                        } else {
                            if ($rows['txn_sub_type'] == LOAN_BID_CANCELED) {
                                $rows['txn_desc'] = "Credit back: cancelled loan for " . $borrower_name;
                            } else {
                                $rows['txn_desc'] = "Credit back from bid on loan for " . $borrower_name;
                            }
                        }
                    }
                }
            }
            if ($rows['loanid'] == 0) {
                echo "<td>" . $rows['txn_desc'] . "</td>";
            } else {
                $loanprofileurl = getLoanprofileUrl($borrower_id, $rows['loanid']);
                echo "<td><a href='" . $loanprofileurl . "'>" . $rows['txn_desc'] . "</a></td>";
            }
            echo "<td>" . number_format(truncate_num(round($rows['amount'], 4), 2), 2, ".", ",") . "</td>";
            echo "<td>" . number_format(truncate_num(round($rows['bal'], 4), 2), 2, ".", ",") . "</td>";
            echo "</tr>";
        }
        ?>
				</tbody>
			</table>
			<div id="pageNavPosition" align='center'></div>
			<div align='right'><font color='blue'>Total Records  <?php 
        echo $count;
        ?>
</font></div>
			<p>&nbsp;</p>
Example #17
0
 function sharebox_off()
 {
     global $session;
     $_POST = sanitize_custom($_POST);
     $loanprurl = getLoanprofileUrl($_POST['borrowerid'], $_POST['loanid']);
     $result = $session->sharebox_off($_POST['lenderid'], $_POST['sharebox_off']);
     if ($result) {
         echo $loanprurl;
     } else {
         echo $loanprurl;
     }
 }
Example #18
0
								<div style="border-bottom:1px solid #cccccc;padding-bottom:5px">
									<div style="margin-left: 14px; float: left;">
										<strong><?php 
            echo $feedbackText;
            ?>
</strong>
										&nbsp;&nbsp;&nbsp;<?php 
            echo date("M d, Y", $commns['editDate']);
            ?>
									</div>
									<div style="float: left; margin-left: 105px;">
										<?php 
            if (!empty($commns['loneid'])) {
                ?>
										<?php 
                $loanprurl = getLoanprofileUrl($commns['userid'], $commns['loneid']);
                ?>
											<a href='<?php 
                echo $loanprurl;
                ?>
'><u>View Loan Profile</u></a>
										<?php 
            } else {
                echo "<strong>Pre Zidisha Loan</strong>";
            }
            ?>
									</div>
									<div style="float: right; margin-right: 15px;">
								<?php 
            if ($isMyLender || $displyall) {
                echo "<a id='showReply" . $i . "' href='javascript:void(0)' style='color: #000000;text-decoration:underline'>Reply</a>";
Example #19
0
				<div class="row">
					<div>
						<table class="detail">
							<tbody>
								<tr>
									<td><strong><?php 
                    echo $lang['loanapplic']['loan_applic'];
                    ?>
</strong></td>
								</tr>
								<tr height='10px'><td></td></tr>
								<tr>
									<td>
								<?php 
                    $lastLoan = $database->getLastloan($userid);
                    $loanprurl = getLoanprofileUrl($userid, $lastLoan['loanid']);
                    $params['loanprofilelink'] = SITE_URL . $loanprurl;
                    $confirmMsg1 = $session->formMessage($lang['loanapplic']['confirm_msg1'], $params);
                    echo $confirmMsg1;
                    ?>
&nbsp;
										<?php 
                    echo $deadline . "&nbsp;";
                    echo $lang['loanapplic']['confirm_msg2'];
                    ?>
 
										
									</td>
								</tr>
							</tbody>
						</table>
Example #20
0
 public function sendRepaidGainMailToLender($loanid, $lemail, $borrowerid, $bname, $loan_amt, $repaid_amt, $gain_amt, $gain_percent, $purpose)
 {
     global $database, $form;
     $templet = "editables/email/hero.html";
     require "editables/mailtext.php";
     $loanprurl = getLoanprofileUrl($borrowerid, $loanid);
     $params['link'] = SITE_URL . $loanprurl;
     $params['bname'] = ucwords(strtolower($bname));
     $params['purpose'] = ucwords(strtolower($purpose));
     $params['loan_amt'] = number_format(truncate_num(round($loan_amt, 4), 2), 2, ".", ",");
     $params['repaid_amt'] = number_format(truncate_num(round($repaid_amt, 4), 2), 2, ".", ",");
     $params['gain_amt'] = number_format(truncate_num(round($gain_amt, 4), 2), 2, ".", ",");
     $params['gain_percent'] = number_format($gain_percent);
     $Subject = $this->formMessage($lang['mailtext']['RepaidGain-subject'], $params);
     $message = $this->formMessage($lang['mailtext']['RepaidGain-msg'], $params);
     $reply = $this->mailSendingHtml($From, '', $lemail, $Subject, '', $message, 0, $templet, 3, REPAID_GAIN_TAG, $params);
 }
Example #21
0
 } elseif (empty($currentloan)) {
     $firstLoanValue = $database->getAdminSetting('firstLoanValue');
     $value = $firstLoanValue;
     $params['firstLoanVal'] = '1.' . " " . $tmpcurr . ' ' . number_format(convertToNative($firstLoanValue, $rate), 0, ".", ",");
 }
 $flag = 0;
 if (!empty($currentloan) && $currentloan != $islastrepaid) {
     $res = $database->getTotalPayment($userid, $currentloan);
     if ($res['amttotal'] == 0) {
         //  this case is when loan is funded and schedule is not yet generatetd
         $repaidPercent = 0;
     } else {
         $repaidPercent = $res['paidtotal'] / $res['amttotal'] * 100;
     }
     $repaidPercent = round($repaidPercent, 0);
     $loanprofileurl = getLoanprofileUrl($userid, $currentloan);
     $loanDisburseDate = date('M d, Y', $database->getLoanDisburseDate($currentloan));
     $loanData = $database->getLoanApplic($currentloan);
     if ($loanCounts == 0) {
         $k = 1;
         if ($loanstatus == LOAN_FUNDED || $loanstatus == LOAN_OPEN) {
             $params['firstLoanVal'] = '1.' . " " . $tmpcurr . " " . number_format($loanData['AmountGot'], 0, ".", ",") . " (<a href='{$loanprofileurl}' >Fundraising Loan</a>)";
         } else {
             $params['firstLoanVal'] = '1.' . " " . $tmpcurr . " " . number_format($loanData['AmountGot'], 0, ".", ",") . " (<a href='{$loanprofileurl}' >Disbursed " . $loanDisburseDate . ", " . $repaidPercent . "% repaid</a>)";
         }
     } else {
         if ($loanstatus == LOAN_FUNDED || $loanstatus == LOAN_OPEN) {
             $params['nxtLoanvalue'] .= "<br/>" . $k . ". " . $tmpcurr . " " . number_format($loanData['AmountGot'], 0, ".", ",") . " (<a href='{$loanprofileurl}' >Fundraising Loan</a>)";
         } else {
             $params['nxtLoanvalue'] .= "<br/>" . $k . ". " . $tmpcurr . " " . number_format($loanData['AmountGot'], 0, ".", ",") . " (<a href='{$loanprofileurl}' >Disbursed " . $loanDisburseDate . ", " . $repaidPercent . "% repaid</a>)";
         }
    ?>
</td>
                        <td><?php 
    echo date("d/m/Y", $loan['min_duedate']);
    ?>
</td>
                        <td><?php 
    echo date("d/m/Y", $loan['max_duedate']);
    ?>
</td>
                        <td><?php 
    echo $loan['active'];
    ?>
</td>
                        <td><a target="_blank" href="<?php 
    echo "http://zidisha.org/" . getLoanprofileUrl($loan['borrowerid'], $loan['loanid']);
    ?>
">link</a></td>
                    </tr>
                <?php 
}
?>
    
            </table>

        </td>
        <td style="vertical-align: top;padding-left:100px">
            <h1>Lenders</h1>
            <h2>Count: <?php 
echo count($lenders);
?>
Example #23
0
    $borrowers[$i]['name'] = ucwords(strtolower($borrower['FirstName'] . ' ' . $borrower['LastName']));
    $borrowers[$i]['url'] = getLoanprofileUrl($borrower['userid'], $loan['loanid']);
    $borrowers[$i]['profile_image'] = $database->getProfileImage($borrower['userid'], 150);
    $borrowers[$i]['country'] = $database->mysetCountry($borrower['Country']);
    $borrowers[$i]['summary'] = '';
    if ($loan && in_array($loan['active'], array(LOAN_OPEN, LOAN_ACTIVE, LOAN_FUNDED))) {
        $borrowers[$i]['summary'] = $loan['tr_summary'] ?: $loan['summary'];
    }
}
$funded_borrowers = array();
$notify_preferences = '';
$funded_borrowers = $database->getFundedBorrowers($session->userid);
foreach ($funded_borrowers as $i => $borrower) {
    $loan = $database->getLastloan($borrower['userid']);
    $funded_borrowers[$i]['name'] = ucwords(strtolower($borrower['FirstName'] . ' ' . $borrower['LastName']));
    $funded_borrowers[$i]['url'] = getLoanprofileUrl($borrower['userid'], $loan['loanid']);
    $funded_borrowers[$i]['profile_image'] = $database->getProfileImage($borrower['userid'], 150);
    $funded_borrowers[$i]['country'] = $database->mysetCountry($borrower['Country']);
    $funded_borrowers[$i]['summary'] = '';
    if ($loan && in_array($loan['active'], array(LOAN_OPEN, LOAN_ACTIVE, LOAN_FUNDED))) {
        $funded_borrowers[$i]['summary'] = $loan['tr_summary'] ?: $loan['summary'];
    }
}
$_notify_preferences = array();
if ($lender['loan_app_notify']) {
    $_notify_preferences[] = 'application';
}
if ($lender['emailcomment']) {
    $_notify_preferences[] = 'comment';
}
$notify_preferences = 'post a new loan ' . implode($_notify_preferences, ' or ');
Example #24
0
 public function SendLoanConfirmMailToBorrower($brwid, $loanid)
 {
     global $database, $form;
     $templet = "editables/email/simplemail.html";
     require "editables/mailtext.php";
     $language = '';
     if (isset($_GET["language"])) {
         $language = $_GET["language"];
     }
     $path = getEditablePath('mailtext.php', $language);
     require "editables/" . $path;
     $From = SERVICE_EMAIL_ADDR;
     $reply_to = SERVICE_EMAIL_ADDR;
     $Subject = $lang['mailtext']['LoanPosted-subject'];
     if (!empty($brwid)) {
         $Detail = $database->getEmailB($brwid);
         $bemail = $Detail['email'];
         $To = "";
         $params['deadline'] = $database->getAdminSetting('deadline');
         $params['bname'] = ucwords(strtolower($Detail['name']));
         $params['editlink'] = SITE_URL . 'index.php?p=44';
         $params['loanappliclink'] = SITE_URL . 'index.php?p=44';
         $loanprurl = getLoanprofileUrl($brwid, $loanid);
         $params['link'] = SITE_URL . $loanprurl;
         $message = $this->formMessage($lang['mailtext']['LoanPosted-body'], $params);
         $reply = $this->mailSendingHtml($From, $To, $bemail, $Subject, '', $message, 0, $templet, 3);
     }
 }
Example #25
0
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 $mentor_id = $database->getBorrowerVolnteerMentor($session->userid);
 $volunteer_mentor = $database->getUserById($mentor_id);
 if ($volunteer_mentor['userlevel'] == BORROWER_LEVEL) {
     $loanid = $database->getCurrentLoanid($mentor_id);
     if (empty($loanid)) {
         $link = getUserProfileUrl($mentor_id);
     } else {
         $link = getLoanprofileUrl($mentor_id, $loanid);
     }
 } else {
     $link = getUserProfileUrl($mentor_id);
 }
 if ($eligible == 1) {
     echo '<br/><br/><br/>' . $lang['loginform']['invite_frnd_msg1'] . ' ' . number_format($brwr_repayrate) . '%.  ' . $lang['loginform']['invite_frnd_msg2'] . '<br/><br/><div align="center"><a href="index.php?p=96"><input type="button" value="' . $lang['loginform']['invite_now'] . '" class="btn"></a></div>';
 }
 echo '<br/><br/><br/>';
 if (!empty($volunteer_mentor['TelMobile'])) {
     echo "<br/><br/><br/>" . $lang['loginform']['volunteer_text'] . "<a style='cursor:pointer' class='tt'><img src='library/tooltips/help.png' style='border-style: none;' /><span class='tooltip'><span class='top'></span><span class='middle'>" . $lang['loginform']['tooltip_volunteer'] . "</span><span class='bottom'></span></span></a>";
     echo "<br/><br/><strong>" . $lang['loginform']['name'] . "</strong>&nbsp;&nbsp;&nbsp;<a href='{$link}'>" . $volunteer_mentor['name'] . "</a>";
     echo "<br/><strong>" . $lang['loginform']['Telephone'] . "</strong>&nbsp;&nbsp;&nbsp;<a href='{$link}'>" . $volunteer_mentor['TelMobile'] . "</a>";
 }
 echo '<br/><br/><br/>';
 echo "<br/><br/><br/><br/>" . $lang['loginform']['do_more'] . "<br/><br/><br/>";
Example #26
0
 }
 //added by Julia 7-11-2013
 if ($is_staff == 1) {
     $volunteer_name .= " (Staff)";
 } elseif (!$volunteer_status && !empty($volunteer_name)) {
     $volunteer_name .= " (Deactivated)";
 }
 $repaydate = '';
 $repaydateTosort = '';
 if (!empty($dynamic_data['expected_repaydate'])) {
     $repaydateTosort = $dynamic_data['expected_repaydate'];
     $repaydate = date("m/d/Y", $dynamic_data['expected_repaydate']);
 }
 //added by Julia 31-10-2013
 $prurl = getUserProfileUrl($userid);
 $loanprurl = getLoanprofileUrl($row['userid'], $row['loanid']);
 //Logger("REPAYRPT-VIEW: : refOfficial_name=". $refname ."refOfficial_number". $refname . "id = ".$userid. "logged in user: "******"notes: ".$note."repayment date: ".$repaydate."\n");
 $bname = "<a href='" . $loanprurl . "'>" . $row['bname'] . "</a>";
 $duedatetosort = $row['duedate'];
 $duedate = date("M j, Y", $row['duedate']);
 $dueamt = $row['totamt'] - $row['totpaidamt'];
 $dueamtUSD = $dueamt / $rate;
 // Added by mohit 12-11-13
 if ($dynamic_data['mentor_id'] == $assignedto && !empty($assignedto)) {
     if ($dueamt <= 0 || $dueamtUSD < $repayThresholdAmt && $row['totpaidamt'] > 0) {
         continue;
     }
     $dueamtTot += $dueamt;
     $dueamtToSort = number_format(round_local($dueamt), 2, '.', '');
     $dueamt = number_format(round_local($dueamt), 0, '.', ',');
     $bcity = $row['city'];
Example #27
0
						<a style='cursor:pointer' class='tt'><img src='library/tooltips/help.png' style='border-style: none;' /><span class='tooltip'><span class='top'></span><span class='middle'><?php 
    echo $lang['loanstatn']['tooltip_mentor'];
    ?>
</span><span class='bottom'></span></span></a><br/>
				</div><br/>
				<div id="viewassignedmember_desc" style="display:none;" class="span16">
					<table class="detail">
						<tbody>
						<?php 
    foreach ($vm_member_details as $vm_member_detail) {
        $member_loanid = $database->getCurrentLoanid($vm_member_detail['userid']);
        if (empty($member_loanid)) {
            $member_url = getUserProfileUrl($vm_member_detail['userid']);
        } else {
            $member_url = getLoanprofileUrl($vm_member_detail['userid'], $member_loanid);
        }
        ?>
							<tr><td></td><td><a href="<?php 
        echo $member_url;
        ?>
" target="_blank"><?php 
        echo $vm_member_detail['FirstName'] . " " . $vm_member_detail['LastName'];
        ?>
</a></td>
							</tr>
							<tr></tr>
						<?php 
    }
    ?>
						</tbody>
Example #28
0
        $ld = $_GET['l'];
        //gets the profile for the loan ID specified in the URL
        if (isset($_GET['u']) && empty($ld)) {
            $lastLoan = $database->getLastloan($_GET['u']);
            //get the current or most recent loan for the logged in borrower
            if (!empty($lastLoan)) {
                $ld = $_GET['l'] = $lastLoan['loanid'];
            }
        }
    }
    $loan = $database->getLoanDetails($ld);
    if ($loan['active'] == LOAN_OPEN) {
        $brw = $database->getBorrowerDetails($ud);
        $_text = "Help us distribute \$100,000 to new entrepreneurs - \$10 per share or tweet!";
        $_tweettxt = "Help @zidishainc fund a loan for " . $brw['FirstName'] . " in " . $database->mysetCountry($brw['Country']) . "." . " \$10 donated for every tweet or RT!";
        $_url = SITE_URL . getLoanprofileUrl($ud, $ld) . "?yc=1";
    }
}
?>

<script type="text/javascript">
    function facebook_share()
    {
        var fburl="http://www.facebook.com/sharer.php?s=100&p[url]=<?php 
echo urlencode($_url);
?>
";
        window.open(fburl,'','width=600,height=450,left=200,top=200');
    }
    function twitter_share()
    {
Example #29
0
			
		<?php 
$comments = $database->getAllCommentForLender($session->userid);
$margin = 0;
$cmtIdArr = array();
$cmtMar = array();
if (!empty($comments)) {
    $c = 0;
    $i = 0;
    foreach ($comments as $commns) {
        $i++;
        $userid = $commns['senderid'];
        $borrowerid = $commns['receiverid'];
        $bname = $database->getNameById($borrowerid);
        $loanid = $database->getUNClosedLoanid($borrowerid);
        $loanprurl = getLoanprofileUrl($borrowerid, $loanid);
        $usermessage = $commns['message'];
        if (!empty($commns['tr_message'])) {
            $usermessage = $commns['tr_message'];
        }
        $date = $commns['pub_date'];
        $level = $database->getUserLevelbyid($userid);
        if ($level == BORROWER_LEVEL || $level == PARTNER_LEVEL) {
            $name13 = $database->getNameById($userid);
        } else {
            $sublevel = $database->getUserSublevelById($userid);
            if ($sublevel == LENDER_GROUP_LEVEL) {
                $name13 = $database->getNameById($userid);
            } else {
                $name13 = $database->getUserNameById($userid);
            }
Example #30
0
<?php

include_once "library/session.php";
include_once "./editables/loanstatn.php";
$path = getEditablePath('loanstatn.php');
include_once "editables/" . $path;
?>
<div class='span12'>
<?php 
if ($session->userlevel == LENDER_LEVEL) {
    $res = $database->getLastForgiveDetailOfLender($session->userid);
    if (!empty($res)) {
        $bname = $database->getNameById($res['borrower_id']);
        $loanprurl = getLoanprofileUrl($bid, $loanid);
        $damount = number_format($res['damount'], 2, ".", ",");
        $loanid = $res['loan_id'];
        $bid = $res['borrower_id'];
        echo "<br/>";
        echo "<p>Thank you!  " . $bname . "'s remaining repayments have been reduced by USD {$damount}.</p>";
        echo "<br/>";
        echo "<p><a href='{$loanprurl}'>Back to loan profile page</a></p>";
    }
}
?>
</div>