Exemplo n.º 1
0
function entrySetReady($entry)
{
    global $invoice_sendto, $systemurl, $login;
    if (!count($entry)) {
        echo __('No entry found.');
        return FALSE;
    }
    /*
     * Set new status
     * Set new rev_num, time of edit, etc
     */
    $rev_num = $entry['rev_num'] + 1;
    mysql_query("UPDATE `entry` SET `invoice_status` = '2', `user_last_edit` = '" . $login['user_id'] . "', `time_last_edit` = '" . time() . "', `rev_num` = '{$rev_num}' WHERE `entry_id` = '" . $entry['entry_id'] . "' LIMIT 1 ;");
    $log_data = array();
    if (!newEntryLog($entry['entry_id'], 'edit', 'invoice_readyfor', $rev_num, $log_data)) {
        echo __('Can\'t log the changes for the entry.');
        echo '<br><br>';
        return FALSE;
    }
    if (isset($invoice_sendto) && is_array($invoice_sendto)) {
        $entry_summary = 'Bookingid: ' . $entry['entry_id'] . chr(10);
        $area = getArea($entry['area_id']);
        if (count($area)) {
            foreach ($invoice_sendto as $email) {
                emailSendDirect($email, 'Booking klar til fakturering - ' . $area['area_name'] . ', ' . date('d.m.Y', $entry['time_start']) . ' (' . $entry['entry_id'] . ')', 'Hei' . chr(10) . chr(10) . $login['user_name'] . ' har satt en ny booking, fra ' . $area['area_name'] . ', klar til fakturering. Bookingen var fra ' . date('d.m.Y', $entry['time_start']) . '.' . chr(10) . chr(10) . 'Gå inn på følgende adresse for å få tilsendt fakturagrunnlagene:' . chr(10) . $systemurl . '/invoice_tobemade_ready.php' . chr(10) . 'Hvis det er flere fakturaer som er klar til fakturering, så kan samtlige hentes ut på likt.' . chr(10) . chr(10) . 'Oppsummert booking:' . chr(10) . 'Bookingid: ' . $entry['entry_id'] . chr(10) . 'Tittel: ' . html_entity_decode($entry['entry_name']) . chr(10) . 'Anlegg: ' . $area['area_name'] . chr(10) . 'Sum eks mva: kr ' . smarty_modifier_commify($entry['eks_mva_tot'], 2, ',', ' ') . chr(10) . ' + MVA kr ' . smarty_modifier_commify($entry['faktura_belop_sum_mva'], 2, ',', ' ') . chr(10) . 'Sum ink. mva: kr ' . smarty_modifier_commify($entry['faktura_belop_sum'], 2, ',', ' ') . chr(10) . chr(10) . 'Mvh. Bookingsystemet');
            }
        }
    }
    return TRUE;
}
Exemplo n.º 2
0
function testScope()
{
    require_once 'func.php';
    $area = getArea(20, 14);
    print $scope;
    print '四角形の面積' . $area;
    return $scope;
}
function getAreaFromEntry($entry, $key)
{
    $area = getArea($entry[$key . '_id']);
    if (count($area)) {
        return $area['area_name'];
    } else {
        return '';
    }
}
Exemplo n.º 4
0
function getBorrowList($parm = array(), $countonly = false)
{
    if (empty($parm['map'])) {
        return;
    }
    $map = $parm['map'];
    $orderby = $parm['orderby'];
    //$map = array_merge($map,$search);
    if ($countonly) {
        return M('borrow_info b')->where($map)->count('b.id');
    }
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info b')->where($map)->count('b.id');
        $p = new Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    $field = "b.id,b.borrow_name,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,b.borrow_info,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.pro_provide,b.first_verify_time,b.schedular_time";
    if ($parm['hotest']) {
        $field .= ",IFNULL(b.`full_time`,0)-IFNULL(bv.`deal_time`,0) finish_time";
        $list = M('borrow_info')->alias("b")->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->join("{$pre}borrow_verify bv ON b.id=bv.borrow_id")->where($map)->order($orderby)->limit($Lsql)->select();
    } else {
        $list = M('borrow_info')->alias("b")->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    }
    $areaList = getArea();
    foreach ($list as $key => $v) {
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100, 2);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("Home/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        $list[$key]['schedular_time'] = trans_date_format($v['schedular_time'], 'Y-m-d');
    }
    $row = array();
    $row['list'] = $list;
    $row['page'] = $page;
    return $row;
}
Exemplo n.º 5
0
function getBorrowList($parm = array())
{
    $map = $parm['map'];
    $orderby = $parm['orderby'];
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info b')->where($map)->count('b.id');
        $p = new Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        $row['page']['total'] = ceil($count / $parm['pagesize']);
        $row['page']['nowPage'] = isset($_REQUEST['p']) ? $_REQUEST['p'] : 1;
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    $field = "b.id,b.borrow_name,b.borrow_type,b.updata,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control";
    $list = M('borrow_info b')->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    $areaList = getArea();
    foreach ($list as $key => $v) {
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100, 2);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("M/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        $img = unserialize($v['updata']);
        $list[$key]['image'] = $img['0']['img'];
    }
    $row['list'] = $list;
    return $row;
}
Exemplo n.º 6
0
function getBorrowList($parm = array())
{
    if (empty($parm['map'])) {
        return;
    }
    $map = $parm['map'];
    $orderby = $parm['orderby'];
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        //require THINK_PATH.'Lib/Util/page.class.php';
        $count = M('borrow_info b')->where($map)->count('b.id');
        $p = new Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    //$field = "b.id,b.borrow_name,b.topic,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control";
    $field = "b.id,b.borrow_name,b.money_invest_place,b.borrow_type,b.stock_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.stock_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control";
    $list = M('borrow_info b')->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    $areaList = getArea();
    foreach ($list as $key => $v) {
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $progress = $v['has_borrow'] / $v['borrow_money'] * 100;
        $list[$key]['progress'] = $progress > 50 ? floor($progress) : ceil($progress);
        //增加floor
        //$list[$key]['progress'] = getFloatValue($v['has_borrow']/$v['borrow_money']*100,2);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("Home/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        //新加
        $list[$key]['lefttime'] = $v['collect_time'] - time();
        if ($v['deadline'] == 0) {
            $endTime = strtotime(date("Y-m-d", time()));
            if ($v['repayment_type'] == 1) {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} day", $endTime);
            } else {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} month", $endTime);
            }
        } else {
            $list[$key]['repaytime'] = $v['deadline'];
            //还款时间
        }
        $list[$key]['publishtime'] = $v['add_time'] + 60 * 60 * 24 * 3;
        //预计发标时间=添加时间+1天
        if ($v['danbao'] != 0) {
            $danbao = M('article')->field("id,title")->where("type_id =7 and id ={$v['danbao']}")->find();
            $list[$key]['danbao'] = $danbao['title'];
            //担保机构
        } else {
            $list[$key]['danbao'] = '暂无担保机构';
            //担保机构
        }
    }
    $row = array();
    $row['list'] = $list;
    $row['count'] = $count;
    $row['page'] = $page;
    return $row;
}
Exemplo n.º 7
0
} else {
    $date = time();
}
$start = mktime(16, 0, 0, date('m', $date), date('d', $date), date('Y', $date));
$end = mktime(06, 0, 0, date('m', $date), date('d', $date) + 1, date('Y', $date));
$default_area = 6;
if (isset($_GET['area'])) {
    $area2 = getArea($_GET['area']);
    if (!count($area2)) {
        $area = $default_area;
    } else {
        $area = $area['area_id'];
    }
} else {
    $area = $default_area;
    $area2 = getArea($area);
    if (!count($area2)) {
        $area = 0;
    }
}
echo '<html><head><title>';
if (count($area2)) {
    echo $area2['area_name'] . ' - ';
}
echo date('d.m.Y', $start);
echo '</title></head>';
echo '<body background="img/infoskjerm-bg.png" style="margin: 0px; padding: 0px;">' . chr(10);
$Q_room = mysql_query("select id as room_id, room_name from `mrbs_room` where area_id = '" . $area . "' and hidden = 'false'");
$rooms = array();
while ($R_room = mysql_fetch_assoc($Q_room)) {
    $rooms[$R_room['room_id']] = $R_room['room_name'];
Exemplo n.º 8
0
 public function tdetail()
 {
     if ($_GET['type'] == 'commentlist') {
         //评论
         $cmap['tid'] = intval($_GET['id']);
         $clist = getCommentList($cmap, 5);
         $this->assign("commentlist", $clist['list']);
         $this->assign("commentpagebar", $clist['page']);
         $this->assign("commentcount", $clist['count']);
         $data['html'] = $this->fetch('commentlist');
         exit(json_encode($data));
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     //合同ID
     if ($this->uid) {
         $invs = M('transfer_borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid} OR borrow_uid={$this->uid})")->find();
         if ($invs['id'] > 0) {
             $invsx = $invs['id'];
         } elseif (!is_array($invs)) {
             $invsx = 'no';
         }
     } else {
         $invsx = 'login';
     }
     $this->assign("invid", $invsx);
     //合同ID
     //borrowinfo
     //$borrowinfo = M("borrow_info")->field(true)->find($id);
     $borrowinfo = M("transfer_borrow_info b")->join("{$pre}transfer_detail d ON d.borrow_id=b.id")->field(true)->find($id);
     /*if(!is_array($borrowinfo) || $borrowinfo['is_show'] == 0){
           $this->error("数据有误或此标已认购完");
       }*/
     $borrowinfo['progress'] = getfloatvalue($borrowinfo['transfer_out'] / $borrowinfo['transfer_total'] * 100, 2);
     $borrowinfo['need'] = getfloatvalue(($borrowinfo['transfer_total'] - $borrowinfo['transfer_out']) * $borrowinfo['per_transfer'], 2);
     $borrowinfo['updata'] = unserialize($borrowinfo['updata']);
     $this->assign("vo", $borrowinfo);
     //此标借款利息还款相关情况
     //memberinfo
     $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $this->assign("minfo", $memberinfo);
     //memberinfo
     //investinfo
     $fieldx = "bi.investor_capital,bi.transfer_month,bi.transfer_num,bi.add_time,m.user_name,bi.is_auto,bi.final_interest_rate";
     $investinfo = M("transfer_borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select();
     $this->assign("investinfo", $investinfo);
     //investinfo
     $oneday = 86400;
     $time_1 = time() - 30 * $oneday . "," . time();
     $time_6 = time() - 180 * $oneday . "," . time();
     $time_12 = time() - 365 * $oneday . "," . time();
     $mapxr['borrow_id'] = $id;
     $this->assign("time_all_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_1}");
     $this->assign("time_1_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_6}");
     $this->assign("time_6_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_12}");
     $this->assign("time_12_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr = array();
     $mapxr['borrow_id'] = $id;
     $mapxr['status'] = 2;
     $this->assign("time_all_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_1}");
     $this->assign("time_1_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_6}");
     $this->assign("time_6_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_12}");
     $this->assign("time_12_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $this->assign("Bconfig", $Bconfig);
     $this->display();
 }
Exemplo n.º 9
0
         $addrQuery = pdoQuery('address_tbl', null, array('c_id' => $_SESSION['customerId'], 'dft_a' => 1), ' limit 1');
     }
     if ($addrrow = $addrQuery->fetch()) {
         $addr = $addrrow;
     } else {
         $addrrow = array('id' => -1, 'name' => '', 'phone' => '', 'address' => '点击设置收货地址', 'province' => ' ', 'city' => ' ', 'area' => ' ');
         $addr = $addrrow;
     }
     include 'view/order.html.php';
     exit;
 }
 //地址页面修改已存在地址
 if (isset($_GET['alterAddress'])) {
     $pro = getProvince($_POST['pro']);
     $city = getCity($_POST['pro'], $_POST['city']);
     $area = getArea($_POST['pro'], $_POST['city'], $_POST['area']);
     $value = array('pro_id' => $_POST['pro'], 'city_id' => $_POST['city'], 'area_id' => $_POST['area'], 'area' => $_POST['area'], 'province' => $pro, 'city' => $city, 'area' => $area, 'address' => $_POST['address'], 'name' => $_POST['name'], 'phone' => $_POST['phone']);
     if (-1 == $_POST['address_id']) {
         $value['c_id'] = $_SESSION['customerId'];
         $value['dft_a'] = 0;
         $addrId = pdoInsert('address_tbl', $value);
     } else {
         pdoUpdate('address_tbl', $value, array('id' => $_POST['address_id']));
     }
     $from = isset($_GET['from']) ? '&from=' . $_GET['from'] : '';
     header('location:controller.php?editAddress=1' . $from);
 }
 if (isset($_GET['editAddress'])) {
     $to = $_GET['from'];
     $addrQuery = pdoQuery('address_tbl', null, array('c_id' => $_SESSION['customerId']), ' limit 5');
     $addrlist = array();
Exemplo n.º 10
0
                header('Location: admin_entry_type.php');
                exit;
            } else {
                echo 'Error occured while performing query on database:<br>' . chr(10), exit;
            }
        }
    }
    include "include/admin_middel.php";
    $editor->printEditor();
} elseif (isset($_GET['entry_type_id']) && isset($_GET['area_id'])) {
    $entry_type = getEntryType($_GET['entry_type_id']);
    if (!count($entry_type)) {
        echo 'Finner ikke typen.';
        exit;
    }
    $area = getArea($_GET['area_id']);
    if (!count($area)) {
        echo __('Can\'t find the area.');
        exit;
    }
    $entry_type_defaultattachment = getEntryTypeDefaultAttachment($_GET['entry_type_id'], $_GET['area_id']);
    $saved = false;
    if (isset($_POST['attSave'])) {
        if (!isset($_POST['attachment']) || !is_array($_POST['attachment'])) {
            $_POST['attachment'] = array();
        }
        // Accept the changes in attachments
        $att_new = array();
        $att_deleted = $entry_type_defaultattachment;
        foreach ($_POST['attachment'] as $att_id) {
            $att = getAttachment($att_id);
Exemplo n.º 11
0
 echo '		<th>Bruker</th>' . chr(10);
 echo '		<th>Login</th>' . chr(10);
 echo '		<th>Accesslevel</th>' . chr(10);
 echo '		<th>Info</th>' . chr(10);
 echo '		<th>Valg</th>' . chr(10);
 echo '		<th>Grupper som brukeren er medlem av</th>' . chr(10);
 echo '	</tr>' . chr(10) . chr(10);
 while ($R_user = mysql_fetch_assoc($Q_users)) {
     $user = getUser($R_user['user_id'], true);
     echo '	<tr>' . chr(10);
     echo '		<td>' . $user['user_id'] . '</td>';
     echo '		<td>' . '<a href="user.php?user_id=' . $user['user_id'] . '">' . iconHTML('user') . ' ' . $user['user_name'] . '</a>' . '</td>' . chr(10);
     echo '		<td>' . $user['user_name_short'] . '</td>' . chr(10);
     echo '		<td>' . iconHTML('lock') . ' ' . $user['user_accesslevel'] . '</td>' . chr(10);
     echo '		<td>' . '<div class="showButton" id="buttonId' . $user['user_id'] . '"><a href="javascript:void();">Vis / Ikke vis</a></div>' . '<div class="showField" id="fieldId' . $user['user_id'] . '" style="display:none;">' . 'Telefon: ' . $user['user_phone'] . '<br>' . 'E-post: ' . $user['user_email'] . '<br>' . 'Stilling: ' . $user['user_position'] . '<br>';
     $area_user = getArea($user['user_area_default']);
     if (!count($area_user)) {
         $area_user['area_name'] = 'IKKE FUNNET';
     }
     echo 'Standard bygg: ' . $area_user['area_name'] . '<br>';
     echo 'Fakturatilgang: ';
     if ($user['user_invoice']) {
         echo 'ja';
     } else {
         echo 'nei';
     }
     '</div></td>' . chr(10);
     echo '		<td>' . '<a href="' . $_SERVER['PHP_SELF'] . '?editor=1&amp;id=' . $user['user_id'] . '">' . iconHTML('user_edit') . ' ' . 'Endre</a>' . '</td>' . chr(10);
     echo '		<td>';
     if (count($user) && count($user['groups'])) {
         echo '<ul style="margin: 0;">' . chr(10);
Exemplo n.º 12
0
echo '<script language="javascript" src="js/jquery-1.3.2.min.js"></script>' . chr(10);
//echo nl2br(str_replace('  ', '_ ', print_r($invoice, 1)));
echo '<form method="post" name="invoiceform" action="' . $_SERVER['PHP_SELF'] . '">' . chr(10);
if (count($invoice->invoice_idlinks)) {
    $datafrom_string = 'Fakturadata hentet fra' . chr(10);
    foreach ($invoice->invoice_idlinks as $link) {
        list($idtype, $id) = explode('=', $link);
        $datafrom_string .= '- ';
        switch ($idtype) {
            case 'e':
                // Entry
                $thisentry = getEntry($id);
                if (!count($thisentry)) {
                    $datafrom_string .= '(BID' . $id . ') UKJENT BOOKING (ikke funnet i databasen)';
                } else {
                    $entryarea = getArea($thisentry['area_id']);
                    $a = '';
                    if (count($entryarea)) {
                        $a = ' - ' . $entryarea['area_name'];
                    }
                    $datafrom_string .= 'Booking' . $a . ', ' . date('d-m-Y', $thisentry['time_start']) . ', BID' . $id . ' - ' . '<a href="entry.php?entry_id=' . $thisentry['entry_id'] . '">' . $thisentry['entry_name'] . '</a>';
                    //' (BID'.$id.')';
                    if ($thisentry['contact_person_name'] != '') {
                        $datafrom_string .= ', kontaktperson: ' . $thisentry['contact_person_name'];
                    }
                }
                break;
            default:
                $datafrom_string .= _('Unknown sourcetype');
                break;
        }
Exemplo n.º 13
0
function getAreaIds($area_id_from_default)
{
    $area_ids = array();
    if (isset($_GET['area'])) {
        $split = explode(',', $_GET['area']);
        foreach ($split as $id) {
            $area_ids[] = (int) $id;
        }
    }
    if (!count($area_ids)) {
        $area_ids = array($area_id_from_default);
    }
    $areas = array();
    foreach ($area_ids as $area_id) {
        $area = getArea($area_id);
        if (count($area)) {
            $areas[$area['area_id']] = $area;
        }
    }
    return $areas;
}
Exemplo n.º 14
0
 public function getBorrowerInfo($bid)
 {
     $db = core::db()->getConnect('CAILAI', true);
     $filed = "bi.borrow_uid,mi.sex,mi.age,mi.education,mi.marry,fi.fin_monthin,m.user_email,m.customer_name,fi.fin_car,m.integral,mi.zy,mm.credit_limit,mi.province,mi.city,mm.account_money,mm.back_money,mm.money_collect,mm.money_freeze ";
     $sql = sprintf("SELECT {$filed} FROM`lzh_borrow_info` bi  LEFT JOIN lzh_members m ON m.id = bi.borrow_uid LEFT JOIN lzh_member_financial_info fi ON bi.borrow_uid=fi.uid  LEFT JOIN `lzh_member_info` mi ON mi.uid=bi.borrow_uid  LEFT JOIN `lzh_member_money` mm ON mm.uid=bi.borrow_uid WHERE bi.id=%s", $bid);
     $zw = $db->query($sql, "array ");
     $borrow_uid = $zw['borrow_uid'];
     unset($zw['borrow_uid']);
     $zw['fin_monthin'] = getMoneyFormt($zw['fin_monthin']);
     $zw['integral'] = (int) $zw['integral'];
     $zw['credit_limit'] = (double) $zw['credit_limit'];
     if ($zw['fin_car'] == NULL) {
         $zw['fin_car'] = '未填写';
     }
     //借款次数相关
     $sql2 = sprintf("SELECT `borrow_status`, COUNT(id) AS num,SUM(borrow_money) AS money,SUM(repayment_money) AS repayment_money FROM `lzh_borrow_info` WHERE borrow_uid = %s GROUP BY borrow_status ", $borrow_uid);
     $zw2 = $db->query($sql2);
     while ($row = $db->fetchArray($zw2)) {
         $borrowCount[$row['borrow_status']] = $row;
     }
     //借出情况相关
     $field3 = "status,count(id) as num,sum(investor_capital) as investor_capital,sum(reward_money) as reward_money,sum(investor_interest) as investor_interest,sum(receive_capital) as receive_capital,sum(receive_interest) as receive_interest,sum(invest_fee) as invest_fee";
     $sql3 = sprintf("SELECT {$field3} FROM `lzh_borrow_investor` WHERE investor_uid = %s GROUP BY STATUS  ", $borrow_uid);
     $zw3 = $db->query($sql3);
     $_reward_money = 0;
     while ($v = $db->fetchArray($zw3)) {
         $investStatus[$v['status']] = $v;
         $_reward_money += floatval($v['reward_money']);
     }
     $rowtj['jkze'] = getFloatValue(floatval($borrowCount[6]['money'] + $borrowCount[7]['money'] + $borrowCount[8]['money'] + $borrowCount[9]['money']), 2);
     //借款总额
     $rowtj['jcze'] = getFloatValue(floatval($investStatus[4]['investor_capital']), 2);
     //借出总额
     $rowtj['ysze'] = getFloatValue(floatval($investStatus[4]['receive_capital']), 2);
     //应收总额
     $rowtj['yhze'] = getFloatValue(floatval($borrowCount[6]['repayment_money'] + $borrowCount[7]['repayment_money'] + $borrowCount[8]['repayment_money'] + $borrowCount[9]['repayment_money']), 2);
     //应还总额
     $data2['yhze'] = getMoneyFormt(getFloatValue(floatval($borrowCount[6]['repayment_money'] + $borrowCount[7]['repayment_money'] + $borrowCount[8]['repayment_money'] + $borrowCount[9]['repayment_money']), 2));
     //应还总额
     $data2['dhze'] = getMoneyFormt(getFloatValue($rowtj['jkze'] - $rowtj['yhze'], 2));
     //待还总额
     $data2['jcze'] = getMoneyFormt(getFloatValue(floatval($investStatus[4]['investor_capital']), 2));
     //借出总额
     $data2['ysze'] = getMoneyFormt(getFloatValue(floatval($investStatus[4]['receive_capital']), 2));
     //应收总额
     $data2['dsze'] = getMoneyFormt(getFloatValue($rowtj['jcze'] - $rowtj['ysze'], 2));
     //待收总额
     $data2['fz'] = getMoneyFormt(getFloatValue($rowtj['jcze'] - $rowtj['jkze'], 2));
     $data2['jkcgcs'] = (int) ($borrowCount[6]['num'] + $borrowCount[7]['num'] + $borrowCount[8]['num'] + $borrowCount[9]['num']);
     //借款成功次数
     $data2['zcze'] = getMoneyFormt(getFloatValue(floatval($zw['account_money'] + $zw['back_money'] + $zw['money_collect'] + $zw['money_freeze']), 2));
     //资产总额
     //还款情况相关
     $field4 = "status,sort_order,borrow_id,sum(capital) as capital,sum(interest) as interest";
     $sql4 = sprintf("SELECT {$field4} FROM `lzh_investor_detail` WHERE borrow_uid = %s GROUP BY sort_order, borrow_id ", $borrow_uid);
     $zw4 = $db->query($sql4);
     while ($v = $db->fetchArray($zw4)) {
         //                    $repaymentStatus[$v['status']]['capital']+=$v['capital'];//当前状态下的数金额
         //                    $repaymentStatus[$v['status']]['interest']+=$v['interest'];//当前状态下的数金额
         $repaymentStatus[$v['status']]['num']++;
         //当前状态下的总笔数
     }
     $data2['repayment1'] = (int) $repaymentStatus[1]['num'];
     //正常还款次数:
     $data2['repayment3'] = (int) $repaymentStatus[3]['num'];
     //迟还次数:
     $data2['repayment2'] = (int) $repaymentStatus[2]['num'];
     //提前还款次数::
     $data2['repayment6'] = (int) $repaymentStatus[6]['num'];
     //待还款笔数:
     $data2['repayment4'] = (int) $repaymentStatus[4]['num'];
     //网站代还次数:::
     $data2['repayment5'] = (int) $repaymentStatus[5]['num'];
     //逾期还款笔数::
     $areaList = getArea();
     $data2['location'] = $areaList[$zw['province']] . $areaList[$zw['city']];
     unset($zw['province'], $zw['city']);
     $zz = array_merge($zw, $data2);
     return $zz;
 }
Exemplo n.º 15
0
function templateAssignEntry($var, $entry)
{
    global ${$var};
    if (count($entry)) {
        ${$var}->assign('entry_id', $entry['entry_id']);
        ${$var}->assign('entry_name', $entry['entry_name']);
        ${$var}->assign('entry_title', $entry['entry_title']);
        ${$var}->assign('confirm_email', $entry['confirm_email']);
        if ($entry['confirm_email']) {
            ${$var}->assign('confirm_email2', _('yes'));
        } else {
            ${$var}->assign('confirm_email2', _('no'));
        }
        ${$var}->assign('entry_type_id', $entry['entry_type_id']);
        if ($entry['entry_type_id'] == 0) {
            $entry_type = _('Non selected');
        } else {
            $entry_type = getEntryType($entry['entry_type_id']);
            if (count($entry_type)) {
                $entry_type = $entry_type['entry_type_name'];
            } else {
                $entry_type = 'ERROR';
            }
        }
        ${$var}->assign('entry_type', $entry_type);
        ${$var}->assign('num_person_child', $entry['num_person_child']);
        ${$var}->assign('num_person_adult', $entry['num_person_adult']);
        ${$var}->assign('num_person_count', $entry['num_person_count']);
        if ($entry['num_person_count']) {
            ${$var}->assign('num_person_count2', _('yes'));
        } else {
            ${$var}->assign('num_person_count2', _('no'));
        }
        ${$var}->assign('program_id', $entry['program_id']);
        $program = getProgram($entry['program_id']);
        if (count($program)) {
            ${$var}->assign('program_id_name', $program['program_name']);
            ${$var}->assign('program_id_desc', $program['program_desc']);
        } else {
            ${$var}->assign('program_id_name', '');
            ${$var}->assign('program_id_desc', '');
        }
        ${$var}->assign('program_description', $entry['program_description']);
        ${$var}->assign('service_alco', $entry['service_alco']);
        if ($entry['service_alco']) {
            ${$var}->assign('service_alco2', _('yes'));
        } else {
            ${$var}->assign('service_alco2', _('no'));
        }
        ${$var}->assign('service_description', $entry['service_description']);
        ${$var}->assign('comment', $entry['comment']);
        ${$var}->assign('infoscreen_txt', $entry['infoscreen_txt']);
        ${$var}->assign('time_start', $entry['time_start']);
        ${$var}->assign('time_end', $entry['time_end']);
        ${$var}->assign('room_id', $entry['room_id']);
        // Room
        $rooms = array();
        if (!count($entry['room_id'])) {
            $rooms[] = _('Whole area');
        } elseif (count($entry['room_id']) == '1') {
            // Single room
            foreach ($entry['room_id'] as $rid) {
                if ($rid == '0') {
                    $rooms[] = _('Whole area');
                } else {
                    $room = getRoom($rid);
                    if (count($room)) {
                        $rooms[] = $room['room_name'];
                    } else {
                        $rooms[] = 'ERROR';
                    }
                }
            }
        } else {
            foreach ($entry['room_id'] as $rid) {
                if ($rid != '0') {
                    $room = getRoom($rid);
                    if (count($room)) {
                        $rooms[] = $room['room_name'];
                    } else {
                        $rooms[] = 'ERROR';
                    }
                }
            }
        }
        if (!count($rooms)) {
            $rooms[] = _('Whole area');
        }
        ${$var}->assign('room', implode(', ', $rooms));
        ${$var}->assign('rooms', $rooms);
        ${$var}->assign('area_id', $entry['area_id']);
        // Area
        $area = getArea($entry['area_id']);
        if (count($area)) {
            $area = $area['area_name'];
        } else {
            $area = 'ERROR';
        }
        ${$var}->assign('area', $area);
        ${$var}->assign('user_assigned', $entry['user_assigned']);
        ${$var}->assign('user_assigned2', $entry['user_assigned2']);
        // User_assigned_names
        $names = array();
        $names2 = array();
        foreach ($entry['user_assigned'] as $user_id) {
            if ($user_id != 0) {
                $user = getUser($user_id);
                if (count($user)) {
                    $names[] = $user['user_name'];
                    $names2[] = '<a href="user.php?user_id=' . $user['user_id'] . '">' . $user['user_name'] . '</a>';
                } else {
                    $names[] = 'ERROR';
                    $names2[] = 'ERROR';
                }
            }
        }
        if ($entry['user_assigned2'] != '') {
            $names[] = $entry['user_assigned2'];
            $names2[] = $entry['user_assigned2'];
        }
        if (!count($names)) {
            $names[] = _('Nobody');
            $names2[] = _('Nobody');
            ${$var}->assign('user_assigned_any', false);
        } else {
            ${$var}->assign('user_assigned_any', true);
        }
        ${$var}->assign('user_assigned_names', implode(', ', $names));
        ${$var}->assign('user_assigned_names2', implode(', ', $names2));
        ${$var}->assign('customer_id', $entry['customer_id']);
        ${$var}->assign('customer_name', $entry['customer_name']);
        ${$var}->assign('contact_person_name', $entry['contact_person_name']);
        ${$var}->assign('contact_person_phone', $entry['contact_person_phone']);
        ${$var}->assign('contact_person_email', $entry['contact_person_email']);
        ${$var}->assign('customer_municipal_num', $entry['customer_municipal_num']);
        ${$var}->assign('customer_municipal', $entry['customer_municipal']);
        ${$var}->assign('created_by', $entry['created_by']);
        // created_by_name
        $user = getUser($entry['created_by']);
        if (count($user)) {
            ${$var}->assign('created_by_name', $user['user_name']);
        } else {
            ${$var}->assign('created_by_name', '');
        }
        ${$var}->assign('time_created', $entry['time_created']);
        ${$var}->assign('edit_by', $entry['edit_by']);
        // Edit_by_names
        $names = array();
        foreach ($entry['edit_by'] as $user_id) {
            $user = getUser($user_id);
            if (count($user)) {
                $names[] = $user['user_name'];
            } else {
                $names[] = 'ERROR';
            }
        }
        if (!count($names)) {
            $names[] = _('Nobody');
        }
        ${$var}->assign('edit_by_names', implode(', ', $names));
        ${$var}->assign('time_last_edit', $entry['time_last_edit']);
        ${$var}->assign('user_last_edit', $entry['user_last_edit']);
        $user = getUser($entry['user_last_edit']);
        if (count($user)) {
            ${$var}->assign('user_last_edit_name', $user['user_name']);
        } else {
            ${$var}->assign('user_last_edit_name', '');
        }
        ${$var}->assign('rev_num', $entry['rev_num']);
        ${$var}->assign('invoice', $entry['invoice']);
        if ($entry['invoice'] == '1') {
            ${$var}->assign('invoice2', true);
            ${$var}->assign('invoice3', _('yes'));
        } else {
            ${$var}->assign('invoice2', false);
            ${$var}->assign('invoice3', _('no'));
        }
        ${$var}->assign('invoice_status', $entry['invoice_status']);
        switch ($entry['invoice_status']) {
            case '0':
                ${$var}->assign('invoice_status2', _('not to be made'));
                break;
            case '1':
                ${$var}->assign('invoice_status2', 'skal lages, ikke klar');
                break;
            case '2':
                ${$var}->assign('invoice_status2', 'skal lages, klar til fakturering');
                break;
            case '3':
                ${$var}->assign('invoice_status2', 'faktura laget og sendt');
                break;
            case '4':
                ${$var}->assign('invoice_status2', 'betalt');
                break;
        }
        ${$var}->assign('invoice_electronic', $entry['invoice_electronic']);
        if ($entry['invoice_electronic'] == '1') {
            ${$var}->assign('invoice_electronic2', true);
            ${$var}->assign('invoice_electronic3', _('yes'));
        } else {
            ${$var}->assign('invoice_electronic2', false);
            ${$var}->assign('invoice_electronic3', _('no'));
        }
        ${$var}->assign('invoice_email', $entry['invoice_email']);
        ${$var}->assign('invoice_comment', $entry['invoice_comment']);
        ${$var}->assign('invoice_internal_comment', $entry['invoice_internal_comment']);
        ${$var}->assign('invoice_ref_your', $entry['invoice_ref_your']);
        ${$var}->assign('invoice_address_id', $entry['invoice_address_id']);
        $invoice_address = getAddress($entry['invoice_address_id']);
        if (count($invoice_address)) {
            ${$var}->assign('invoice_address', $invoice_address['address_full']);
        } else {
            ${$var}->assign('invoice_address', '');
        }
        ${$var}->assign('invoice_content', $entry['invoice_content']);
        ${$var}->assign('mva_vis', $entry['mva_vis']);
        ${$var}->assign('mva', $entry['mva']);
        ${$var}->assign('mva_grunnlag', $entry['mva_grunnlag']);
        ${$var}->assign('mva_grunnlag_sum', $entry['mva_grunnlag_sum']);
        ${$var}->assign('faktura_belop_sum', $entry['faktura_belop_sum']);
        ${$var}->assign('faktura_belop_sum_mva', $entry['faktura_belop_sum_mva']);
        ${$var}->assign('eks_mva_tot', $entry['eks_mva_tot']);
        ${$var}->assign('grunnlag_mva_tot', $entry['grunnlag_mva_tot']);
    }
}
Exemplo n.º 16
0
function getFullAreaName($Zone_id, $as_ref = 1)
{
    $zone = getArea($Zone_id, '`name`, `zone_id`');
    if ($zone) {
        $name = $zone['name'];
        if ($as_ref) {
            $name = '<a href="?zone=' . $Zone_id . '">' . $name . '</a>';
        }
        if ($zone['zone_id']) {
            $name = getAreaName($zone['zone_id'], $as_ref) . ' - ' . $name;
        }
    } else {
        $name = "Unknown area - {$Zone_id}";
    }
    return $name;
}
Exemplo n.º 17
0
 public function tdetail()
 {
     if ($_GET['type'] == 'commentlist') {
         //评论
         $cmap['tid'] = intval($_GET['id']);
         $clist = getCommentList($cmap, 5);
         $this->assign("commentlist", $clist['list']);
         $this->assign("commentpagebar", $clist['page']);
         $this->assign("commentcount", $clist['count']);
         $data['html'] = $this->fetch('commentlist');
         exit(json_encode($data));
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     //合同ID
     if ($this->uid) {
         $invs = M('transfer_borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid} OR borrow_uid={$this->uid})")->find();
         if ($invs['id'] > 0) {
             $invsx = $invs['id'];
         } elseif (!is_array($invs)) {
             $invsx = 'no';
         }
     } else {
         $invsx = 'login';
     }
     $this->assign("invid", $invsx);
     //合同ID
     //borrowinfo
     //$borrowinfo = M("borrow_info")->field(true)->find($id);
     $borrowinfo = M("transfer_borrow_info b")->join("{$pre}transfer_detail d ON d.borrow_id=b.id")->field(true)->find($id);
     /*if(!is_array($borrowinfo) || $borrowinfo['is_show'] == 0){
     			$this->error("数据有误或此标已认购完");
     		}*/
     $borrowinfo['progress'] = getfloatvalue($borrowinfo['transfer_out'] / $borrowinfo['transfer_total'] * 100, 2);
     $borrowinfo['need'] = getfloatvalue(($borrowinfo['transfer_total'] - $borrowinfo['transfer_out']) * $borrowinfo['per_transfer'], 2);
     $borrowinfo['updata'] = unserialize($borrowinfo['updata']);
     if ($borrowinfo['danbao'] != 0) {
         $danbao = M('article')->field('id,title')->where("type_id=7 and id={$borrowinfo['danbao']}")->find();
         $borrowinfo['danbao'] = $danbao['title'];
         //担保机构
         $borrowinfo['danbaoid'] = $danbao['id'];
     } else {
         $borrowinfo['danbao'] = '暂无担保机构';
         //担保机构
     }
     if (time() >= $borrowinfo['deadline'] || $borrowinfo['progress'] == 100) {
         $borrowinfo['restday'] = 0;
         $borrowinfo['currentday'] = $borrowinfo['add_time'];
     } else {
         $borrowinfo['restday'] = ceil(($borrowinfo['deadline'] - time()) / (24 * 60 * 60));
         $borrowinfo['currentday'] = time();
     }
     $now = time();
     $borrowinfo['aa'] = floor($borrowinfo['collect_day'] - $now);
     $borrowinfo['lefttime'] = $borrowinfo['collect_day'] - $now;
     $borrowinfo['leftday'] = ceil(($borrowinfo['collect_day'] - $now) / 3600 / 24);
     $borrowinfo['leftdays'] = floor(($borrowinfo['collect_day'] - $now) / 3600 / 24) . '天以上';
     $money = 100000;
     switch ($borrowinfo['repayment_type']) {
         //收益
         case 2:
             //等额本息
             $monthData['duration'] = $borrowinfo['borrow_duration'];
             $monthData['money'] = $money;
             $monthData['year_apr'] = $borrowinfo['borrow_interest_rate'];
             $monthData['type'] = "all";
             $repay_detail = EqualMonth($monthData);
             $borrowinfo['shouyi'] = $repay_detail['repayment_money'] - $money;
             break;
         case 4:
             //每月还息
             $monthData['month_times'] = $borrowinfo['borrow_duration'];
             $monthData['account'] = $money;
             $monthData['year_apr'] = $borrowinfo['borrow_interest_rate'];
             $monthData['type'] = "all";
             $repay_detail = EqualEndMonth($monthData);
             $borrowinfo['shouyi'] = $repay_detail['repayment_account'] - $money;
             break;
         case 5:
             //一次性还款
             $borrowinfo['shouyi'] = floor($borrowinfo['borrow_interest_rate'] * $money * $borrowinfo['borrow_duration'] / 12) / 100;
             break;
     }
     $this->assign("vo", $borrowinfo);
     //帐户资金情况
     $this->assign("investInfo", getMinfo($this->uid, true));
     //帐户资金情况
     //此标借款利息还款相关情况
     //memberinfo
     $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $this->assign("minfo", $memberinfo);
     //memberinfo
     //investinfo
     $fieldx = "bi.investor_capital,bi.transfer_month,bi.transfer_num,bi.add_time,m.user_name,bi.is_auto,bi.final_interest_rate";
     $investinfo = M("transfer_borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select();
     $this->assign("investinfo", $investinfo);
     //investinfo
     $oneday = 86400;
     $time_1 = time() - 30 * $oneday . "," . time();
     $time_6 = time() - 180 * $oneday . "," . time();
     $time_12 = time() - 365 * $oneday . "," . time();
     $mapxr['borrow_id'] = $id;
     $this->assign("time_all_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_1}");
     $this->assign("time_1_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_6}");
     $this->assign("time_6_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['add_time'] = array("between", "{$time_12}");
     $this->assign("time_12_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr = array();
     $mapxr['borrow_id'] = $id;
     $mapxr['status'] = 2;
     $this->assign("time_all_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_1}");
     $this->assign("time_1_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_6}");
     $this->assign("time_6_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     $mapxr['back_time'] = array("between", "{$time_12}");
     $this->assign("time_12_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num"));
     //评论
     $cmap['tid'] = $id;
     $clist = getCommentList($cmap, 5);
     $this->assign("Bconfig", $Bconfig);
     $this->assign("commentlist", $clist['list']);
     $this->assign("commentpagebar", $clist['page']);
     $this->assign("commentcount", $clist['count']);
     $this->display();
 }
Exemplo n.º 18
0
function entrylist_invoice_tobemade($SQL)
{
    $Q = mysql_query($SQL . ' order by `time_start`');
    if (!mysql_num_rows($Q)) {
        echo _('No entries found.');
    } else {
        echo '<font color="red">' . mysql_num_rows($Q) . '</font> ' . _('entries found.');
        echo '<br>' . chr(10) . chr(10);
        echo '<table style="border-collapse: collapse;">' . chr(10);
        echo ' <tr>' . chr(10);
        echo '  <td style="border: 1px solid black;"><b>Arrangementsdato</b></td>' . chr(10);
        echo '  <td style="border: 1px solid black;"><b>' . _('Name') . '</b></td>' . chr(10);
        echo '  <td style="border: 1px solid black;"><b>' . _('Area') . '</b></td>' . chr(10);
        echo ' </tr>' . chr(10);
        while ($R = mysql_fetch_assoc($Q)) {
            $entry = getEntry($R['entry_id']);
            echo ' <tr>' . chr(10);
            // Starts
            echo '  <td style="border: 1px solid black;">';
            echo '<a href="day.php?year=' . date('Y', $entry['time_start']) . '&amp;month=' . date('m', $entry['time_start']) . '&amp;day=' . date('d', $entry['time_start']) . '&amp;area=' . $entry['area_id'] . '">' . date('d', $entry['time_start']) . '</a>-';
            echo '<a href="month.php?year=' . date('Y', $entry['time_start']) . '&amp;month=' . date('m', $entry['time_start']) . '&amp;day=' . date('d', $entry['time_start']) . '&amp;area=' . $entry['area_id'] . '">' . _(date('m', $entry['time_start'])) . '</a>-';
            echo date('Y', $entry['time_start']);
            echo '</td>' . chr(10);
            // Name
            echo '  <td style="border: 1px solid black;"><a href="entry.php?entry_id=' . $entry['entry_id'] . '">' . $entry['entry_name'] . '</a></td>' . chr(10);
            // Area
            echo '  <td style="border: 1px solid black;">';
            $area = getArea($entry['area_id']);
            if (count($area)) {
                echo $area['area_name'];
            }
            echo '</td>' . chr(10);
            echo ' </tr>' . chr(10);
        }
        echo '</table>';
    }
}
Exemplo n.º 19
0
function getPointData($area_id, &$data, $x, $y)
{
    global $gZoneToAreaImage, $lang;
    $area = getAreaIdFromPoint($data['map'], $data['position_x'], $data['position_y'], $data['position_z']);
    $area_data = getArea($area);
    if (!$area_data) {
        return 0;
    }
    $zone = @$area_data['zone_id'] ? $area_data['zone_id'] : $area;
    $areaname = $area_data['zone_id'] ? getAreaName($zone) . " (" . $area_data['name'] . ")" : $area_data['name'];
    $img = 'images/map_points/';
    $img .= $gZoneToAreaImage[$zone] == $area_id ? 'gps_icon.png' : 'gps_icon1.png';
    $imgX = 16;
    $imgY = 16;
    $name = '';
    if (@$data['type'] == 'n') {
        $text = getCreatureName($data['id'], 0) . "&nbsp;({$data['guid']})<br>{$areaname}<br>{$lang['respawn']}&nbsp;" . getTimeText($data['spawntimesecs']);
        if (getCreatureEvent($data['guid']) > 0) {
            $text = substr_replace("<br>{$lang['spawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(getCreatureEvent($data['guid'])), $text, 0, 0);
        }
        if (getCreatureEvent($data['guid']) < 0) {
            $text = substr_replace("<br>{$lang['despawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(abs(getCreatureEvent($data['guid']))), $text, 0, 0);
        }
        if (getCreaturePool($data['guid'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getCreaturePool($data['guid']) . ")", $text, 0, 0);
        }
        if (getCreaturePoolTemplate($data['id'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getCreaturePoolTemplate($data['id']) . ")", $text, 0, 0);
        }
    }
    if (@$data['type'] == 'o') {
        $text = getGameobjectName($data['id'], 0) . "&nbsp;({$data['guid']})<br>{$areaname}<br>{$lang['respawn']}&nbsp;" . getTimeText($data['spawntimesecs']);
        if (getGameobjectEvent($data['guid']) > 0) {
            $text = substr_replace("<br>{$lang['spawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(getGameobjectEvent($data['guid'])), $text, 0, 0);
        }
        if (getGameobjectEvent($data['guid']) < 0) {
            $text = substr_replace("<br>{$lang['despawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(abs(getGameobjectEvent($data['guid']))), $text, 0, 0);
        }
        if (getGameobjectPool($data['guid'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getGameobjectPool($data['guid']) . ")", $text, 0, 0);
        }
        if (getGameobjectPoolTemplate($data['id'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getGameobjectPoolTemplate($data['id']) . ")", $text, 0, 0);
        }
    }
    return array('id' => $data['id'], 'x' => $y, 'y' => $x, 'imgX' => $imgX, 'imgY' => $imgY, 'image' => $img, 'href' => "", 'tooltip' => $text);
}
Exemplo n.º 20
0
<?php

require_once 'scripts/php/getxml.php';
//USE HTTP NOT HTTPS!!!!!!!!!!!!!
$alertraw = $_GET['alert'];
$alertID = substr($alertraw, 46);
//$alert = "http://alerts.weather.gov/cap/wwacapget.php?x=AL1253B4A3478C.SevereThunderstormWarning.1253B4A3608CAL.BMXSVSBMX.46618850bf2a2ce3e3083951a2a37391";
$alert = "http://alerts.weather.gov/cap/wwacapget.php?x=" . $alertID;
$coordinates = getCoordinates($alert);
$county = getArea($alert);
//$center = centerMap($county);
?>
 
<!DOCTYPE html>
<html>
  <head>
    <title>Area Plot</title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">

    <style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0;
        padding: 0;
      }

    </style>


    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
Exemplo n.º 21
0
 public function tdetail()
 {
     if ($_GET['type'] == 'commentlist') {
         //评论
         $cmap['tid'] = intval($_GET['id']);
         $clist = getCommentList($cmap, 5);
         $this->assign("commentlist", $clist['list']);
         $this->assign("commentpagebar", $clist['page']);
         $this->assign("commentcount", $clist['count']);
         $data['html'] = $this->fetch('commentlist');
         exit(json_encode($data));
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     //合同ID
     if ($this->uid) {
         $invs = M('borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid})")->find();
         if ($invs['id'] > 0) {
             $invsx = $invs['id'];
         } elseif (!is_array($invs)) {
             $invsx = 'no';
         }
     } else {
         $invsx = 'login';
     }
     $this->assign("invid", $invsx);
     //合同ID
     //borrowinfo
     //$borrowinfo = M("borrow_info")->field(true)->find($id);
     $borrowinfo = M("borrow_info bi")->field('bi.*,ac.title,ac.id as aid')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $id)->find();
     if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) {
         $this->error("数据有误");
     }
     $borrowinfo['biao'] = $borrowinfo['borrow_times'];
     $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow'];
     $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
     $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2);
     $this->assign("vo", $borrowinfo);
     $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $memberinfo['zcze'] = $memberinfo['account_money'] + $memberinfo['back_money'] + $memberinfo['money_collect'] + $memberinfo['money_freeze'];
     $this->assign("minfo", $memberinfo);
     //data_list
     $data_list = M("member_data_info")->field('type,add_time,count(status) as num,sum(deal_credits) as credits')->where("uid={$borrowinfo['borrow_uid']} AND status=1")->group('type')->select();
     $this->assign("data_list", $data_list);
     //data_list
     // 投资记录
     $this->investRecord($id);
     $this->assign('borrow_id', $id);
     //近期还款的投标
     //$time1 = microtime(true)*1000;
     $history = getDurationCount($borrowinfo['borrow_uid']);
     $this->assign("history", $history);
     //$time2 = microtime(true)*1000;
     //echo $time2-$time1;
     //investinfo
     $fieldx = "bi.investor_capital,bi.add_time,m.user_name,bi.is_auto";
     $investinfo = M("borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->limit(10)->where("bi.borrow_id={$id}")->order("bi.id DESC")->select();
     $this->assign("investinfo", $investinfo);
     //investinfo
     //帐户资金情况
     $this->assign("investInfo", getMinfo($this->uid, true));
     $this->assign("mainfo", getMinfo($borrowinfo['borrow_uid'], true));
     $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     //帐户资金情况
     //展示资料
     $show_list = M("member_borrow_show")->where("uid={$borrowinfo['borrow_uid']}")->order('sort DESC')->select();
     $this->assign("show_list", $show_list);
     //展示资料
     //上传资料类型
     $upload_type = FilterUploadType(FS("Webconfig/integration"));
     $this->assign("upload_type", $upload_type);
     // 上传资料所有类型
     //评论
     $cmap['tid'] = $id;
     $clist = getCommentList($cmap, 5);
     $this->assign("Bconfig", $Bconfig);
     $this->assign("gloconf", $this->gloconf);
     $this->assign("commentlist", $clist['list']);
     $this->assign("commentpagebar", $clist['page']);
     $this->assign("commentcount", $clist['count']);
     $this->display();
 }
Exemplo n.º 22
0
 /**
  * 跳出页面-任务详情
  */
 public function detail()
 {
     $openid = I('get.openid');
     $action = I('get.action');
     $itemid = I('get.id', 0);
     if (empty($action) || empty($itemid)) {
         $this->message('错误,没有找到相关信息');
     }
     $userid = $this->getCookieUserId($openid);
     // 绑定的用户ID
     //根据任务id获取任务信息
     $data = D('Task')->relation(true)->where(" itemid= {$itemid} ")->find();
     $this->assign('data', $data);
     //分类的数组s
     $areas = getArea(false);
     $skills = getMemberSkill(false);
     $this->assign('areas', $areas);
     $this->assign('skills', $skills);
     //获取技术要求
     $techList = explode(',', $data['skill']);
     $this->assign('techList', $techList);
     //附件
     $fileList = D('Task_attach')->where(" taskid= {$data['itemid']} AND status = 3")->select();
     $this->assign('fileList', $fileList);
     // 用户对任务的状态
     if ($userid > 0) {
         $taskstatus = M('Task_apply')->where(" taskid = {$data['itemid']} AND userid = {$userid} AND companyid = {$data['userid']}")->find();
         $this->assign('taskstatus', $taskstatus);
     }
     $this->meta_title = $data['title'];
     $this->assign('openid', $openid);
     $this->assign('action', $action);
     $this->display('detail');
 }
Exemplo n.º 23
0
function getTBorrowList($parm = array())
{
    /* hycd if(empty($parm['map'])) return;
    	$map = $parm['map'];
    	$orderby = $parm['orderby'];
    	if($parm['pagesize'])
    	{
    		import( "ORG.Util.Page" );
    		$count = M("transfer_borrow_info b")->where($map)->count("b.id");
    		$p = new \Org\Util\Page($count, $parm['pagesize']);
    		$page = $p->show();
    		$Lsql = "{$p->firstRow},{$p->listRows}";
    	}else{
    		$page = "";
    		$Lsql = "{$parm['limit']}";
    	}
    	$pre = C("DB_PREFIX");
    	$suffix =C("URL_HTML_SUFFIX");
    	$field = "b.id,b.borrow_name,b.borrow_status,b.borrow_money,b.repayment_type,b.min_month,b.transfer_out,b.transfer_back,b.transfer_total,b.per_transfer,b.borrow_interest_rate,b.borrow_duration,b.increase_rate,b.reward_rate,b.deadline,b.is_show,m.province,m.city,m.area,m.user_name,m.id as uid,m.credits,m.customer_name,b.borrow_type,b.b_img,b.add_time,b.collect_day,b.danbao,b.online_time";
    $list = M("transfer_borrow_info b")->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    print_r($list);
    	$areaList = getarea();
    	foreach($list as $key => $v)
    	{
    		$list[$key]['location'] = $areaList[$v['province']].$areaList[$v['city']];
    		$list[$key]['progress'] = getfloatvalue( $v['transfer_out'] / $v['transfer_total'] * 100, 2);
    		$list[$key]['need'] = getfloatvalue(($v['transfer_total'] - $v['transfer_out'])*$v['per_transfer'], 2 );
    		$list[$key]['burl'] = MU("Home/invest_transfer", "invest_transfer",array("id" => $v['id'],"suffix" => $suffix));	
    		
    		$temp=floor(("{$v['collect_day']}"*3600*24-time()+"{$v['add_time']}")/3600/24);
    		$list[$key]['leftdays'] = "{$temp}".'天以上';
    		$list[$key]['now'] = time();
    		$list[$key]['borrow_times'] = count(M('transfer_borrow_investor') -> where("borrow_id = {$list[$key]['id']}") ->select());
    		$list[$key]['investornum'] = M('transfer_borrow_investor')->where("borrow_id={$v['id']}")->count("id");
    		if($v['danbao']!=0 ){
    			$list[$key]['danbaoid'] = intval($v['danbao']);
    			$danbao = M('article')->field('id,title')->where("type_id=7 and id={$v['danbao']}")->find();
    			$list[$key]['danbao']=$danbao['title'];//担保机构
    		}else{
    			$list[$key]['danbao']='暂无担保机构';//担保机构
    		}
    		//收益率
    		$monthData['month_times'] = 12;
    		$monthData['account'] = $v['borrow_money'];
    		$monthData['year_apr'] = $v['borrow_interest_rate'];
    		$monthData['type'] = "all";
    		$repay_detail = CompoundMonth($monthData);	
    		if($v['borrow_duration']==1){
    		    $list[$key]['shouyi'] = $v['borrow_interest_rate'];
    		}else{
    		    $list[$key]['shouyi'] = $repay_detail['shouyi'];
    		}
    		//收益率结束	
    	}
    	$row = array();
    	$row['list'] = $list;
    	$row['page'] = $page;
    	return $row;*/
    if (empty($parm['map'])) {
        return;
    }
    $map = $parm['map'];
    $orderby = $parm['orderby'];
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info b')->where($map)->count('b.id');
        echo $count;
        $p = new \Org\Util\Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    $field = "b.id,b.borrow_name,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control,b.borrow_btype";
    $list = M('borrow_info b')->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    $areaList = getArea();
    foreach ($list as $key => $v) {
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $list[$key]['bollprogress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 86.90000000000001, 2);
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("Home/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        //新加
        $list[$key]['lefttime'] = $v['collect_time'] - time();
        if ($v['deadline'] == 0) {
            $endTime = strtotime(date("Y-m-d", time()));
            if ($v['repayment_type'] == 1) {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} day", $endTime);
            } else {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} month", $endTime);
            }
        } else {
            $list[$key]['repaytime'] = $v['deadline'];
            //还款时间
        }
        $list[$key]['publishtime'] = $v['add_time'] + 60 * 60 * 24 * 3;
        //预计发标时间=添加时间+1天
        if ($v['danbao'] != 0) {
            $danbao = M('article')->field("id,title")->where("type_id =7 and id ={$v['danbao']}")->find();
            $list[$key]['danbao'] = $danbao['title'];
            //担保机构
        } else {
            $list[$key]['danbao'] = '暂无担保机构';
            //担保机构
        }
    }
    $row = array();
    $row['list'] = $list;
    $row['page'] = $page;
    return $row;
}
Exemplo n.º 24
0
    $area_id_vitenfabrikken = mysql_result($Q, 0, 'area_id');
} else {
    $area_id_vitenfabrikken = -1;
}
unset($Q);
if (count($areaArray) && $areaArray['area_name'] == 'Vitengarden') {
    $area_name = 'Vitengarden';
    $other = $area_id_vitenfabrikken;
} else {
    $area_name = 'Vitenfabrikken';
    $Q = mysql_query("SELECT id as area_id FROM `mrbs_area` where area_name = 'Vitengarden' limit 1");
    if (mysql_num_rows($Q)) {
        $other = mysql_result($Q, 0, 'area_id');
    }
    unset($Q);
    $areaArray = getArea($area_id_vitenfabrikken);
    if (!count($areaArray)) {
        die('Vitenfabrikken not found. System error.');
    }
}
$area = $areaArray['area_id'];
$path = './import/datanova-' . strtolower($area_name);
/* The real thing */
if (isset($_GET['importerfil'])) {
    // Import of a singel file
    $importerfil = str_replace('/', '', $_GET['importerfil']);
    $importerfil = trim(str_replace('\\', '', $_GET['importerfil']));
    if (isset($_GET['go'])) {
        $go = true;
    } else {
        $go = false;
Exemplo n.º 25
0
function getBorrowList($parm = array())
{
    if (empty($parm['map'])) {
        return;
    }
    $map = $parm['map'];
    $orderby = $parm['orderby'] . "borrow_money-has_borrow DESC ,id DESC";
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('borrow_info b')->where($map)->count('b.id');
        // return $sql= M()->getLastSql();
        //  die;
        $p = new Page($count, $parm['pagesize']);
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $pre = C('DB_PREFIX');
    $suffix = C("URL_HTML_SUFFIX");
    $field = "b.id,b.borrow_name,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_min,b.borrow_interest_rate,b.borrow_mortgage_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control,b.toubiao_telephone";
    //	$field = "b.id,b.borrow_name,b.borrow_type,b.reward_type,b.borrow_times,b.borrow_status,b.borrow_money,b.borrow_use,b.repayment_type,b.borrow_min,b.borrow_interest_rate,b.borrow_duration,b.collect_time,b.add_time,b.province,b.has_borrow,b.has_vouch,b.city,b.area,b.reward_type,b.reward_num,b.password,m.user_name,m.id as uid,m.credits,m.customer_name,b.is_tuijian,b.deadline,b.danbao,b.borrow_info,b.risk_control";
    $list = M('borrow_info b')->field($field)->join("{$pre}members m ON m.id=b.borrow_uid")->where($map)->order($orderby)->limit($Lsql)->select();
    //ORDER BY borrow_money-has_borrow DESC ,id DESC
    // echo M()->getLastSql();
    // die;
    $areaList = getArea();
    foreach ($list as $key => $v) {
        if (strlen($v['toubiao_telephone']) >= 11) {
            $userTelephone = $_SESSION['u_user_name'];
            if (strpos($v['toubiao_telephone'], $userTelephone) !== false) {
                //此标是否在前端显示
                $list[$key]['zw_show'] = 1;
            } else {
                $list[$key]['zw_show'] = 0;
            }
        } else {
            $list[$key]['zw_show'] = 1;
        }
        $list[$key]['location'] = $areaList[$v['province']] . $areaList[$v['city']];
        $list[$key]['biao'] = $v['borrow_times'];
        $list[$key]['need'] = $v['borrow_money'] - $v['has_borrow'];
        $list[$key]['leftdays'] = getLeftTime($v['collect_time']);
        $list[$key]['progress'] = getFloatValue($v['has_borrow'] / $v['borrow_money'] * 100, 2);
        $list[$key]['vouch_progress'] = getFloatValue($v['has_vouch'] / $v['borrow_money'] * 100, 2);
        $list[$key]['burl'] = MU("Home/invest", "invest", array("id" => $v['id'], "suffix" => $suffix));
        //新加
        $list[$key]['lefttime'] = $v['collect_time'] - time();
        if ($v['deadline'] == 0) {
            $endTime = strtotime(date("Y-m-d", time()));
            if ($v['repayment_type'] == 1) {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} day", $endTime);
            } else {
                $list[$key]['repaytime'] = strtotime("+{$v['borrow_duration']} month", $endTime);
            }
        } else {
            $list[$key]['repaytime'] = $v['deadline'];
            //还款时间
        }
        $list[$key]['publishtime'] = $v['add_time'] + 60 * 60 * 24 * 3;
        //预计发标时间=添加时间+1天
        if ($v['danbao'] != 0) {
            $danbao = M('article')->field("id,title")->where("type_id =7 and id ={$v['danbao']}")->find();
            $list[$key]['danbao'] = $danbao['title'];
            //担保机构
        } else {
            $list[$key]['danbao'] = '暂无担保机构';
            //担保机构
        }
    }
    $row = array();
    $row['list'] = $list;
    $row['page'] = $page;
    $row['count'] = $count;
    return $row;
}
             *This is the text that will appear on the menu bar </td>
         </tr>
         <tr>
             <th> App: </th><td>
             <select name="appId">
             	<?php 
 getApps();
 ?>
             </select>
             <?php 
 echo isSuperuser() ? "" : "*The path to the file with NO leading slash </td>";
 ?>
         </tr>
         <tr>
             <th> Area: </th><td> <?php 
 getArea();
 ?>
             </td>
         </tr>
         <tr>
             <th> Permission Needed: </th><td>
             <select name='permission'>
                 <?php 
 getPermissions();
 ?>
             </select></td>
         </tr>
         <tr>
             <th> Parent Link: </th><td>
             <select name='parent'>
                 <?php 
Exemplo n.º 27
0
 public function invest_people_info()
 {
     if (!$this->uid) {
         $this->qingxian();
     }
     $pre = C('DB_PREFIX');
     $id = intval($_GET['id']);
     $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php");
     $borrowinfo = M("borrow_info bi")->field('bi.*,ac.title,ac.id as aid')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $id)->find();
     if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) {
         $this->error("数据有误");
     }
     $borrowinfo['biao'] = $borrowinfo['borrow_times'];
     $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow'];
     $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time();
     $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2);
     $this->assign("vo", $borrowinfo);
     $memberinfo = M("members m")->field("m.id,m.user_phone,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find();
     $areaList = getArea();
     if (!$memberinfo) {
         $memberinfo['credits'] = 0;
     }
     $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']];
     $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']];
     $memberinfo['zcze'] = $memberinfo['account_money'] + $memberinfo['back_money'] + $memberinfo['money_collect'] + $memberinfo['money_freeze'];
     //var_dump($memberinfo);die;
     $reg_time = date('Y-m-d H:i:s', $memberinfo['reg_time']);
     $this->assign("reg_time", $reg_time);
     $this->assign("minfo", $memberinfo);
     //$this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     $this->assign("borrow_id", $id);
     $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid']));
     $this->display();
 }
Exemplo n.º 28
0
<?php

include 'config/autoload.php';
if (!isset($_GET['id'])) {
    header('Location: categories.php');
}
$area = getArea($db, $_GET['id']);
if (isset($_POST['title'])) {
    updateArea($db, $_GET['id'], $_POST['title']);
    header('Location: categories.php');
}
?>

<h3>Gestion des catégories : domaine, priorité et thème</h3>

<form action="editArea.php?id=<?php 
echo $_GET['id'];
?>
" method="post">
  <fieldset>
    <legend>Edition du domaine :</legend>
    <input type="text" name="title" value="<?php 
echo $area['title'];
?>
" placeholder="Libellé du domaine" required>*
    <hr>
    <input type="submit" value="Editer le domaine">
    <input type="reset" value="Reset">
    <a href="categories.php"><input type="button" value="Retour"></a>
  </fieldset>
</form>
Exemplo n.º 29
0
    if (count($user)) {
        $users_array[] = '<a href="user.php?user_id=' . $user['user_id'] . '">' . $user['user_name'] . '</a>';
    }
}
if ($entry['user_assigned2'] != '') {
    $users_array[] = $entry['user_assigned2'];
}
if (!count($users_array)) {
    $users_array[] = '<i>' . iconHTML('user_delete') . ' ' . _('Nobody') . '</i>';
}
echo implode(', ', $users_array);
echo '</td>
</tr>' . chr(10);
echo '<tr>
	<td align="right">' . iconHTML('house') . ' <b>' . _('Area') . ':</b> </td>';
$area = getArea($entry['area_id']);
echo "\t" . '<td>' . $area['area_name'] . '</td>
</tr>' . chr(10);
echo '<tr><td align="right">' . '<img src="./img/icons/shape_square.png" style="border: 0px solid black; vertical-align: middle;"> ' . '<b>' . _('Room') . ':</b> </td><td>';
if (!count($entry['room_id'])) {
    echo '<i>' . _('Whole area') . '</i>';
} elseif (count($entry['room_id']) == '1') {
    // Single room
    foreach ($entry['room_id'] as $rid) {
        if ($rid == '0') {
            echo '<i>' . _('Whole area') . '</i>';
        } else {
            $room = getRoom($rid);
            if (count($room)) {
                echo $room['room_name'];
            } else {
Exemplo n.º 30
0
     mysql_query("\n\t\t\t\tINSERT INTO `programs_defaultattachment`\n\t\t\t\t(`program_id`, `att_id`) VALUES\n\t\t\t\t('" . $conProgram['program_id'] . "', '" . $att['att_id'] . "');\n\t\t\t\t");
     if (isset($_GET['redirect']) && $_GET['redirect'] == 'program') {
         header('Location: admin_programs.php?program_id=' . $conProgram['program_id']);
     } else {
         header('Location: ' . $_SERVER['PHP_SELF'] . '?att_id=' . $att['att_id']);
     }
     exit;
 }
 if (isset($_POST['connection_entry_type']) && isset($_POST['connection_area'])) {
     $conEntryType = getEntryType($_POST['connection_entry_type']);
     if (!count($conEntryType)) {
         include "include/admin_middel.php";
         templateError('Fant ikke bookingtypen du prøvde å koble til vedlegg nr ' . $att['att_id']);
         exit;
     }
     $conArea = getArea($_POST['connection_area']);
     if (!count($conArea)) {
         include "include/admin_middel.php";
         templateError('Fant ikke bygget du prøvde å koble til vedlegg nr ' . $att['att_id']);
         exit;
     }
     mysql_query("\n\t\t\t\tINSERT INTO `entry_type_defaultattachment`\n\t\t\t\t(\n\t\t\t\t\t`entry_type_id`, \n\t\t\t\t\t`area_id`, \n\t\t\t\t\t`att_id`\n\t\t\t\t) VALUES (\n\t\t\t\t\t'" . $conEntryType['entry_type_id'] . "',\n\t\t\t\t\t'" . $conArea['area_id'] . "',\n\t\t\t\t\t'" . $att['att_id'] . "'\n\t\t\t\t);\n\t\t\t\t");
     if (isset($_GET['redirect']) && $_GET['redirect'] == 'entry_type') {
         header('Location: admin_entry_type.php?entry_type_id=' . $conEntryType['entry_type_id']);
     } else {
         header('Location: ' . $_SERVER['PHP_SELF'] . '?att_id=' . $att['att_id']);
     }
     exit;
 }
 include "include/admin_middel.php";
 $entry_types = array();