name = $name;
$this->text = $text;
$this->start_time = $start_time;
$this->end_time = $end_time;
}
var $name;
var $text;
var $start_time;
var $end_time;
} //end
$daysecs = 86400-1;
$weeksecs = 604800;
$busweeksecs = 432000-1;
if (date("w",time()) > 1) {
$lastmonday = strtotime("last Monday")-604800;
} else {
$lastmonday = strtotime("last Monday");
}
$week = date("W",time());
$date = date("w",time());
$today = date('n/j/Y',time());
$lastmonth = mktime(0, 0, 0, date("m",time())-1, date("d",time()), date("Y",time()));
$nextyear = mktime(0, 0, 0, date("m",time()), date("d",time()), date("Y",time())+1);
$quickpicks[""] = new QuickPickInfo("", "", "", "") ;
$quickpicks["today"] = new QuickPickInfo("today", "Today", $today, $today);
$quickpicks["yesterday"] = new QuickPickInfo("yesterday", "Yesterday",
date('n/j/Y', time() - 24*3600), date('n/j/Y', time() - 24*3600));
$quickpicks["last7days"] = new QuickPickInfo("last7days", "Last 7 days",
date('n/j/Y',time() - 7*24*3600), date('n/j/Y',time()) );
$quickpicks["lastweek"] = new QuickPickInfo("lastweek", "Last week",
date('n/j/Y',$lastmonday), date('n/j/Y',($lastmonday + $weeksecs-1)) );
$quickpicks["lastbusinessweek"] = new QuickPickInfo("lastbusinessweek", "Last business week",
date('n/j/Y',$lastmonday), date('n/j/Y',($lastmonday + $busweeksecs-1)));
$quickpicks["thismonth"] = new QuickPickInfo("thismonth", "This month",
date('n/j/Y',mktime(0, 0, 0, date("m",time()), 1, date("Y",time()))),
date('n/j/Y',mktime(0, 0, 0, date("m",time())+1, 1, date("Y",time()))-$daysecs) );
$themonth = date('n',time());
$theyear = date('Y',time());
$themonth = ($themonth-1) ;
if ($themonth == 0) {
$themonth = 12;
$theyear +=-1;
}
$mymonth = mktime(0, 0, 0, $themonth, 1, $theyear);
$daysinmonth = date('t',$mymonth);
$quickpicks["lastmonth"] = new QuickPickInfo("lastmonth", "Last month",
date('n/j/Y',mktime(0,0,0,$themonth,1,$theyear)),
date('n/j/Y',mktime(0, 0, 0,$themonth, $daysinmonth, $theyear)) );
$quickpicks["all"] = new QuickPickInfo("all", "All",
date('n/j/Y', 0),
date('n/j/Y',mktime(0, 0, 0, date("m",time()), date("d",time()), date("Y",time())+1)));
//get selected office id
$officeid = $_GET["officeid"];
$quickpick = $_GET["quickpick"];
//if start/end time is set, use it
if ( "" != $_GET["timeperiodstart"] && "" != $_GET["timeperiodend"])
{
//selected start and end time
$start_time = $_GET["timeperiodstart"] ;
$end_time = $_GET["timeperiodend"] ;
}
else
{
//else, use quick pick
if ( "" == $quickpick )
{
$quickpick = "all";
}
//selected start and end time
$start_time = $quickpicks[$quickpick]->start_time;
$end_time = $quickpicks[$quickpick]->end_time;
}
$sqlstarttime = formatsqldate($start_time)." 00:00:00";
$sqlendtime = formatsqldate($end_time)." 23:59:59";
mysql_select_db($database_myconnection, $myconnection);
$base_sql="SELECT l.id, l.leadstatus client_status, l.firstname, p.movein_date, p.pending_date,
l.lastname, kr.fee_due, kr.fee_paid,kr.date_paid, pc.primary_id, pm.contactname
FROM kw_referrals kr
left join leads l on l.id=kr.lead_id
left join clients c on l.id=c.lead_id
left join placements p on kr.lead_id=p.client_id
left join mymprops.property_communities pc on pc.primary_id=kr.property_id
left join mymprops.property_management pm ON pc.managementid=pm.id
where (kr.lead_id<>'0' or kr.property_id<>'0') and kr.agent_id=".$_SESSION['id']
." And ((kr.lead_id<>'0' and (l.leaddate between '$sqlstarttime' and '$sqlendtime')) or (kr.lead_id='0' and (pc.lastupdated between '$sqlstarttime' and '$sqlendtime')))
";
?>
J. Ellis Apartment Locators - Referral Center
|
|
|
|
|
|
|
|
|
|
|
|
Commissions Center |
|
Track Commissions
Earned from Referrals and Accounts |
This resource gives you access
to the latest information on all your commission income. Just
log into this page whenever you need an instant update. |
|
|
Select Referrals |
Results will
be displayed below |
|
|
|
|
|
|
|
|
|
|
|
Outstanding
Commissions |
|
'0' and l.clientstatus = 'Placed') or (kr.lead_id='0' and pc.status='Rented')) and kr.fee_paid=0";
//echo $out_sql;
$out_result = mysql_query($out_sql, $myconnection) or die(mysql_error());
$out_data = array();
while ($out_row = mysql_fetch_assoc($out_result)){
$row_list = array();
$row_list["id"] = $out_row["id"];
$row_list["movein_date"] = $out_row["movein_date"];
if($out_row["id"] != "") {
if($out_row["movein_date"] != "" && $out_row["movein_date"] != "0000-00-00") {
$row_list["movein_date_dsp"] = date("m/d/y", findtime($out_row["movein_date"]." 00:00:00"));
}
if($out_row["client_status"] == "Pending") {
$row_list["due_date"] = date("m/d/y", findtime($out_row["pending_date"]." 00:00:00"));
}elseif($out_row["client_status"] == "Placed") {
$row_list["due_date"] = date("m/d/y", findtime($out_row["movein_date"]." 00:00:00")+7*24*60*60);
}
$row_list["name"] = $out_row["firstname"]." ".$out_row["lastname"];
}else {
$row_list["name"] = $out_row["contactname"];
}
$row_list["fee_due"] = $out_row["fee_due"];
//$row_list["fee_paid"] = $out_row["fee_paid"];
$row_list["primary_id"] = $out_row["primary_id"];
$out_data[] = $row_list;
}
$out_datagrid = new MYMDataGrid();
$out_datagrid->setDefaultSortCol("movein_date","desc");
$out_datagrid->processRequest();
if ( $out_datagrid->_sort ) {
$out_data = SortByCol( $out_data, $out_datagrid->_sort, $out_datagrid->_sortdir == "asc" ? SORT_ASC : SORT_DESC );
}
$out_datagrid->setData($out_data);
?>
|
|
|
|
showCurrRecords()?> |
showPages()?> |
|
|
|
|
|
|
showColTitle("id","ID")?> |
showColTitle("movein_date","Move Date")?> |
showColTitle("name","Name")?> |
showColTitle("","Type")?> |
showColTitle("fee_due","Amount Due")?> |
showColTitle("due_date","Due Date")?> |
getStartRow(); $i<=$out_datagrid->getEndRow(); $i++ )
{
$out_row = $out_data[$i];
?>
|
class="bodylinks">
" class="bodylinks" target="_blank">
|
|
|
|
$ |
findtime($_now))
echo "Pending";
else if($out_row["movein_date_dsp"] != "")
echo date("n/j/Y",findtime($out_row["movein_date_dsp"])+7*24*3600);
?> |
|
|
|
|
|
|
Paid
Commissions |
|
0";
$paid_result = mysql_query($paid_sql, $myconnection) or die(" Can't run the sql ".$paid_sql);
$pout_data = array();
while ($paid_row = mysql_fetch_assoc($paid_result)){
$row_list = array();
$row_list["id"] = $paid_row["id"];
$row_list["movein_date"] = $paid_row["movein_date"];
if($paid_row["id"] != "") {
if($paid_row["movein_date"] != "" && $paid_row["movein_date"] != "0000-00-00") {
$row_list["movein_date_dsp"] = date("m/d/y", findtime($paid_row["movein_date"]." 00:00:00"));
}
$row_list["name"] = $paid_row["firstname"]." ".$paid_row["lastname"];
}else {
$row_list["name"] = $paid_row["contactname"];
}
$row_list["fee_due"] = $paid_row["fee_due"];
$row_list["fee_paid"] = $paid_row["fee_paid"];
if($paid_row["date_paid"] != "" && $paid_row["date_paid"] != "0000-00-00 00:00:00") {
$row_list["paid_date"] = date("m/d/y", findtime($paid_row["date_paid"]." 00:00:00"));
}
$row_list["primary_id"] = $paid_row["primary_id"];
$pout_data[] = $row_list;
}
$paid_datagrid = new MYMDataGrid();
$paid_datagrid->setDefaultSortCol("movein_date","desc");
$paid_datagrid->processRequest();
if ( $paid_datagrid->_sort ) {
$pout_data = SortByCol( $pout_data, $paid_datagrid->_sort, $paid_datagrid->_sortdir == "asc" ? SORT_ASC : SORT_DESC );
}
$paid_datagrid->setData($pout_data);
?>
|
|
|
|
showCurrRecords()?> |
showPages()?> |
|
|
|
|
|
|
showColTitle("id","ID")?> |
showColTitle("movein_date","Move Date")?> |
showColTitle("name","Name")?> |
showColTitle("","Type")?> |
showColTitle("fee_due","Paid")?> |
showColTitle("paid_date","Date Paid")?> |
getStartRow(); $i<=$paid_datagrid->getEndRow(); $i++ )
{
$row_list = $pout_data[$i];
?>
|
class="bodylinks">
" class="bodylinks" target="_blank">
|
|
|
|
$ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Have
Questions? |
|
|
Contact
our Support Team for help fast. (469) 713-3472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
J. Ellis Apartment Locators,
a Licensed Real Estate Broker, is an Equal Housing Opportunity rental service.
Copyright 2009. |
|
|