Esempio n. 1
0
    if ($type = getGP('type', 'P')) {
        $wheresql .= " AND department ='" . $type . "'";
    }
    $vuidtype = getGP('vuidtype', 'P');
    if (!is_superadmin() && $vuidtype == '') {
        $wheresql .= " AND uid = {$_USER->id}";
    }
    if ($vuidtype != '') {
        $wheresql .= " " . get_subordinate($_USER->id, 'uid');
    }
    //时间
    $vstartdate = getGP('vstartdate', 'P');
    $venddate = getGP('venddate', 'P');
    if ($vstartdate != '' && $venddate != '') {
        $wheresql .= " AND (startdate>='" . $vstartdate . "' and startdate<='" . $venddate . "')";
    }
    $sql = "SELECT * FROM " . DB_TABLEPRE . "property WHERE 1 {$wheresql}  ORDER BY id desc";
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        $archive = array("" . $row[number] . "", "" . $row[name] . "", "" . get_property_type_name($row[property_type]) . "", "" . get_realdepaname($row[department]) . "", "" . $row[cptl_val] . "", "" . $row[cptl_bal] . "", "" . $row[dpct_yy] . "", "" . $row[sum_dpct] . "", "" . $row[mon_dpct] . "", "" . str_replace("-", ".", $row[startdate]) . "", "" . $row[content] . "", "" . $row[user] . "", "" . str_replace("-", ".", $row[date]) . "", "" . get_realname($row['uid']) . "");
        $content[] = $archive;
    }
    $excel = new ExcelWriter($outputFileName);
    if ($excel == false) {
        echo $excel->error;
    }
    foreach ($content as $v) {
        $excel->writeLine($v);
    }
    $excel->sendfile($outputFileName);
}
Esempio n. 2
0
</td>
<td width="80"><?php 
    echo $row['number'];
    ?>
</td>
<td class="title">
<a href="admin.php?ac=views&do=edit&fileurl=property&id=<?php 
    echo $row['id'];
    ?>
"><?php 
    echo $row['name'];
    ?>
</a>
</td>
<td width="100"><?php 
    echo get_property_type_name($row['property_type']);
    ?>
</td>
<td width="120"><?php 
    echo get_realdepaname($row['department']);
    ?>
</td>
<td width="80"><?php 
    echo $row['cptl_val'];
    ?>
</td>
<td width="60"><?php 
    echo $row['user'];
    ?>
</td>
<td class="info"><?php